douti9253 2017-03-31 19:44
浏览 261

在Apache中摧毁XSS攻击

So I want to create a basic form that is vulnurable to XSS for demo purposes. The code I've written looks like this

<html>
    <body>
        <h1>
            Enter your name
        </h1>
        <form action="xssDemo.php" method="post">
            <label> What is your name? </label>
            <input type="text" name="yourName" size="30">
            <input type="submit" name='Btn' value="Submit">
        </form>
        <?php
            if(isset($_POST["Btn"])) {
                echo "Hello " . $_POST["yourName"];
            }
        ?>
    </body>
</html>

The idea is for it to allow me to demo reflected XSS attacks by entering <script>alert("XSS")</script> However, Apache apparently has some built in security against XSS attacks as it filters my attack. How do I shut that off in Apache? Using XAMPP and Chrome if that matters.

Edit: Output is just "Hello "

  • 写回答

1条回答 默认 最新

  • douan3019 2017-04-02 19:26
    关注

    So I ran it in Internet Explorer and it works.

    评论

报告相同问题?

悬赏问题

  • ¥15 在获取boss直聘的聊天的时候只能获取到前40条聊天数据
  • ¥20 关于URL获取的参数,无法执行二选一查询
  • ¥15 液位控制,当液位超过高限时常开触点59闭合,直到液位低于低限时,断开
  • ¥15 marlin编译错误,如何解决?
  • ¥15 有偿四位数,节约算法和扫描算法
  • ¥15 VUE项目怎么运行,系统打不开
  • ¥50 pointpillars等目标检测算法怎么融合注意力机制
  • ¥20 Vs code Mac系统 PHP Debug调试环境配置
  • ¥60 大一项目课,微信小程序
  • ¥15 求视频摘要youtube和ovp数据集