[PLUG] command line http authentication
kunalt at gmail.com
Sat Mar 7 23:40:35 PST 2009
On Sat, Mar 7, 2009 at 10:02 PM, Shridhar Daithankar
<ghodechhap at ghodechhap.net> wrote:
> On Sunday 08 March 2009 00:32:37 Pradeep Dalvi wrote:
>> You are probably looking for the script below.
>> 1. Open the login page in browser
>> 2. View the page source
>> 3. Find out form tag
>> 4. Check for input fields
>> 5. Get the form action url
>> 6. Fill in all <> fields below
>> 7. Add the script into crontab with some interval
> You sure all that is required?
>> P.S. Sometimes the input fields are combined/manipulated using
>> to be submitted & the final URL.
>> Please remember that you are trying simulate what browser does!
> True and that includes only one thing and that is posting a correct http
> request to a correct address. It may or may not include loading the login
> I recommend capturing packets to that server, find out what request is being
> sent and use some library/short program to replicate it.
> It could not work that simply, if each login page has random field names(to
> make sure one visits the login page), has a random cookie or some other kind
> of handshake.
> I doubt such complexities will be involved though.
This might sound stupid but have you checked if your ISP offers a
scriptable interface for logging in?
In any case, you can put your logging in script into the network
manager dispatcher folder (its /etc/NetworkManager/dispatcher.d/ on my
ubuntu box) so that it is invoked everytime NM notices that you have
More information about the plug-mail