Alright, switched to dd-wrt and am still having trouble getting this to work. It seems to run the script just fine. I ran the command and this
was the result, as a startup command. My 3DS isn't noticing anything though, so I'm not entirely sure what's wrong. It also places this
in additional cron jobs.
I've tried running
I am able to change the MAC address manually and have my 3DS get streetpasses that way, but I'd really like to get this working.
Code:
echo -e "#!/bin/sh\nWLINT=\$(nvram get wl0_ifname)\nWLMAC=\$(nvram get wl0_hwaddr)\nWLSSID=\$(nvram get wl0_ssid)\nJOBS=\$(nvram get cron_jobs)\nURL=http://nintendozone.no-ip.org?\nMACS=/tmp/\${0##*/}.macs\nSPDELAY=480\nMACNUM=0\nsetwl (){\n wl ssid | grep -q \"\\\"\$2\\\"\" || wl ssid \"\$2\" >/dev/null\n ifconfig \$WLINT down\n ifconfig \$WLINT hw ether \$1 up\n}\ncase \"\$1\" in\nstart)\n if [ -z \$2 ]; then\n nvram set cron_jobs=\"\$(echo \"\$JOBS\" | sed -r s:#*\\(.*\$0.*\\):\\\\1:)\"\n else\n nvram set cron_jobs=\"\$(echo \"\$JOBS\" | grep -v \$1 | sed \"\\\$a* * * * * root \$0 \$2\")\"\n fi\n;;\nstop)\n setwl \$WLMAC \$WLSSID\n nvram set cron_jobs=\"\$(echo \"\$JOBS\" | sed -r s:#*\\(.*\$0.*\\):#\\\\1:)\"\n;;\ntoggle)\n if echo \"\$JOBS\" | grep \$0 | grep -qe '^#'; then\n \$0 start\n else\n \$0 stop\n fi\n;;\nrestart)\n \$0 stop\n \$0 start\n;;\n*)\n [ -f \$MACS ] && MACNUM=\$(grep -v ^x \$MACS | wc -l) && DELAY=\$(((\$(date +%s)-\$(date -r \$MACS +%s))/60))\n [ \$MACNUM = 0 ] && NEWMACS=\$(wget -q -O - \$URL\$1)\n [ \$(echo -n \"\$NEWMACS\" | wc -c) != 0 ] && echo \"\$NEWMACS\" > \$MACS && MACNUM=\$(cat \$MACS | wc -l)\n [ \$MACNUM = 0 ] && sed -ri \"s/^x//\" \$MACS && MACNUM=\$(grep -v ^x \$MACS | wc -l)\n MACTOTAL=\$(cat \$MACS | wc -l)\n [ \$MACNUM = 0 ] || ([ \$MACTOTAL -lt \$SPDELAY ] && [ \${DELAY:-\$SPDELAY} -lt \$((\$SPDELAY/\$MACTOTAL)) ]) && exit\n RANDOM=\$(head /dev/urandom | hexdump -d | head -n 1 | sed -r \"s/^([0-9]+ +0{0,4})+//\")\n MAC=\$(grep -v ^x \$MACS | head -n \$((\$RANDOM%\${MACNUM}+1)) | tail -n 1)\n sed -ri \"s/^\$MAC/x&/\" \$MACS\n SSID=\$(echo \$MAC | cut -d , -f 2 -s)\n MAC=\$(echo \$MAC | cut -d , -f 1)\n : \${SSID:=\$WLSSID}\n setwl \$MAC \$SSID\n;;\nesac\nstopservice cron\nstartservice cron\n" > /tmp/nzone; mkdir -p /tmp/etc/config; echo -e "#!/bin/sh\n/tmp/nzone toggle\n" > /tmp/etc/config/nzone.sesbutton; chmod +x /tmp/nzone /tmp/etc/config/nzone.sesbutton
was the result, as a startup command. My 3DS isn't noticing anything though, so I'm not entirely sure what's wrong. It also places this
Code:
* * * * * root /tmp/nzone BASE16,GBATEMP
I've tried running
but it just places a 1 in additional cron jobs and nothing else seems to happen./tmp/nzone start
I am able to change the MAC address manually and have my 3DS get streetpasses that way, but I'd really like to get this working.