码迷,mamicode.com
首页 > 其他好文 > 详细

xss

时间:2017-12-09 19:35:03      阅读:198      评论:0      收藏:0      [点我收藏+]

标签:enter   输出   form   http   action   iss   mode   char   xss   

<?php
header("X-XSS-Protection: 0; mode=block");
?>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>XSS利用输出的环境来构造代码</title>
</head>
<body>
<center>
    <h6>把我们输入的字符串 输出到input里的value属性里</h6>
    <form action="" method="get">
        <h6>请输入你想显现的字符串</h6>
        <input type="text" name="xss_input_value" value=""><br>
        <input type="submit">

<!--        输入  1231"><script scr=1.js"></script>-->
    </form>
    <hr>
    <?php
    $xss = $_GET[‘xss_input_value‘];
    if(isset($xss)){
        echo ‘<input type="text" value="‘.$xss.‘">‘;
    }else{
        echo ‘<input type="type" value="test" >‘;
    }
    ?>
</center>
</body>
</html>

  

xss

标签:enter   输出   form   http   action   iss   mode   char   xss   

原文地址:http://www.cnblogs.com/php-linux/p/8012072.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!