2

I am using snoopy to submit a form on a .aspx page of another website. I have grabbed all the headers/cookies and values from that form and passing it to the form with Snoopy. It is going to that however i am getting error of "viewstate" that is "Viewstate is invalid". I have copied the view state field from the form's source code and pass it as well. However, still it is giving same error.

Can anyone let me know how can i submit a form on that .aspx form. Below is the code i am using :

$snoopy->referer="http://www.URL.com/default.aspx";
$snoopy->agent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
$snoopy->rawheaders['Content-Type']="application/x-www-form-urlencoded"; 
$snoopy->rawheaders['Cache-Control']="private";
$snoopy->cookies['ASP.NET_SessionId']="adeqeteqerqrqqeq";


$submit_vars['__EVENTTARGET']="";
$submit_vars['__EVENTARGUMENT']=""; 
$submit_vars['__LASTFOCUS']="";
$submit_vars['__VIEWSTATE']=urldecode("/qqeaddgqradeapoioq==");
$submit_vars['__EVENTVALIDATION']=urldecode("/addafadfaerttq/aa/yqea");
$submit_vars['ctl00$ContentPlaceHolder1$lstc']="1";
$submit_vars['ctl00$ContentPlaceHolder1$lstm']="11";
$submit_vars['ctl00$ContentPlaceHolder1$lstce']="16";
$submit_vars['ctl00$ContentPlaceHolder1$lstt']="18289";
$submit_vars['ctl00$ContentPlaceHolder1$btnSad']="Submit";

$submit_url = "http://www.URL.com/Default.aspx";

$snoopy->submit($submit_url,$submit_vars);

Thanks

Zack
  • 505
  • 2
  • 4
  • 14
  • Sounds like you try to make a hack, automation of many submits. – Aristos Apr 11 '11 at 12:08
  • well, i am trying to get the search results. The owner of the website does not have any objection, neither he mentioned anything in TOS so it is legal to get the search results. – Zack Apr 11 '11 at 12:27

0 Answers0