模拟web方式登录qq邮箱,从输入帐号、密码、验证码、这我都通过了,所需的Cookie我取到了,就后关键一步,就是要转到邮箱主页地址时,不知道那里错了,死活不成功。
邮箱主页地址:http://m160.qq.com/cgi-bin/frame_html?sid=FC30wFC_C0z-ZEMM&r=5e2ef3029f1d7d16bb13e720d08e1723 就是读取这个地址时,死活不成功了,通过抓包,需要的cookie我都写入了,不知道为什么,请高手解答。(m160主机是TX分配的)
这是读取上面地址返回的内容,不知道错在那了。。。
<!--cgi exception--><!--cgierrorcode:-2--><!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb18030" /><script>window.gbIsNoCheck = true;</script>
<script type="text/javascript">
document.domain="qq.com";
function getTop()
{
var f=arguments.callee,w;
if(!f.t)
{try{w=window;f.t=w!=parent?(parent.getTop?parent.getTop():parent.parent.getTop()):w;}catch(e){f.t=w;}}
return f.t;
}
try{window.top=getTop();}catch(e){eval("var top=getTop();");}
var gsUsed="3";
window != getTop() && getTop().location.replace(window.location.href);
</script>
<script src="http://rescdn.qqmail.com/zh_CN/htmledition/js/all0db273.js" type="text/javascript"></script><title>QQ邮箱</title><style></style><script>
var bIsDiskPanelFrame = "" == "pannel";
( function() {
window.fsuccesss = "";
if (getTop().initPageEvent)
{
getTop().initPageEvent(window);
}
window.isMainFrameError = !getTop().getMainWin ||
getTop().getMainWin() == window || ( getTop() == window && !getTop().getMainWin );
if ( !isMainFrameError )
{
return ;
}
document.write( [
'<link rel="stylesheet" type="text/css" href="http://rescdn.qqmail.com/zh_CN/htmledition/style/comm20100d7ffa.css" />',
'<link rel="stylesheet" type="text/css" href="/cgi-bin/getcss?sid=skjbip6P0xei7Wkm&ft=skin" />'
].join( "" ) );
window.onerror = function(msg, url, line) {return true;};
window.onload = function()
{
setTimeout( function() {
document.body.backgroundColor = "#fff";
var oMsgText = getTop().S("msg_txt",window);
var _sMsg = getTop().trim(oMsgText.innerHTML);
var bHasHistory = history.length > 0 && getTop() != window;
var sCode = "";
if (bIsDiskPanelFrame)//QQ diskpanel
{
sCode = ['<center><div ><div >出错了</div><div >系统错误,您可以<a href="javascript:location.reload()">刷新恢复服务</a></div><div ><input type="button" onclick="history.back()" value="返回上一步" /></div></div></center>'];
}
else if(_sMsg)
{
sCode = [
'<center><div ><div >邮箱提示</div><div >',
'<div >',
_sMsg ? _sMsg : '可能因网络原因造成系统繁忙,服务暂时中断。', '<br><br><div >您可以尝试 ',
'<a href="javascript:;" onclick="location.replace(location.href.split(\x27#\x27)[0]);return false;" >刷新恢复服务</a> 。</div>',
'</div>',
'<div >',
bHasHistory ? '<input type=button value=" 返回上一步 " onclick="history.back();"></div>' : '<input type=button value="返回邮箱首页" onclick="getTop().goUrlTopWin(\'http://' + location.host + '/cgi-bin/frame_html?sid=skjbip6P0xei7Wkm&from=' + '\');">',
'</div>',
'</div>',
'</div></center>'
];
}
oMsgText.innerHTML = sCode.join("");
oMsgText.style.display = "block";
}, 20);
};
} )();
function SafeModeSwitchConfirm()
{
if(getTop().S("divSafeModeOn"))
{
return;
}
if(confirm("QQ邮箱正在进行系统维护,您必须进入只读模式才能继续使用邮箱。\n请注意:如果您目前正在写邮件或写记事,直接进入只读模式将可能导致数据丢失,请[取消]并手工保存您的数据"))
{
getTop().goUrlTopWin(getTop().location.href, true);
}
}
</script></head><body ><div code="-2"> <script>getTop().location.href="/cgi-bin/loginpage?s=session_timeout&from=&r=92acfbacfc8cf177b29ad12af33e7b1b";</script></div></body><script language="Javascript">
( function() {
var _oMainWin = getTop().getMainWin(),
_sMainWinLoc = _oMainWin.location.href,
_msgTxtObj = getTop().S("msg_txt", window),
_bIsShowVerifyFrame = (getTop().QMDialog && getTop().QMDialog("QMVerify"))|| typeof(bVerifycode)!="undefined";
if(!_msgTxtObj || getTop().trim && getTop().trim(_msgTxtObj.innerText || _msgTxtObj.textContent) == "[发送错误报告]")
{
return;
}
_msgTxtObj.innerHTML = getTop().filteScript( _msgTxtObj.innerHTML );
if (window["misslist"])
{
if (atype=="fw")
{
var infos = misslist;
}
else
{
var infos = _oMainWin.QMAttach.getInfoUid(misslist);
}
getTop().confirmBox( {
msg : getTop().TE(['以下%@%if(%type%=="fw")%@%附件提取失败%@%else%@%%len%个附件上传失败%@%endif%@%,请删除后重试:<br/>',
'%@%for(%list%)%@%',
'<span title="%name%">',
'%@%eval subAsiiStr(%name%,%_root_.width%,"...",1)%@%',
'</span>; ',
'%@%if(%_root_.len%<5)%@%<br/>%@%endif%@%',
'%@%endfor%@%'], '%').replace( {
type : atype,
len : infos.length,
width : infos.length < 5 ? 40 : 15,
list : infos
} ),
title : "失败信息",
confirmBtnTxt : "重试",
cancelBtnTxt : "取消",
onreturn : function(_abIsOk) {
if (_abIsOk)
{
_oMainWin.fireMouseEvent(_oMainWin.SN("sendbtn")[0], "click");
}
else
{
E(infos, function(_aoInfo) {
_oMainWin.delAttach(_aoInfo.id);
});
}
}
} );
}
else if (!_bIsShowVerifyFrame
&& !isMainFrameError
&& (_sMainWinLoc.indexOf("t=compose") != -1 )//|| _sMainWinLoc.indexOf("t=mail_list_groupsms")>-1)
&& "" != "autosave" && "" != "sms_notify")
{
getTop().msgBox((_msgTxtObj && _msgTxtObj.innerHTML) || "系统错误", "dialog", true, 0, "失败信息", window );
}
else if( !isMainFrameError ) {
if (!bIsDiskPanelFrame || window.name != "keepSession")
{
getTop().msgBox(null, fsuccesss, true, 5000, null, window);
}
}
try {
getTop().errorProcess(
getTop().extend({title : "cgi exception",appname : "frame_html",errcode: "-2",errmsg: " \x3cscript\x3egetTop().location.href=\x22/cgi-bin/loginpage?s=session_timeout\x26from=\x26r=92acfbacfc8cf177b29ad12af33e7b1b\x22;\x3c/script\x3e" },
{
winname : window.name,
winid : window.id
})
);
}
catch( e ){}
} )();
</script></html>
我也遇到相同的问题,请问楼主你解决了吗?