安全等级为Low
复制代码
<?php
header ("X-XSS-Protection: 0");
// Is there any input?
if( array_key_exists( "name", $_GET ) && $_GET[ 'name' ] != NULL ) {
// Feedback for end user
echo '<pre>你好 ' . $_GET[ 'name' ] . '</pre>';
}
?>
复制代码
直接在对话框中输入注入脚本
安全等级为Medium
复制代码
<?php
header ("X-XSS-Protection: 0");
// Is there any input?
if( array_key_exists( "name", $_GET ) && $_GET[ 'name' ] != NULL ) {
// Get input
$name = str_replace( '<script>', '', $_GET[ 'name' ] );
// Feedback for end user
echo "<pre>你好 ${name}</pre>";
}
?>
复制代码
此等级屏蔽了
<script>
标签