cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Using cURL to Retrieve BugIDs from Cisco's Web Site

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 20 Oct 2008 16:21:13 -0700

On Mon, Oct 20, 2008 at 05:42:10PM -0500, Josh Anderson wrote:
> I am trying to retrieve BugID pages from Cisco's Web Site. For some
> reason, I am having trouble logging into the site to retrieve a link
> such as:
>
> http://tools.cisco.com/Support/BugToolKit/search/getBugDetails.do?method=fetchBugDetails&bugId=CSCsi78581
>
> Here is the current iteration I am using (I've tried numerious variations):
>
> curl -c cookies.txt -b cookies.txt -L -k -d
> "USER=usernamehere&PASSWORD=passwordhere&target=http://cisco.com/cgi-bin/login&smauthreason=0&smquerydata=&smagentname=zjGKGqr62shoVBG6cNUdYNajdKPzmOFLa/ZkeebT0+NV+EcoXFhv/vB8k65Cw/+x&postpreservationdata=&SMENC=ISO-8859-1&SMLOCALE=US-EN"
> "http://cisco.com/cgi-bin/login"
> "http://tools.cisco.com/Support/BugToolKit/search/getBugDetails.do?method=fetchBugDetails&bugId=CSCsi78581"
>
> All I get is the login page two times. I'm sure I am way off here, but
> if anyone has any suggestions I would greatly appreciate it. Thanks!

The line above is going to cause two POSTs to occur with the same
data--one to the login page and one to the bug page. You probably
need different data on both POSTs--one to log in and one to do the
retrieval. You also may need to do a GET on the login page first to
obtain a cookie before doing anything else.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2008-10-21