标题:新手请教,如何用delphy获取这网的表单
只看楼主
gaoweiweiw
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2011-3-27
结帖率:0
已结贴  问题点数:10 回复次数:1 
新手请教,如何用delphy获取这网的表单
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>电信登录页</TITLE>
<META content="text/html; charset=GBK" http-equiv=Content-Type>
<STYLE type=text/css>BODY {
    COLOR: #000; FONT-SIZE: 14px
}
TD {
    COLOR: #000; FONT-SIZE: 14px
}
TH {
    COLOR: #000; FONT-SIZE: 14px
}
BODY {
    BACKGROUND-IMAGE: url(/portal/images/bg_new.jpg); MARGIN: 0px
}
.p9 {
    FONT-SIZE: 9pt
}
A:visited {
    COLOR: #0000ff; TEXT-DECORATION: none
}
A:link {
    COLOR: #0000ff; TEXT-DECORATION: none
}
A:hover {
    COLOR: #ff0000
}
.EditBox {
    BORDER-BOTTOM: #b7b7b7 1px solid; BORDER-LEFT: #b7b7b7 1px solid; PADDING-BOTTOM: 1px; PADDING-LEFT: 1px; PADDING-RIGHT: 1px; FONT-FAMILY: "Arial"; BACKGROUND: #ffffff; HEIGHT: 18px; COLOR: #003366; FONT-SIZE: 9pt; BORDER-TOP: #b7b7b7 1px solid; CURSOR: text; BORDER-RIGHT: #b7b7b7 1px solid; PADDING-TOP: 1px
}
.over {
    CURSOR: hand
}
.out {
   
}
</STYLE>

<SCRIPT>
var hex_chr = "0123456789abcdef";
function rhex(num)
{
  str = "";
  for(j = 0; j <= 3; j++)
    str += hex_chr.charAt((num >> (j * 8 + 4)) & 0x0F) +
           hex_chr.charAt((num >> (j * 8)) & 0x0F);
  return str;
}
function str2blks_MD5(str)
{
  nblk = ((str.length + 8) >> 6) + 1;
  blks = new Array(nblk * 16);
  for(i = 0; i < nblk * 16; i++) blks[i] = 0;
  for(i = 0; i < str.length; i++)
    blks[i >> 2] |= str.charCodeAt(i) << ((i % 4) * 8);
  blks[i >> 2] |= 0x80 << ((i % 4) * 8);
  blks[nblk * 16 - 2] = str.length * 8;

  return blks;
}

function add(x, y)
{
  var lsw = (x & 0xFFFF) + (y & 0xFFFF);
  var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
  return (msw << 16) | (lsw & 0xFFFF);
}
function rol(num, cnt)
{
  return (num << cnt) | (num >>> (32 - cnt));
}
function cmn(q, a, b, x, s, t)
{
  return add(rol(add(add(a, q), add(x, t)), s), b);
}
function ff(a, b, c, d, x, s, t)
{
  return cmn((b & c) | ((~b) & d), a, b, x, s, t);
}
function gg(a, b, c, d, x, s, t)
{
  return cmn((b & d) | (c & (~d)), a, b, x, s, t);
}
function hh(a, b, c, d, x, s, t)
{
  return cmn(b ^ c ^ d, a, b, x, s, t);
}
function ii(a, b, c, d, x, s, t)
{
  return cmn(c ^ (b | (~d)), a, b, x, s, t);
}
function calcMD5(str)
{
  x = str2blks_MD5(str);
  a =  1732584193;
  b = -271733879;
  c = -1732584194;
  d =  271733878;

  for(i = 0; i < x.length; i += 16)
  {
    olda = a;
    oldb = b;
    oldc = c;
    oldd = d;

    a = ff(a, b, c, d, x[i+ 0], 7 , -680876936);
    d = ff(d, a, b, c, x[i+ 1], 12, -389564586);
    c = ff(c, d, a, b, x[i+ 2], 17,  606105819);
    b = ff(b, c, d, a, x[i+ 3], 22, -1044525330);
    a = ff(a, b, c, d, x[i+ 4], 7 , -176418897);
    d = ff(d, a, b, c, x[i+ 5], 12,  1200080426);
    c = ff(c, d, a, b, x[i+ 6], 17, -1473231341);
    b = ff(b, c, d, a, x[i+ 7], 22, -45705983);
    a = ff(a, b, c, d, x[i+ 8], 7 ,  1770035416);
    d = ff(d, a, b, c, x[i+ 9], 12, -1958414417);
    c = ff(c, d, a, b, x[i+10], 17, -42063);
    b = ff(b, c, d, a, x[i+11], 22, -1990404162);
    a = ff(a, b, c, d, x[i+12], 7 ,  1804603682);
    d = ff(d, a, b, c, x[i+13], 12, -40341101);
    c = ff(c, d, a, b, x[i+14], 17, -1502002290);
    b = ff(b, c, d, a, x[i+15], 22,  1236535329);   

    a = gg(a, b, c, d, x[i+ 1], 5 , -165796510);
    d = gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
    c = gg(c, d, a, b, x[i+11], 14,  643717713);
    b = gg(b, c, d, a, x[i+ 0], 20, -373897302);
    a = gg(a, b, c, d, x[i+ 5], 5 , -701558691);
    d = gg(d, a, b, c, x[i+10], 9 ,  38016083);
    c = gg(c, d, a, b, x[i+15], 14, -660478335);
    b = gg(b, c, d, a, x[i+ 4], 20, -405537848);
    a = gg(a, b, c, d, x[i+ 9], 5 ,  568446438);
    d = gg(d, a, b, c, x[i+14], 9 , -1019803690);
    c = gg(c, d, a, b, x[i+ 3], 14, -187363961);
    b = gg(b, c, d, a, x[i+ 8], 20,  1163531501);
    a = gg(a, b, c, d, x[i+13], 5 , -1444681467);
    d = gg(d, a, b, c, x[i+ 2], 9 , -51403784);
    c = gg(c, d, a, b, x[i+ 7], 14,  1735328473);
    b = gg(b, c, d, a, x[i+12], 20, -1926607734);
   
    a = hh(a, b, c, d, x[i+ 5], 4 , -378558);
    d = hh(d, a, b, c, x[i+ 8], 11, -2022574463);
    c = hh(c, d, a, b, x[i+11], 16,  1839030562);
    b = hh(b, c, d, a, x[i+14], 23, -35309556);
    a = hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
    d = hh(d, a, b, c, x[i+ 4], 11,  1272893353);
    c = hh(c, d, a, b, x[i+ 7], 16, -155497632);
    b = hh(b, c, d, a, x[i+10], 23, -1094730640);
    a = hh(a, b, c, d, x[i+13], 4 ,  681279174);
    d = hh(d, a, b, c, x[i+ 0], 11, -358537222);
    c = hh(c, d, a, b, x[i+ 3], 16, -722521979);
    b = hh(b, c, d, a, x[i+ 6], 23,  76029189);
    a = hh(a, b, c, d, x[i+ 9], 4 , -640364487);
    d = hh(d, a, b, c, x[i+12], 11, -421815835);
    c = hh(c, d, a, b, x[i+15], 16,  530742520);
    b = hh(b, c, d, a, x[i+ 2], 23, -995338651);

    a = ii(a, b, c, d, x[i+ 0], 6 , -198630844);
    d = ii(d, a, b, c, x[i+ 7], 10,  1126891415);
    c = ii(c, d, a, b, x[i+14], 15, -1416354905);
    b = ii(b, c, d, a, x[i+ 5], 21, -57434055);
    a = ii(a, b, c, d, x[i+12], 6 ,  1700485571);
    d = ii(d, a, b, c, x[i+ 3], 10, -1894986606);
    c = ii(c, d, a, b, x[i+10], 15, -1051523);
    b = ii(b, c, d, a, x[i+ 1], 21, -2054922799);
    a = ii(a, b, c, d, x[i+ 8], 6 ,  1873313359);
    d = ii(d, a, b, c, x[i+15], 10, -30611744);
    c = ii(c, d, a, b, x[i+ 6], 15, -1560198380);
    b = ii(b, c, d, a, x[i+13], 21,  1309151649);
    a = ii(a, b, c, d, x[i+ 4], 6 , -145523070);
    d = ii(d, a, b, c, x[i+11], 10, -1120210379);
    c = ii(c, d, a, b, x[i+ 2], 15,  718787259);
    b = ii(b, c, d, a, x[i+ 9], 21, -343485551);

    a = add(a, olda);
    b = add(b, oldb);
    c = add(c, oldc);
    d = add(d, oldd);
  }
/*alert('a='+a+',rhex(a)='+rhex(a));
alert('b='+a+',rhex(b)='+rhex(b));
alert('c='+a+',rhex(c)='+rhex(c));
alert('d='+a+',rhex(d)='+rhex(d));
*/
  return rhex(a) + rhex(b) + rhex(c) + rhex(d);
}

function hextostring(temp){
        var r='';
        for(i = 0; i < temp.length/2; i ++){
            
            var t1=temp.substring(2*i,2*i+2);
            
            tchar=parseInt(t1,16);
            
            r=r+String.fromCharCode(tchar);
        }
        
        return r;
}
/*
str = '13';
str1='33626637623134373765383439336437';
var t=hextostring(str);
var t1=hextostring(str1);
var md5str=t+'8888'+t1;
alert(calcMD5(md5str).toLowerCase());
*/
</SCRIPT>

<SCRIPT>
function setMD5Passwd()
{


     if(document.portalForm.userid.value==""){
         alert("学生学号不允许为空");
         document.portalForm.userid.focus();
         return;
     }
     if(document.portalForm.passwd.value==""){
         alert("密码不允许为空");
          document.portalForm.passwd.focus();
         return;
     }
 
 //CHAP认证
    if (document.portalForm.auth_type.value=='CHAP')
    {
   
        str = document.portalForm.chal_id.value;
        str1=document.portalForm.chal_vector.value;
        var t=String.fromCharCode(parseInt(str,16));
        var t1=hextostring(str1);
        
        //alert(str);

        var md5str=t+document.portalForm.passwd.value+t1;
        document.portalForm.passwd.value=calcMD5(md5str).toLowerCase();
        //alert(calcMD5(md5str).toLowerCase());
    }
    document.portalForm.submit();
   
}
</SCRIPT>

<META name=GENERATOR content="MSHTML 8.00.7600.16722"></HEAD>
<BODY onload=javascript:document.portalForm.userid.focus();>
<DIV
style="POSITION: absolute; WIDTH: 575px; HEIGHT: 24px; TOP: 98px; LEFT: 568px">
<DIV
style="POSITION: relative; WIDTH: 574px; HEIGHT: 22px; TOP: 0px; LEFT: 0px">
<MARQUEE height=24 width=574 scrollAmount=5 scrollDelay=100><FONT
color=#ffffff><A href="http://121.33.233.149/portal/selfstop.html"
target=_blank>自助暂停宽带指引</A></FONT></MARQUEE></DIV></DIV>
<FORM method=post name=portalForm action=/portalAuthAction.do><INPUT
value=10.0.37.131 type=hidden name=wlanuserip> <INPUT value=GZSTXY type=hidden
name=wlanacname> <INPUT type=hidden name=chal_id> <INPUT type=hidden
name=chal_vector> <INPUT value=PAP type=hidden name=auth_type> <INPUT
type=hidden name=seq_id> <INPUT type=hidden name=req_id> <INPUT value=183.6.40.2
type=hidden name=wlanacIp> <INPUT value=internet type=hidden name=serivce>
<DIV align=center>
<TABLE border=0 cellSpacing=0 cellPadding=0 width=900>
  <TBODY>
  <TR>
    <TD background=http://121.33.233.149/portal/images/c1.jpg width=249>
      <TABLE border=0 cellSpacing=0 cellPadding=0 width=243 height=351>
        <TBODY>
        <TR>
          <TD width=28>&nbsp;</TD>
          <TD width=205>&nbsp;</TD>
          <TD width=10>&nbsp;</TD></TR>
        <TR>
          <TD height=80>&nbsp;</TD>
          <TD>&nbsp;</TD>
          <TD>&nbsp;</TD></TR>
        <TR>
          <TD height=21>&nbsp;</TD>
          <TD>&nbsp;</TD>
          <TD>&nbsp;</TD></TR>
        <TR>
          <TD>&nbsp;</TD>
          <TD height=30 align=middle>请输入账号(学号@域名或手机号)</TD>
          <TD>&nbsp;</TD></TR>
        <TR>
          <TD>&nbsp;</TD>
          <TD height=30 align=middle>账&nbsp;&nbsp;&nbsp;&nbsp;号&nbsp;<INPUT
            onkeydown="javascript:if(event.keyCode==13) setMD5Passwd();"
            id=userid class=EditBox name=userid></TD>
          <TD>&nbsp;</TD></TR>
        <TR>
          <TD>&nbsp;</TD>
          <TD height=30 align=middle>密&nbsp;&nbsp;&nbsp;&nbsp;码&nbsp;<INPUT
            onkeydown="javascript:if(event.keyCode==13) setMD5Passwd();"
            id=passwd class=EditBox type=password name=passwd></TD>
          <TD>&nbsp;</TD></TR>
        <TR>
          <TD height=50>&nbsp;</TD>
          <TD onmouseover="this.className='over'"
          onmouseout="this.className='out'"
          onclick=javascript:setMD5Passwd();>&nbsp;</TD>
          <TD>&nbsp;</TD></TR>
        <TR>
          <TD>&nbsp;</TD>
          <TD align=middle><FONT color=red>请登录成功修改初始密码</FONT></TD>
          <TD>&nbsp;</TD></TR></TBODY></TABLE></TD>
    <TD width=651><IMG border=0
      src="http://121.33.233.149/portal/images/c2.jpg" width=651 height=590
      useMap=#Map></TD></TR></TBODY></TABLE></DIV></FORM><MAP name=Map><AREA
  href="http://webmail8. shape=rect target=_blank
  coords=396,180,613,279><AREA href="http://elive. shape=rect
  target=_blank coords=395,290,614,392><AREA
  href="http://121.33.233.149/portalReceiveAction.do?wlanacname=GZSTXY&amp;wlanuserip=10.0.37.131&amp;wlanacip=192.168.1.2#"
  shape=rect coords=395,403,615,506><AREA
  href="http://121.33.233.149/portalReceiveAction.do?wlanacname=GZSTXY&amp;wlanuserip=10.0.37.131&amp;wlanacip=192.168.1.2#"
  shape=rect coords=254,60,306,87><AREA href="http://gd.
  shape=rect target=_blank coords=330,60,382,88><AREA
  href="http://121.33.233.149/portal/cjwt.html" shape=rect target=_blank
  coords=408,59,481,86><AREA
  href="http://121.33.233.149/portalReceiveAction.do?wlanacname=GZSTXY&amp;wlanuserip=10.0.37.131&amp;wlanacip=192.168.1.2#"
  shape=rect coords=408,61,409,64></MAP></BODY></HTML>
搜索更多相关主题的帖子: content 电信 
2011-03-27 00:53
s63943801
Rank: 2
等 级:论坛游民
帖 子:3
专家分:10
注 册:2011-3-4
得分:10 
不会,看看有人会不。
2011-04-02 11:37



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-334871-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017538 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved