返回列表 發帖

Auto Wireless MAC/WAN address changer

本帖最後由 tomleehk 於 2014-6-11 01:28 編輯

Auto Wireless MAC/WAN address changer

This script will change your Wireless MAC address to a random value, then it will apply it to the system and restart the interfaces.
  1. #!/bin/ash
  2. MAC=`(date; cat /proc/interrupts) | md5sum | sed -r 's/^(.{10}).*$/\1/; s/([0-9a-f]{2})/\1:/g; s/:$//;'`
  3. echo "00:${MAC}"
  4. nvram set wl0_hwaddr="00:${MAC}"
  5. nvram set def_whwaddr="00:${MAC}"
  6. nvram set def_hwaddr="00:${MAC}"
  7. nvram commit
  8. stopservice wan
  9. startservice wan
複製代碼
The 2 lines of script below is to apply the change immdiately and yet it may have some problem on connection via WIFI afterwards.
  1. stopservice wan
  2. startservice wan
複製代碼
Just in case it happens, just remove these 2 lines from the script and let new new MAC address apply after reboot.

返回列表