分析Gmail登陆界面的HTML代码
οnsubmit="return(gaia_onLoginSubmit());">
<td nowrap="nowrap">
<div align="right">
<span class="gaia le lbl">
用户名:
</span>
</div>
</td>
<td>
<input type="hidden" name="continue" id="continue"
value=" https://mail.google.com/mail/?ui=html&zy=l " />
<input type="hidden" name="service" id="service"
value="mail" />
<input type="hidden" name="rm" id="rm"
value="false" />
<input type="hidden" name="ltmpl" id="ltmpl"
value="default" />
<input type="hidden" name="hl" id="hl"
value="zh-CN" />
<input type="hidden" name="ltmpl" id="ltmpl"
value="default" />
<input type="hidden" name="ss" id="ss"
value="1" />
<input type="text" name="Email" id="Email"
size="18" value=""
class='gaia le val'
/>
</td>
</tr>
<tr>
<td></td>
<td align="left">
</td>
</tr>
<tr>
<td align="right">
<span class="gaia le lbl">
密码:
</span>
</td>
<td>
<input type="password"
name="Passwd" id="Passwd"
size="18"
class="gaia le val"
/>
</td>
</tr>
制作登陆Gmail的批处理文件
cmd /c start "" "https://www.google.com/accounts/ServiceLoginAuth?service=mail&rm=false&continue=https://mail.google.com/mail/?ui<mpl=default&hl=zh-CN&ss=1&Email=你的用户名&Passwd=你的密码"
用批处理登陆IP网关
分析IP网关登陆界面的HTML代码
<table >
<tr><td>
</tr>
<!--tr><td>超时检查(Timeout):</td>
<td><input type="radio" name="timeout" value="0" checked>20分钟(20 minutes) </td>
</tr-->
</table>
<tr align=center bgcolor="#ffdead" >
<td><font color="#ffffff">
<a href="javascript:connect()">
<font color="#9d271b">连接网络</font></a> |
<a href="javascript:disconnect()">
<font color="#9d271b">断开网络</font></a> |
<a href="javascript:disconnectall()">
<font color="#9d271b">断开全部连接</font></a>
</font></td>
</tr>
if ( thisform.uid.value == "" ) {
firstornot();
制作登陆IP网关的批处理文件
用批处理登陆126邮箱
分析登陆126邮箱界面的HTML代码
<form method="post" action="http://entry.126.com/cgi/login" name="form" onSubmit="return fCheck()">
<input name="domain" type="hidden" value="126.com" />
<input name="language" type="hidden" value="0" />
<input name="bCookie" type="hidden" value="" />
<input name="username" type="hidden" value="" />
<div class="ge" style="height:9px"></div>
<p class="MR_pinp"><span>用户名</span>
<input type="text" name="user" onMouseOver="fEvent('mouseover',this)" onFocus="fEvent('focus',this)" onBlur="fEvent('blur',this)" onMouseOut="fEvent('mouseout',this)" maxlength="20" tabindex="1"/>
<b class="m126" title="@126.com"></b></p>
<div class="ge"></div>
<p class="MR_pinp LH"><span>密 码</span>
<input onMouseOver="fEvent('mouseover',this)" onFocus="fEvent('focus',this)" onBlur="fEvent('blur',this)" onMouseOut="fEvent('mouseout',this)" name="password" type="password" size="16" tabindex="2" maxlength="20"/>
<a href="http://reg.163.com/RecoverPasswd1.shtml" target="_blank" style="margin-top:7px">忘记密码了?</a></p>
<div class="ge"></div>
<p class="MR_pinp LH"><span>版 本</span>
<select name="style" id="login_select">
<option value="-1" selected="selected"> 默 认 </option>
<option value="23"> 逍遥 3.0 </option>
<option value="21"> 极速 3.0 </option>
<option value="3"> 简约 3.0 </option>
</select>
var bOk = false;
var s = "";
var fm = document.form;
s = fm.style.value;
fm.user.value = fTrim(fm.user.value); //Trim the input value.
if(!fCheckCookie()){
return false;
}
if( fm.user.value =="") {
document.getElementById("error_div").innerHTML = "请输入你的用户名";
fm.user.focus();
return false;
}
document.getElementById("error_div").innerHTML = "请输入你的密码";
fm.password.focus();
return false;
}
var remUser = fm.remUser.checked?true:false;
/*
if( remUser){
fm.autocomplete="on";
}else{
fm.autocomplete="off";
}
*/
var secure = fm.secure;
var url;
if(secure.checked){
url = "https://reg.163.com/logins.jsp";
}else{
url = "http://reg.163.com/login.jsp";
}
url +="?type=1&product=mail126&url=http://entry.mail.126.com/cgi/ntesdoor?hid%3D10010102%26lightweight%3D1%26";
if( fm.secure.checked )
url += "verifycookie%3D1%26";
url += "language%3D0%26style%3D" + s ;
try{
var sMailSpeed = getCookie("mailspeed");
if(sMailSpeed){
url += "%26webname_prefix%3D"+sMailSpeed.split("_")[0];
}
}catch(exp){}
fm.action = url;
var ati = fm.user.value.indexOf( "@");
if( ati != -1 )
fm.user.value = fm.user.value.substring(0, ati);
visitordata.setVals( [fm.user.value,fm.style.value,fm.secure.checked?1:0 ], remUser );
visitordata.store();
if(!fm.remUser.checked){
setCookie('ntes_mail_noremember','true',true);
}
fm.username.value = fm.user.value + "@126.com";
return true;
}
从这里我们可以得到它是如何处理后然后提交给服务器的。是JavaScript代码,如果了解点JavaScript的话,就容易多了,关于JavaScript,你可以看一点相关的资料。我在这里就不多说了。
制作登陆126邮箱的批处理文件
start "" https://entry.mail.126.com/cgi/login?redirTempName=https.htm&hid=10010102&lightweight=1&verifycookie=1&language=0&style=21&user=用户名&pass=密码"
用批处理文件登陆Yeah邮箱
分析Yeah邮箱登陆界面的HTML代码
<input name="bCookie" type=hidden value="">
<!--登录模块 随机背景-->
<div class="iYH_mLogin iYH_Color1">
<h2 class="mTtl"><span class="iYH_Hide">登录@Yeah.net</span></h2>
<div class="mCon"><input type="hidden" name="username" / value="" >
<div class="User">用户名<input type="text" class="Ipt iptUser" οnmοuseοver="this.style.borderColor='#FFAC00'" name="user" size="20" οnmοuseοut="this.style.borderColor='#4C9131'" / value="" ><span class="iYH_FntAt">@</span><select id="selDomain"><option value="yeah.net" >yeah.net</option><option value="netease.com" >netease.com</option></select></div><div class="Psw">密 码<input type="password" class="Ipt iptPsw" οnmοuseοver="this.style.borderColor='#FFAC00'" name="password" size="20" οnmοuseοut="this.style.borderColor='#4C9131'" /><a href=" http://reg.163.com/RecoverPasswd1.shtml" class="iYH_FntFGPsw">忘记密码了?</a></div><div class="rmbUser"><input type="checkbox" class="Chk chkRmbUser" name="RmbUser" id="RmbUser" / ><label for="RmbUser">在此电脑上记住用户名</label></div>
</div>
</div>
</form>
<script language="JavaScript">fInitUser();</script>
制作登陆Yeah邮箱的批处理文件
用批处理登陆163邮箱
分析163邮箱登陆界面的HTML代码
<input name="verifycookie" type="hidden" value="1" />
<input type="hidden" name="style" id="txtStyle" value="34" />
<input type="hidden" id="product" name="product" value="mail163" />
<table border="0" cellspacing="0" class="login_table">
<tr>
<td class="login_table_text1">用户名</td>
<td class="login_table_text1_1"><input class="login_table_text1_input" type="text" name="username" onFocus="fEvent('focus',this)" onBlur="fEvent('blur',this)" onMouseOver="fEvent('mouseover',this)" onMouseOut="fEvent('mouseout',this)" maxlength="50" style="font-weight:bold; font-family:Verdana, Arial, Helvetica, sans-serif"/></td>
<td class="login_table_text1_img" title="@163.com"></td>
</tr>
<tr>
<td class="login_table_space1" colspan="3"></td>
</tr>
<tr>
<td class="login_table_text2">密 码</td>
<td class="login_table_text1_1"><input class="login_table_text1_input" type="password" name="password" onMouseOver="fEvent('mouseover',this)" onFocus="fEvent('focus',this)" onBlur="fEvent('blur',this)" onMouseOut="fEvent('mouseout',this)"/></td>
<td class="login_table_text2_2"> <a href="http://reg.163.com/RecoverPasswd1.shtml" target="_blank" title="找回密码" class="c_black">忘记密码了?</a></td>
</tr>
<tr>
<td class="login_table_space1" colspan="3"></td>
</tr>
<tr>
<td class="login_table_text2">版 本</td>
<td colspan="2">
<select class="login_table_select" name="selType" id="selType" style=" height:auto; font-family:Verdana, Arial, Helvetica, sans-serif; line-height:14px">
<option value="-1" selected="selected"> 默 认</option>
<option value="js"> 极速 3.0</option>
<option value="jy"> 简约 3.0</option>
</select>
</td>
</tr>
<tr>
<td class="login_table_space1" colspan="3"></td>
</tr>
<tr>
<td colspan="3"><div class="login_table_text2_1" style="width:210px;">
<input name="remUser" type="checkbox" id="remUsername" checked style="float:left" />
<span style=" float:left;margin-top:3px;*margin-top:5px"><label for="remUsername">记住用户名</label></span>
<input name="secure" type="checkbox" id="secure" checked style="float:left;margin-left:19px;" />
<span style=" float:left;margin-top:3px;*margin-top:5px"><label for="secure">SSL安全登录</label></span> <a href="http://help.163.com/08/1111/17/4QG2LL4R00752UPN.html" target="_blank"><img style=" display:inline; margin-top:2px;" src="http://mimg.163.com/index/new_2008/img/whyssl.gif" border="0" alt="什么是SSL登录" title="什么是SSL登录" />
</a>
</div></td>
</tr>
<tr>
<td class="login_table_space3" colspan="3"></td>
</tr>
<tr>
<td colspan="3"><input name="登录邮箱" title="登录邮箱" value="" type="submit" class="btn1" οnmοuseοver="this.className='btn2'" οnmοuseοut="this.className='btn1'" οnclick="setCookie('ntes_mail_firstpage','normal');saveLoginType();" />
var fm = window.document.login163;
var user = fm.username;
user.value = fTrim( user.value); //Trim the input value.
window.alert("/请输入您的用户名 ?");
user.focus();
event.returnValue = false;
return false;
}
window.alert("/请输入您的密码 ?");
fm.password.focus();
event.returnValue = false;
return false;
}
if( ati != -1 ){
user.value = user.value.substring(0, ati);
}
var secure = fm.remUser.checked?true:false;
var url = fm.secure.checked ? " https://reg.163.com/logins.jsp " : " http://reg.163.com/login.jsp ";
url += "?type=1&url=http://fm163.163.com/coremail/fcg/ntesdoor2?";
url += "lightweight%3D1%26verifycookie%3D1%26";
if(secure){
user.autocomplete="on";
}else{
user.autocomplete="off";
}
fGetVersion(fm);
fm.action = url + "language%3D-1%26style%3D" + fm.style.value;
visitordata.setVals( [fm.username.value,fm.style.value,fm.secure.checked?1:0 ], fm.remUser.checked);
visitordata.store();
if(!fm.remUser.checked){
setCookie('ntes_mail_noremember','true',true);
}
return true;
}