最近在做一个网站的模拟登录程序 前段时间一直忙于做验证码 算是做好了
今天才正式登陆 发送了无数次的登录信息 一直增 改 就是登陆不了 总是提示错误
但是利用IE截获的HTTP封包来看 几乎都是一摸一样的...
这个是截获的IE封包
POST /app HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-silverlight, application/msword, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */*
Referer: ***
Accept-Language: zh-cn
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; QQDownload 1.7; TencentTraveler 4.0; Embedded Web Browser from: http://bsalsa.com/; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; CIBA)
Host: ***
Content-Length: 264
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: CHANNEL_JSESSIONID=Kc8GLn0Gvvn4Vl7sLjh5kN1nT5DZQknp1nXDRxch9GnTr5TYKncf!2134775339!730718407
service=direct%2F1%2FHome%2F%24Form&sp=S0&Form0=%24FormConditional%2Cblogin%2C%24FormConditional%240&%24FormConditional=T&%24FormConditional%240=F&select=%B8%F6%C8%CB%BF%CD%BB%A7&SERIAL_NUMBER=111222333&USER_PASSWD=123123&EFFICACY_CODE=2598&blogin=+%B5%C7%C2%BC+
以下是我发送出去的封包
POST /app HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Referer: ***
Accept: */*
User-Agent: GetBalance
Host: ***
Content-Length: 300
Cache-Control: no-cache
Cookie: CHANNEL_JSESSIONID=Kc3V7JTn32G0G6yj8KnyhYpRHvHp1gf9pX033l5WjZV6gRh75ZRn!-1722555788!2134775339
service=direct%2F1%2Ffeequery.FeeQuery%2F%24HHeader.%24GHHeader.%24Form&sp=S0&Form0=%24FormConditional%2Cblogin%2C%24FormConditional%240&%24FormConditional=T&%24FormConditional%240=F&select=%B8%F6%C8%CB%BF%CD%BB%A7&SERIAL_NUMBER=111222333&USER_PASSWD=123123&EFFICACY_CODE=1204&blogin=+%B5%C7%C2%BC+
几乎都无误 以前登陆的无数的网站 都还没有这么多头 这次一个一个的增加 加了这么多的头 居然还是不行
烦的狠 就用火狐打开看看 显示 "Components Head not exist" 我的IE可没有显示这个信息
联想到以前在邪八里面看到的文章 里面似乎提过User-Agent检测 是不是这个网站也增加了这个检测呢???
于是 在Post数据中在增加一行
pFile -> AddRequestHeaders("User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; QQDownload 1.7; TencentTraveler 4.0; Embedded Web Browser from: http://bsalsa.com/; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; CIBA)");
提交 居然显示成功了...
汗...
保留下来 以备不时之需
posted on 2009-09-01 10:19
李佳 阅读(1505)
评论(0) 编辑 收藏 引用 所属分类:
WIN32 应用开发