|
# license must be the same with license in wifiap center机器码(修改为你的热点机器码) license="ddtenda" # hotspotname must be the same with HotspotName in wifiap center 热点名称 hotspotname="xierongqin" #enable("1") or disable("0") Captiveportal 启动或禁用认证功能 auth="1" #code begin,Don't edit it 以下代码不需要修改 if [ "$auth" = "1" ] then key="`/bin/echo -n "$license$hotspotname"|/usr/bin/md5sum|/usr/bin/awk '{print $1}'`" echo $key>/tmp/wifiap_wifidog.key res=1 while [ $res -ne 0 ] do /usr/bin/wget -t 3 -T 20 "http://c.wifiap.cn/c/router_api_cmd_dd.php?gw_id=$hotspotname&key=$key&action=getscript" -O /tmp/wifiap_wifidog_watch.sh res=$? if [ $res -eq 0 ] then read firstline</tmp/wifiap_wifidog_watch.sh if [ "$firstline" = "#/bin/sh" ] then res=0 else res=1 /bin/sleep 10 fi else /bin/sleep 10 fi done /bin/chmod +x /tmp/wifiap_wifidog_watch.sh /bin/sh /tmp/wifiap_wifidog_watch.sh & fi #code end |
|