Bootstrap

渗透测试学习(1)

XSS

  • htmlspecialchars($name)
    函数把string中预定义的字符转换为html实体。
  • str_replace( '<script>', '', $name );
    把name中的<script>标签转换为空字符。可用<scr<script>ipt>绕过。
  • preg_replace( '/<(.*)s(.*)c(.*)r(.*)i(.*)p(.*)t/i', '', $name );无法用双写绕过。可用<img src=1 onerror=alert(/123/)>绕过。
;