My service expired last night. My renew script still isn't working, but I didn't try very hard. All I did was run:
curl -K curlcfg2 http://google.com -v curl -K curlcfg2 http://phc.prontonetworks.com/cgi-bin/authlogin -v curl -K curlcfg2 "https://register.prontonetworks.com/registration/Main.jsp?wispId=5338&nasId=00:1b:24:78:ab:82&tempName=selAuth&orgUrl=&userMacId=00:23:69:b3:ce:65" -v -c /tmp/cookiejar curl -K curlcfg2 -d 'username=$$$$$$$$&password=$$$$$$$$&changePassword=' "https://register.prontonetworks.com/registration/customization/default/CheckValidUserToLogin.jsp" -v -b /tmp/cookiejar -c /tmp/cookiejar curl -K curlcfg2 https://register.prontonetworks.com/registration/chooseAuth.do -d 'loginUserId=$$$$$$$$&loginPassword=$$$$$$$$&authType=Pronto' -e "https://register.prontonetworks.com/registration/customization/default/CheckValidUserToLogin.jsp" -v -b /tmp/cookiejar -c /tmp/cookiejar curl -K curlcfg2 https://register.prontonetworks.com/registration/buyAPlan.do -d 'planId=#############&rPM=Yes&selectPG=Verisign&agree=agree' -v -b /tmp/cookiejar -c /tmp/cookiejar curl -K curlcfg2 https://register.prontonetworks.com/registration/buyAPlanConfirm.do -d 'planId=#############&planType=PREPAID&requestComingFrom=BuyAPlan&paymentMethodId=CC&customerId=#############&creditCardNumber=################&creditCardId=#############' -v -c /tmp/cookiejar -b /tmp/cookiejar curl -K curlcfg2 https://register.prontonetworks.com/registration/process.jsp -v -b /tmp/cookiejar -c /tmp/cookiejar curl -K curlcfg2 https://phc.prontonetworks.com/cgi-bin/authlogin -d 'serviceName=ProntoAuthentication&userId=$$$$$$$$&password=$$$$$$$$' -v -b /tmp/cookiejar -c /tmp/cookiejar curl -K curlcfg2 "http://www.onezone.ca/wifi/wifi_success.html?wispId=5338&nasId=00:1b:24:78:ab:82&newReg=Y&sessionId=#############&freePlan=N" -v -b /tmp/cookiejar -c /tmp/cookiejar curl -K curlcfg2 "http://www.onezone.ca/wifi/wifi_checkaccount.html?wispId=5338&sessionId=#############&nasId=00:1b:24:78:ab:82&newReg=Y" -v -b /tmp/cookiejar -c /tmp/cookiejar curl -K curlcfg2 "https://register.prontonetworks.com/registration/Main.jsp?wispId=5338&nasId=00:1b:24:78:ab:82&sessionId=#############" -v -b /tmp/cookiejar -c /tmp/cookiejar
You need the file /sbin/curlcfg2, which contains:
-A "Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2_1 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5H11 Safari/525.20" -k
Note that you'll need to replace “$$$$$$$$” with your username or password as appropriate, and “#############” with whatever the appropriate number is, matching whatever was received in the results of the last command. If you run these commands twice, it'll bill your account twice, but give you two months of service. You can confirm this by checking your oz account info (for which you don't need cookies):
I was expecting the service at SLM to die on Sunday (10th), but it was still running until 2am last night. When I got in today, there were 53 instances of 'onezone-check.pl' running on the auto-oz router, each one also having an instance of udhcpc. I ran:
killall onezone-check.pl
And then:
/sbin/onezone-check.pl
And we were online. So maybe Onezone didn't log us out; maybe the router was just choking. Just to see what would happen, I ran:
cd /sbin ./onezone-logout.sh ./onezone-check.pl
And it came up fine.
So, last time I was here I ran the renew script a second time to see if it would credit me another month. At the time I remember thinking that it hadn't. But looking now, it's not set to expire until May 10th.
Unfortunately, I can't get the renew script to run anymore. When it tries to run the shell onezone-Mainjsp.sh script, it hangs. Launching curl from a shell script from a perl script was working before, but appears not to now. I rebooted the router; same problem. I tried setting a timeout in curl by setting '-m 10' in curlcfg, but that didn't do anything.
what's happening is that on this command: curl -K curlcfg https://register.prontonetworks.com/registration/customization/default/CheckValidUserToLogin.jsp -d "username=XXX&password=YYYYYY&changePassword=" -e "https://register.prontonetworks.com/registration/Main.jsp?wispId=5338&nasId=00:1b:24:78:ab:82&tempName=selAuth&orgUrl=&userMacId=00:23:69:b3:ce:65" -b /tmp/cookiejar onezone returns: Session Timed out. Error in Proceeding Further. Please close and restart your browser. I tried removing the "-b /tmp/cookiejar" from the command, and it does the same thing. So, I guess we need to go further back to find the spot it stop complaining about this. Let's try: curl -K curlcfg "https://register.prontonetworks.com/registration/Main.jsp?wispId=5338&nasId=00:1b:24:78:ab:82&tempName=selAuth&orgUrl=&userMacId=00:23:69:b3:ce:65" -b /tmp/cookiejar curl -K curlcfg https://register.prontonetworks.com/registration/customization/default/CheckValidUserToLogin.jsp -d "username=XXX&password=YYYYYY&changePassword=" -e "https://register.prontonetworks.com/registration/Main.jsp?wispId=5338&nasId=00:1b:24:78:ab:82&tempName=selAuth&orgUrl=&userMacId=00:23:69:b3:ce:65" -c /tmp/cookiejar Same problem. Check the cookies. It's setting the same one: register.prontonetworks.com FALSE /registration TRUE 0 JSESSIONID 0a0a0a4730d54b28d991910e4309a603ca5a1fbe4e94.e3yQbx4TbNeLe34Lb3mKchePbhn0n6jAmljGr5XDqQLvpAe register.prontonetworks.com FALSE /registration TRUE 0 JSESSIONID 0a0a0a4730d54b28d991910e4309a603ca5a1fbe4e94.e3yQbx4TbNeLe34Lb3mKchePbhn0n6jAmljGr5XDqQLvpAe Let's try deleting the cookie file. rm /tmp/cookiejar curl -K curlcfg "https://register.prontonetworks.com/registration/Main.jsp?wispId=5338&nasId=00:1b:24:78:ab:82&tempName=selAuth&orgUrl=&userMacId=00:23:69:b3:ce:65" -c /tmp/cookiejar It gave us the same cookie again: register.prontonetworks.com FALSE /registration TRUE 0 JSESSIONID 0a0a0a4730d5cfc25258927348bb8e5af08d27bdf765.e3yQbx4TbNeLe34Lb3mKchePbhn0n6jAmljGr5XDqQLvpAe Well, let's keep going: curl -K curlcfg https://register.prontonetworks.com/registration/customization/default/CheckValidUserToLogin.jsp -d "username=XXX&password=YYYYYY&changePassword=" -e "https://register.prontonetworks.com/registration/Main.jsp?wispId=5338&nasId=00:1b:24:78:ab:82&tempName=selAuth&orgUrl=&userMacId=00:23:69:b3:ce:65" -b /tmp/cookiejar This time it didn't return the session timeout message. I think maybe it's because I had my "-b" and "-c" confused on the commandline. -b is to read, -c is to write. Let's run the script again: ./onezone-renew.pl It did the same thing: die at ./onezone-renew.pl line 67. [.......] The renew wasn't working and so I logged in manually through my browser to try to see what was up. All I did was log in and the whole rig started working immediately. So... that means there's something's wrong with the onezone-login.sh script. It looks like that script isn't reading cookies, which is maybe the problem. This is awkward, because when the login doesn't work, the onezone-check script going straight to try to renew. Awkward, eh? So, I modified onezone-login.sh to get a cookie, and then send that cookie along with the login request. To the extent that my tests now are valid, it seems to be working. There's also the problem of multiple instances running. Fix this too!
This is a way to configure an OpenWRT router to connect in client mode to the OneZone network. I've tested it ONLY using whiterussian-rc5, on a Linksys WRT54GL and a Motorola WR850G.
Notes:
Steps:
vi /etc/ipkg.conf
src xwrt ftp://ftp.berlios.de/pub/xwrt/packages
ipkg update ipkg install microperl curl cd /sbin wget http://wirelesstoronto.ca/dist/om-checkin.pl wget http://wirelesstoronto.ca/dist/onezone-check.pl wget http://wirelesstoronto.ca/dist/onezone-login.sh wget http://wirelesstoronto.ca/dist/onezone-logout.sh chmod +x om-checkin.pl chmod +x onezone-check.pl chmod +x onezone-login.sh chmod +x onezone-logout.sh cd /etc wget http://wirelesstoronto.ca/dist/om-checkin.conf.pl ifconfig eth0
WARNING: auto-oz is still in development. the versions of these files on the server aren't the newest ones. If you're interested, contact Gabe.
vi /etc/om-checkin.conf.pl
crontab -e
*/2 * * * * /sbin/om-checkin.pl
ipkg install ntpclient cd /etc/init.d wget http://wirelesstoronto.ca/dist/S55ntpclient chmod +x /etc/init.d/S55ntpclient /etc/init.d/S55ntpclient echo EST5EDT,M3.2.0/02:00,M11.1.0/02:00 > /etc/TZ cd /etc/init.d cp S99done S99done.real rm S99done mv S99done.real S99done vi /etc/init.d/S99done
# start crond /usr/sbin/crond -c /etc/crontabs
mkdir /etc/crontabs touch /etc/crontabs/root ln -sf /etc/crontabs/root /etc/crontab /usr/sbin/crond -c /etc/crontabs vi /etc/crontab
0 * * * * /usr/sbin/ntpclient -l -h pool.ntp.org -i 5 -s
killall crond /usr/sbin/crond -c /etc/crontabs ipkg install openvpn mkdir /etc/openvpn cd /etc/openvpn wget http://wirelesstoronto.ca/dist/client.conf vi /etc/openvpn/client.conf
cd /etc/openvpn wget http://wirelesstoronto.ca/dist/ca.crt
chmod 600 client*.key cd /etc/init.d wget http://wirelesstoronto.ca/dist/S90openvpn chmod +x S90openvpn nvram set wl0_mode=sta nvram set lan_ifname=br0 nvram set lan_ifnames=vlan0 nvram set wan_ifname=eth1 nvram set lan_ipaddr=192.168.88.1 nvram set lan_proto=static nvram set wan_proto=dhcp nvram set wl0_ssid="One Zone_High Speed Internet" nvram commit reboot
vi /sbin/onezone-login.sh