Skip to content

Instantly share code, notes, and snippets.

@mywarr
Created January 18, 2013 12:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mywarr/4564218 to your computer and use it in GitHub Desktop.
Save mywarr/4564218 to your computer and use it in GitHub Desktop.
mac address spoofing
#!/bin/sh
. /etc/rc.common
StartService ()
{
ConsoleMessage "Running SpoofMAC script."
networksetup -setairportpower en0 on
/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -z
/sbin/ifconfig en1 ether 00:`openssl rand -hex 5 | sed 's/\(..\)/\1:/g; s/.$//'`
networksetup -detectnewhardware
}
StopService ()
{
return 0
}
RestartService ()
{
return 0
}
RunService "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment