Using command line to connect to a wireless network with an http login

Solution 1:

Install Lynx in advance, and then use Lynx from the command line. Lynx is a text based browser.

Alternatively, you can try using wget or curl to get www.google.com and then analyse the HTTP file returned.

Solution 2:

You will have to look once at the source of the login form to find out the names of the user and password fields. As the authentication redirect all pages, use any URL to get that source:

curl http://www.google.com > login.html

For example, you'll find:

<form method="POST" action="http://my-public-provider.com/agree.php">
    <input type="checkbox" name="agree" value="yes">I agree
    <input type="submit" name="push" value="Send">
</form>

Another way is to use (on an other computer) a proxy such as Fiddler2 to see what is sent "over the wire" by the browser.

Then you can build your curl command to post your form information:

curl -d "agree=yes&push=Send" http://my-public-provider.com/agree.php

If you do not have curl, it is possible to write a simple HTTP client with a language you may have on the platform (Perl, Lua, Java...).