eric@lucii.org on Wed, 19 Jun 2002 10:54:02 +0200


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

Re: [PLUG] capture browser request


Kyle:

Thanks.  Netcat is installed on my system so I gave it a shot.  Worked 
perfectly.  Now to see if I can understand LWP::UserAgent (I'm a perl head
but not a guru).

Eric

On Mon, Jun 17, 2002 at 12:04:31PM -0400, Kyle R . Burton wrote:
> > I'm not a web programmer - I have just enough knowledge to be dangerous.
> > Hopefully, somebody here can provide me with the clues to answer to this 
> > question!
> > 
---------------cut--------------
> > 
> > Any help greatly appreciated.
> 
> When doing my won web development, I've found netcat to be indespensible:
> 
>   http://www.bgw.org/tutorials/utilities/nc.php
> 
> The basic sequence of events I typicly use is to save the form to disk,
> add a <base href="http://that.site/path/to/page/";>, change the form action
> to point to localhost:8888, run "netcat -l -p 8888 < /dev/null", load
> the html page, from disk, into the browser and submit it.  Netcat should
> then capture the data that the browser would have sent to the remote system.
> 
> If the hidden variables change from request to request, you'll probably
> end up having to dynamicly fetch the page and then parse out the form 
> elements.  
> 
> If you're comfortable with Perl, have a look at LWP::UserAgent.  It's basicly
> a web browser that you can control from your Perl code.  There are other
> HTTP libraries for other langugaes as well (for Java, try HttpClient from
> the Apache Jakarta Commons project; for C/C++, try libghttp [comes with many
> linux distributions], httplib.py for Python [http://www.lyra.org/greg/python/httplib.py]).
> 
> 
> HTH
> 
> Kyle
> 
> -- 
> 
> ------------------------------------------------------------------------------
> Wisdom and Compassion are inseparable.
>         -- Christmas Humphreys
> mortis@voicenet.com                            http://www.voicenet.com/~mortis
> ------------------------------------------------------------------------------


-- 
# Eric Allan Lucas 
#-------------------
# Support Ken Krawchuk - Libertarian for Governor of Pennsylvania!
# Find out how YOU can help -> http://www.kenk.org     
#------------------- 

______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug