[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: scripting lynx

Here's a script I use to make Orange (a phone company) send me a 
password reminder SMS message via their website when there is a network 
problem here.  The script is a rip off of some other script i found, 
it's written in python.  it will probably be easy enough to adapt for 
what you want.

My reason for using it in the first place was because I didn't want to 
have to pay Orange more money so i can send SMS messages via their 
website, but password reminders for the SMS service are free :)

Robert Davidson.

On Wed, Aug 01, 2001 at 06:11:34PM +0200, Olivier MACCHIONI wrote:
> At 18:08 01/08/01 +0200, Russell Coker wrote:
> >On Wed, 1 Aug 2001 00:33, Craig Sanders wrote:
> > > On Wed, Aug 01, 2001 at 12:17:20AM +0200, Russell Coker wrote:
> > > > I want to script lynx to post data to a web site and save the results.
> > > > I am using the --post_data option but have been unable to find
> > > > documentation on the format of data expected on standard input.
> >[...]
> > > or use the LWP modules to make yourself a web-bot.
> >
> >I may have to do that.  Thanks for the suggestions.
> wget and a few shell commands may do the trick too
> --  
> To UNSUBSCRIBE, email to debian-isp-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

import httplib, sys, time

# Trick Orange into sending me my password for my phone - Makes my phone beep!

### build the query string
qs = "devNum=xxxxxxxxxx"

### connect and send the server a path
httpobj = httplib.HTTP('www.orangemail.com.au', 8080)
httpobj.putrequest('POST', '/servlet/orangemail.CreatePassword')
### now generate the rest of the HTTP headers...
httpobj.putheader('Accept', '*/*')
httpobj.putheader('Connection', 'Keep-Alive')
httpobj.putheader('Content-type', 'application/x-www-form-urlencoded')
httpobj.putheader('Content-length', '%d' % len(qs))
### find out what the server said in response...
reply, msg, hdrs = httpobj.getreply()
if reply != 200:

Reply to: