-
-
Save ahhh/3735257875f20b8d25ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
. /etc/rc.common | |
StartService () | |
{ | |
ConsoleMessage "Running SpoofMAC script." | |
/usr/sbin/networksetup -setairportpower en0 on | |
/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -z | |
/sbin/ifconfig en0 ether `python -c 'import random;print ":".join("%02x" % octet for octet in [random.randint(0,64) << 2] + [random.randint(0,127) for _ in range(5)])'` | |
/usr/sbin/networksetup -detectnewhardware | |
} | |
StopService () | |
{ | |
return 0 | |
} | |
RestartService () | |
{ | |
return 0 | |
} | |
RunService "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
Description = "SpoofMAC"; | |
Provides = ("SpoofMAC"); | |
Requires = ("Network", "Disks"); | |
OrderPreference = "None"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment