POST登录51 网页数据分析
用抓包工具得到 POST的地址 HTTP://passport.51.com/login.5pPOST内容:passport_51_user=用户名&passport_51_password=密码&gourl=http%3A%2F%2Fmy.51.com%2Fwebim%2Findex.php%3Frefer%3D%2F&submit.x=22&submit.y=4
每次登录X和Y的值都在变化。。。
我找不到怎么得到X和Y的值
下面是部分网页源码
<div class="main">
<div class="left">
<div class="dl" style="display:none" id="divForOnLine">
<form>
<div class="dlti">欢迎登录</div>
<div class="dlnr"><div class="sbb">
<div class="dlh">用户名:<span id="divForOnLine_user"></span><br />昵称:<span id="divForOnLine_nick"></span><br /><br />
<a href='http://my.51.com/webim/index.php?refer=/'><input name="Submit2" type="button" value="进入管理中心" /></a> <a href='http://my.51.com/comm/logout.php'><input name="Submit" type="button" value="退出" /></a></div>
</div>
</div>
</form>
</div>
<!-- online -->
<div class="dlk" style="display:block" id="divForOffLine">
<script>
function check()
{
if(document.form1.passport_51_user.value=="")
{
alert("请输入用户名!");
document.form1.passport_51_user.focus();
return false
}
if((/[^a-zA-Z0-9_]/g.test(document.form1.passport_51_user.value)
|| /[^a-zA-Z]/g.test(document.form1.passport_51_user.value.substr(0,1))
)
&& !(/^\w+((-\w+)|(\.\w+))*\@+((\.|-)+)*\.+$/g.test(document.form1.passport_51_user.value))
)
{
alert("用户名只能用邮箱地址。\n或者用户名只能用数字或英文,并且必须为英文字母开头!");
document.form1.passport_51_password.focus();
return false;
}
if(document.form1.passport_51_password.value=="")
{
alert("请输入密码!");
document.form1.passport_51_password.focus();
return false
}
//document.form1.submit();
return true;
}
function check_username()
{
document.form1.passport_51_user.value = document.form1.passport_51_user.value.replace(/\s/g,"");
}
</script>
<form name="form1" action="http://passport.51.com/login.5p" method="post">
<div class="dl">
<div class="dlti">用户登录</div>
<div class="dlnr">
<div class="sbb">
<div>用户名:<input id="user_input" name="passport_51_user" class="dlin"/></div>
<div>密码:<input name="passport_51_password" type="password" class="dlin" /></div>
<div style="margin-top:10px;">
<input type="checkbox" value="1" name="passport_51_ishidden" />
<input type="hidden" name="gourl" value="http://my.51.com/webim/index.php?refer=/">
<span class="red">隐身</span>
<input name="submit" type="image" src="http://pic.51.com/i/www/v3/dl_btn.gif" align="middle" class="dlan" />
<a href="http://passport.51.com/reg.5p"><img src="http://pic.51.com/i/www/v3/register_btn.gif" align="middle" class="dlan" border="0" /></a>
</div>
<div class="gnq">
<a href="http://my.51.com/auth/passwordreset.php" >忘记密码</a><a href="javascript:void(0)" target="_blank">意见反馈</a></div> 动态的数据获取啊. 这个XY不用理会 原帖由 沦陷今生 于 2008-9-27 13:52 发表 http://bbs.locoy.com/images/common/back.gif
这个XY不用理会
为什么我登录不上
返回内容
<script language="javascript" type="text/javascript">
alert("不能频繁登录,请10分钟以后再试");
window.location.href = "http://www.51.com/";
</script>
而用网页登录就没事。。
用delphi写了个测试程序
源码如下:
procedure TForm1.Button1Click(Sender: TObject);
var
postList: TStrings;
begin
postList:= TStringList.Create;
postList.Add('psssport_51_user=musicpop');
postList.Add('psssport_51_password=82683653');
postList.Add('gourl=http%3A%2F%2Fmy.51.com%2Fwebim%2Findex.php%3Frefer%3D%2F&submit.x=22&submit.y=4');
Memo1.Text := idhttp1.POST('http://passport.51.com/login.5p',postList);
end;
IE登录抓包内容如下:
POST /login.5p HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-silverlight, application/QVOD, */*
Referer: http://www.51.com/
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; User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; http://bsalsa.com) ; User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; http://bsalsa.com) (Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)); .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Host: passport.51.com
Content-Length: 141
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: WK_musicpop=2785510; WO_musicpop=1222487456859; musicpopFriend=1222452691
passport_51_user=musicpop&passport_51_password=82683653&gourl=http%3A%2F%2Fmy.51.com%2Fwebim%2Findex.php%3Frefer%3D%2F&submit.x=22&submit.y=4 看看有没有人做51 网的发布模块哈/
页:
[1]