Jump to content

Curl aspx login postdata help


lordshoa

Recommended Posts

I am trying to login to a site with curl but not having much luck.

The page keep timing out so I do not get anything returned.

 

I need help with the postdata fields I think

I have __VIEWSTATE __EVENTVALIDATION added to the postdata urlencoded

Could some one help me out with the postdata the form imputs are below and the post data sent.

 

<form method="post" action="https://example.com/default.aspx?country=16&&CultureCode=&local_url=&MPSearchId=&Culture=en-GB&co=" id="LOGIN_FORM">
<input id="__VIEWSTATE" name="__VIEWSTATE">
<input id="__EVENTVALIDATION" name="__EVENTVALIDATION">
<input id="txID" name="txID" maxlength="10">
<input id="txUserName" name="txUserName" maxlength="120">
<input id="txDupPassword" name="txDupPassword" maxlength="20">
<input id="txPassword" name="txPassword" maxlength="30">
<input id="btImgSubmit" name="btImgSubmit">
<input id="btSubmit" name="btSubmit">
<input id="btReset" name="btReset">
<input name="Session_ID">
<input name="sessionid">
<input name="errorCode">
<input id="hdSavedSearch" name="hdSavedSearch">
<input id="hdProdIds" name="hdProdIds">
<input id="hdMPSearchId" name="hdMPSearchId">
<input id="hdDisplaytype" name="hdDisplaytype">
<input id="hdMode" name="hdMode">
<input id="hdProductid" name="hdProductid">
<input id="hdQuantity" name="hdQuantity">
<input id="hdBanner" name="hdBanner">
<input id="co" name="co">

 

Posted code from headers

POST /default.aspx?country=16&CultureCode=&local_url=&MPSearchId=&Culture=en-GB&cos= __VIEWSTATE=%2FOcAW0Gb3VZeNCu0Pyb6A%3D%3D&__EVENTVALIDATION=%2FwEWEQKelJO2DQKs&txID=12345678&txUserName=testuser&txDupPassword=Pass&txPassword=1234567890&btSubmit=LOG+IN&Session_ID=&sessionid=&errorCode=&hdSavedSearch=&hdProdIds=&hdMPSearchId=&hdDisplaytype=&hdMode=&hdProductid=&hdQuantity=&hdBanner=&co=

Link to comment
Share on other sites

Bit more info may help you to help me

 

> POST /default.aspx HTTP/1.1
Host: example.com
Accept: */*
Accept-Encoding: deflate, gzip
Content-Length: 1863
Content-Type: application/x-www-form-urlencoded
Expect: 100-continue

< HTTP/1.1 100 Continue
< HTTP/1.1 302 Found                                  <============= thsis line does not look good but why 302 ?
< Date: Wed, 18 Jul 2012 15:28:33 GMT
< Server: Microsoft-IIS/6.0
< P3P: CP="CAO PSA OUR"
< SRV: 33
< X-Powered-By: ASP.NET
< X-AspNet-Version: 4.0.30319
< Location: http://example.com/Error/ErrorPage.aspx?aspxerrorpath=/default.aspx
< Cache-Control: private
< Content-Type: text/html; charset=utf-8
< Content-Length: 193
* HTTP error before end of send, stop sending
<

Link to comment
Share on other sites

Looks like I am all alone on this one

 

Ok I got the page sort of working now but I am missing the values for the cookies they are not being set.

Any Ideas why they are not getting set ?

They are being posted ???

 

< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< Date: Thu, 19 Jul 2012 16:07:21 GMT
< Server: Microsoft-IIS/6.0
< P3P: CP="CAO OUR"
< SRV: 30
< X-Powered-By: ASP.NET
< X-AspNet-Version: 4.0
* Added cookie Culture_12="en-GB" for domain example.com, path /, expire 1343232441
< Set-Cookie: Culture_12=en-GB; expires=Wed, 25-Jul-2012 16:07:21 GMT; path=/
* Added cookie CustomID="" for domain example.com, path /, expire 1345392441
< Set-Cookie: CustomID=; expires=Sun, 19-Aug-2012 16:07:21 GMT; path=/
* Added cookie UserLogin="" for domain example.com, path /, expire 1345392441
< Set-Cookie: UserLogin=; expires=Sun, 19-Aug-2012 16:07:21 GMT; path=/
< Cache-Control: private
< Content-Type: text/html; charset=utf-8
< Content-Length: 18492

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.