婆罗门
精华
|
战斗力 鹅
|
回帖 0
注册时间 2007-11-22
|
本帖最后由 琴酒 于 2013-8-18 12:38 编辑
那和我機器一樣 沒理由我能你不能啊 - -- root@DD-WRT:~# cat /tmp/nzone
- #!/bin/sh
- MACS=/tmp/nzone.macs
- [ -f $MACS ] || wget -q -O $MACS "http://duke-srg.dyndns.org/3ds/nzone?$1"
- MACNUM=$(cat $MACS | wc -l)
- [ $MACNUM != 0 ] || exit
- RANDOM=$(head /dev/urandom | hexdump -d | head -n 1 | cut -c 11-15)
- MACNUM=$(($RANDOM%${MACNUM}+1))
- MAC=$(head -n $MACNUM $MACS | tail -n 1)
- WLINT=$(nvram get wl0_ifname)
- APDCNF=/tmp/${WLINT}_hostap.conf
- APDPID=/var/run/${WLINT}_hostapd.pid
- if [ -e $APDCNF ]; then
- kill $(cat $APDPID)
- sleep 3
- sed -ri s/bssid=.*/bssid=$MAC/ $APDCNF
- hostapd -B -P $APDPID $APDCNF
- else
- ifconfig $WLINT down
- ifconfig $WLINT hw ether $MAC
- ifconfig $WLINT up
- fi
- echo $MAC >> /tmp/macschanged.txt
复制代码 最後一行 是我自己加的 用來確認 到底換過哪幾個MAC- */5 * * * * root /tmp/nzone 49,BASE256,GBATEMP,AFE,ALP,ASS
复制代码 |
|