I wrote a small shell script to spoof my wireless interface mac address. I'd like to run this script on my mac (snow leopard) before the airport utility starts and attempts to connect to an access point. Where would I put this script or what appropriate startup file is referenced where I can have it call my spoofing script?
Here's my little bash script:
$ cat spoof_apple_mac_wifi_mac.sh #!/bin/bash #bring en1 down sudo ifconfig en1 down; #generate random mac address MAC=`/usr/bin/openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`; #change mac address with ifconfig sudo ifconfig en1 ether $MAC; #bring en1 up sudo ifconfig en1 up;