r/HowToHack • u/guruit1 • Jan 20 '19
Change Your MAC Address Using a Python Script
https://www.youtube.com/watch?v=foDD46pl77g32
u/SCAND1UM Jan 20 '19
I thought you could just go into settings and change your MAC address super easily
8
u/MattJaccino Jan 20 '19
With the shibang in the first line, isn’t calling “python3” before the file redundant?
Can’t you just cd to where the file is and ./mac_changer.py after chmod 755?
4
Jan 21 '19
This is literally all it takes in bash.
# echo a random mac addy
alias rand_mac="openssl rand -hex 6 | sed 's/\(..\)/\1:/g;s/.$//'"
# changes the mac address, this will be reset back to factory Mac upon reboot
# the parameter is the interface you want to change(typically en0)
spoof_mac(){
NEW_MAC=`rand_mac`
sudo ifconfig $1 ether $NEW_MAC
echo "New mac addy: $NEW_MAC"
}
alias spoof_mac=spoof_mac2
2
u/Ryanthatch Jan 21 '19
Is there a "how to" guide for this but in windows? I don't own a mac.
2
u/dmeow Jan 21 '19
There's a ubuntu term you can install on Win 10. Not sure how well it interfaces with the network chip though.
2
u/djingrain Script Kiddie Jan 21 '19
Linux my dude. Not sure if it worked work in a VM, but it's worth a try. Honestly I have so much trouble using tools in Windows, it's worth looking into switching if you're serious
2
u/martor33 Jan 21 '19
Why not use os.system?
And why not use the ip commands, they are way more intuitive
2
u/dear_volgk Jan 21 '19 edited Jan 21 '19
This is a MAC/IP changer for Linux. Bypasses the problems that one encounters when changing MAC/IP. For example, the regeneration of the routing table, or the coincidence of addresses in the local network. https://github.com/volgk/mich
5
Jan 21 '19
Or you can change you mac with any of the simple networking tools in linux. Script KIddies lol
23
u/BetTheYacht Jan 20 '19
Can’t you just use Mac changer in terminal ?