Topic: Trouble getting through capture page workaround
Hello everybody.
Just got my first Chumby. Definitely won't be my last. But I first need to get past my capture page and log on. I saw the workaround on the wiki, but don't know how to change the script to work with my page. Here is a snippet from the source code.
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"><head><title>Vernier Secure Logon</title></head>
<body bgcolor="#ffffff" onload="document.forms.logonForm.username.focus(); document.forms.logonForm.javaworks.value = 1" scroll="auto">
<center>
<form method="post" enctype="application/x-www-form-urlencoded" name="logoffForm">
<p><table cellspacing="0" cellpadding="0" border="0" width="500">
<tr><td align="center" colspan="3"><a href="http://www-no.ucsd.edu"><img src="/locations/UCSD Logon/custom_logo_1_1.gif" border="0" alt="Vernier Networks, Inc."></a></td></tr>
<tr><td colspan="3" height="5"><img src="/dot-clear.gif" border="0" width="1" height="5"></td></tr>
<tr><td colspan="3"><img src="/dot-black.gif" border="0" width="100%" height="1"></td></tr>
<tr><td colspan="3" height="5"><img src="/dot-clear.gif" border="0" width="1" height="5"></td></tr>
<tr><td align="center"><font size="2" color="#000000" face="arial,helvetica,sans-serif">You are not logged on.</font><P></td></tr></table>
</form>
<font size="2" color="#000000" face="arial,helvetica,sans-serif"><HR>
<p>
<strong><font color=Red>
This wireless service is not secure. You must protect sensitive transmissions,
including passwords,
with additional encryption using SSL, SSH, or VPN.
</font></strong>
<HR>
<P>
<P>
</font>
<form method="post" action="https://wireless-cs2.ucsd.edu:443/logon" enctype="application/x-www-form-urlencoded" name="logonForm">
<INPUT name=query_string type=hidden value=""><INPUT name=javaworks type=hidden value=0>
<INPUT name=vernier_id type=hidden value="VernierNetworks">
<INPUT name=product_id type=hidden value="VNSS">
<INPUT name=releast_id type=hidden value="1.0">
<INPUT name=logon_status type=hidden value="0">
<INPUT name=guest_allowed type=hidden value="0">
<INPUT name=realm_required type=hidden value="0">
<INPUT name=secret type=hidden value="ae77980453865a03a86febc4faa66014c16da1428bcad6e844d86c954d6c646005dfcbdf44431136003ee4a5bdc98a3d">
<INPUT name=verify_vernier type=hidden value="57604d4d20b6364a0d011f934ceac909">
<font face="arial,helvetica,sans-serif"><table cellspacing="0" cellpadding="1" border="0" width="500" bgcolor="#666699"><tr><td><table cellspacing="0" cellpadding="5" border="0" width="100%"><tr><td align="center" bgcolor="#666699"><font size="4" color="#ffffff"><b>Registered Users</b></font></td></tr><tr><td align="center" bgcolor="#ffffff"><table cellspacing="0" cellpadding="2" border="0"><tr align="right"><td><font size="2">Username:</font></td><td><font size="2"><input type="text" name="username" size="15"></font></td></tr><tr align="right"><td><font size="2">Password:</font></td><td><font size="2"><input type="password" name="password" size="15"></font></td></tr></table></td></tr><tr><td align="center" bgcolor="#ffffff"><input name="logon_action" type="submit" value="Logon User"></td></tr></table></td></tr></table><p></font>
</form>
<p>
<font size="1" face="arial,helvetica,sans-serif">Copyright © 2001-2006 Vernier Networks, Inc. All rights reserved.</font>
</center>
</body></html>
Any help on how I should change the script would be hugely appreciated.
#!/bin/sh
# bind to wifi network...replace "mysid" with the ESSID
iwconfig rausb0 essid "mysid"
# DHCP config; should be pretty standard
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0
# this outputs your IP address from the dhcp connect...you may need it (I did)
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;
fbwrite "$IP"
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.12.44.66" https://10.34.23.27/login.pl`;
## if you need further debugging, uncomment the next line
fbwrite "$OP"
Joseph