You are not logged in.

#1 2016-07-04 04:35:09

archfluke
Member
Registered: 2016-06-08
Posts: 39

login to public wifi hotspot using curl, elinks, or lynx

hello. Periodically, I will try to logon to a public hotspot with a portal with a computer that doesn't have a de, hence no access to browsers with a gui.  This portal will forcefully redirect any traffic or whatever to their site and I was wondering how I can login using curl.  The site that I'm redirected to is here, for instance:

http://www.elpolloloco.com/wifiPolicy?b … 0:d8:2h:2j

I had altered the mac id for privacy but I noticed that none of the links are clickable, and the one that says "accept and continue" is an anchor tag with javascript.  From what I've read, neither Lynx nor Elinks handles javascript and I was hoping for a quick and dirty way to simulate a mouseclick on that anchor tag, as I presumably that's all it takes to log in.  I tried looking up ways to do this with curl to no avail.  I read selenium works for this but the only package supported by the official arch repo is a server and by the time I found this, I was too exhausted to put in any more time researching whether it's that that I'm looking for or a selenium client.  Thanks.

Offline

#2 2016-07-04 17:04:05

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: login to public wifi hotspot using curl, elinks, or lynx

It might be enough to simply post the header data to the main website.

The javascript link uses the doAgreeAndContinue() function from http://www.elpolloloco.com/js/wifi_tos.js

...

I had a starbucks login script that just called:

wget -O /dev/null --post-data="mac=xx:xx:xx:xx:xx:xx&apname=xx:xx:xx:xx:xx:xx" http://sbux-portal.appspot.com/static/page2_nosdn.html

Not because I didn't have a DE, but because I really don't like having my saved tabs hijacked and lost like that. wink


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2016-07-05 08:23:45

archfluke
Member
Registered: 2016-06-08
Posts: 39

Re: login to public wifi hotspot using curl, elinks, or lynx

oh man. that's sweet!  Thank you so much. I'll try it out the next time I'm out and about!

Offline

Board footer

Powered by FluxBB