Skip to content

Instantly share code, notes, and snippets.

@mywarr
mywarr / SpoofMAC
Created January 18, 2013 12:14
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/.$//'`