cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Advice on curling a itrc.hp.com page

From: June Qiu <qljune_at_yahoo.com>
Date: Thu, 5 Jan 2006 01:00:20 -0800 (PST)

Seems like it is not as easy as i thgt...
  When I typed:
   
  curl -x AAA -U BBB -v -s -S -L -o a.html -b cookies -c cookies -d "F_USERID=CCC&F_PASSWORD=DDD&f_RememberMe=false" "https://www2.itrc.hp.com/service/ciss/doLogin.do?TargetPage=http://www2.itrc.hp.com/service/cki/docDisplay.do?docId=hpuxSecurityMatrix"
   
   
  I got:
  * Connection #0 left intact
curl: (52) Empty reply from server
* Closing connection #1
* Closing connection #2
* Closing connection #0
  

Ralph Mitchell <ralphmitchell_at_gmail.com> wrote: You'll need to find the line in a.html that contains

form name="loginform" method="POST" action="https://..........."

and extract the action url. That's the url you need to post back to.
You may also need to add "&f_RememberMe=false" (or =true), because
the server may expect to see it.

-s means silent - don't show progress meter or error messages
-S means do show error messages anyway, in spite of the -s

Assuming you're running this in a script, you won't want the progress
bar to be displayed...

Ralph

On 1/4/06, June Qiu wrote:
> yes. :) Theoretically, I should get that info at the very least. Then am I
> right to say that by adding -d "f_UserID=abc&f_Password=123" I should be
> able to curl in my desired page?
>
> ps. What is the -s and -S for?
>
> Ralph Mitchell wrote:
> When I try
>
> curl -v -s -S -L -o a.html -b cookies -c cookies
> "http://www2.itrc.hp.com/service/cki/docDisplay.do?docId=hpuxSecurityMatrix"
>
> I get 5 cookies and two redirects. The second redirect sends me back
> to www2.itrc.hp.com, but the url now has "admit=" and a bunch of
> numbers inserted. The inout fields in a.html include
>
> User ID or E-mail: input name=f_UserID
> Password: input name=f_Password
>
> There's also a "remember me" checkbox, some hidden fields and some
> associated with searchin! g for stuff.
>
> Is that about what you were expecting??
>
> Ralph Mitchell
>
>
> On 1/4/06, June Qiu wrote:
> > Well, no.
> > Just issued a simple command: curl -x AAA -U BBB -o "a.html" -A
> 'Mozilla/4.0
> > (compatible; MSIE 5.01; Windows NT 5.0)' -L
> >
> "http://www2.itrc.hp.com/service/cki/docDisplay.do?docId=hpuxSecurityMatrix"
> > Was expecting at least curl in the log-in page. But I got: HTTP/1.1 302
> > Moved Temporarily
> >
> >
> > Dan Fandrich wrote:
> >
> > On Tue, Jan 03, 2006 at 07:45:13PM -0800, June Qiu wrote:
> > > Hi,
> > > I am having some trouble curling in the page. Keeps being redirected. My
> > > curled results indicate that page has moved, but when i click the new
> new
> > > address, it is usually that of the curled address. Would appreciate any
> > help
> > > given:
> > >
> > >
> >
> http://www1.itrc.hp.com/service/cki/docDisplay.do?docId=hpuxSecurityMatrix
> >
> > Are you enabling cookies? Are you limiting the number of redirections?
> Both
> > those look like they could affect your results.
> >
> > >>> Dan
> > --
> > http://www.MoveAnnouncer.com The web change of address service
> > Let webmasters know that your web site has moved
> >
> >
> >
> >
> > ________________________________
> > Yahoo! DSL Something to write home about. Just $16.99/mo. or less
> >
> >
>
>
>
>
>
> ________________________________
> Yahoo! DSL Something to write home about. Just $16.99/mo. or less
>
>

                        
---------------------------------
Yahoo! Photos
 Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.
Received on 2006-01-05