开发者

Submitting form on ASPX page with snoopy php class - problem with view state

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("/qqeaddgqradeap开发者_运维知识库oioq==");
$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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜