LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to automate html proxy login (http://www.linuxquestions.org/questions/linux-networking-3/how-to-automate-html-proxy-login-549212/)

thyrf 04-26-2007 11:34 AM

How to automate html proxy login
 
Hi,

at our residences we have wireless AP's that provide our internet. To access it we have to login with a provided username and password through an html form - not the standard http proxy you'd expect.

How can I/is it possible to automate this? It's a pain in the arse only being able to login through a gui web browser and not being able to run netinst installs.

Debian Etch
Wireless LAN (already set up to auto connect using dhcp)

Thanks.

acid_kewpie 04-27-2007 04:10 AM

if you just do the same thing each time, then yes it's possible able to be automatablifactionized. i'd suggest you have a look at curl and grab the page you need to log in to. it depends what basis your proxy uses to authenticate though.... if it's just connections from your IP it should be fine, if you're passing cookies around and such, could be trickier.

thyrf 04-28-2007 11:20 AM

Thanks, that seems to be the thing I'm after. Having problems following redirects (which I absolutely require) - apparently curl doesn't do that. Maybe the mailing list will help :)

acid_kewpie 04-29-2007 04:17 PM

depends what kind of a redirect it is. at the worst you can just hack the url out of the returned page and call it yourself.. you're already scripting it's just another step in the chain really. curl will follow the Location header in an http response (if it exists) with the -L option, but normaly that's a default AFAIK. if it's an informal META redirect or something then that's none of curl's business.


All times are GMT -5. The time now is 11:15 PM.