標題:
Auto Wireless MAC/WAN address changer
[打印本頁]
作者:
tomleehk
時間:
2014-5-19 18:39
標題:
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.
#!/bin/ash
MAC=`(date; cat /proc/interrupts) | md5sum | sed -r 's/^(.{10}).*$/\1/; s/([0-9a-f]{2})/\1:/g; s/:$//;'`
echo "00:${MAC}"
nvram set wl0_hwaddr="00:${MAC}"
nvram set def_whwaddr="00:${MAC}"
nvram set def_hwaddr="00:${MAC}"
nvram commit
stopservice wan
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.
stopservice wan
startservice wan
複製代碼
Just in case it happens, just remove these 2 lines from the script and let new new MAC address apply after reboot.
歡迎光臨 電訊茶室 (http://www.telecom-cafe.com/forum/)
Powered by Discuz! 7.2