cURL / Mailing Lists / curl-users / Single Mail

curl-users

reading a form

From: Greg Martin <gmartin_at_gmartin.org>
Date: Tue, 28 Sep 2004 23:40:22 -0400

I'm in the process of converting a login page that uses javascript into a
curl post. As this is my first attempt of anything significant with curl ,
I imagine I'm in for a rought time <g>.

I captured the login page and used the netcat method to capture the posting.
of course there are unique value passed to the page with every login. The
first thing I need to due is capture these values to add to my outgoing post

So I assume first I'll have to download the form each time so as to capture
the unique value, then read the following:

<form name='loginform' method='POST'
action='/config/ls002r8/login.elm?selected=_

/app/artemisconfigserver/login.elm/26' target=''>
<input type=hidden name=nssredirect>
<input type="hidden" name="_actionName" >
<input type="hidden" name="_targetFullID" >

  <input type=hidden name=showpopup value="true" >
  <input type=hidden name=cookiepopupexpire value="604800" >
  <input type=hidden name=SIG value="82DB5B1F0B30FE2554E1A4D26BDEA360" >
  <input type=hidden name=NONCE value="7915345E0416002F" >

So the question I pose here is simple, can curl capture these for me or
should I use perl, python or some other script for this piece? I'm
supposing the latter as I'll need to capture these values then create the
curl command-line. Does this make sense?

(BTW, I have a Linksys WRT54GS an use the built-in OEMd parental control
software from netopia. I'm hoping to script the login so my linux server
can get logged in automatically)

\\Greg
Received on 2004-09-29