今天写一注册机时遇到猥亵的cookie设置。

来源:互联网 发布:js时间戳转换成天数 编辑:程序博客网 时间:2024/05/01 02:14

今天写一网站注册机时,用Wrieshark抓包分析以下页面:

1.打开注册页面,Response时没有设置cookie。

不过发现注册页面的HTML代码有可疑的东西(document.cookie='post_key=36fbd2d698440f6b2af73ccfe514520c):

这个东西获取验证码的时候也要用到的。

?
<div class="input">
    <label>验证码:</label><br>    <input class="J_Field code-input" maxlength="6" name="authcode" id="authcode" type="text" tabindex="5"><br>    <script src="http://xxxxxxxxxxxxx"><br>    </script><br>   <script>var d =new Date();d.setTime(d.getTime()+60*60*1000);<span style="color: #ff0000;">document.cookie='post_key=36fbd2d698440f6b2af73ccfe514520c</span>;.........</div>

2.提交数据时却发现了Cookie。

原来是提交数据时才设置cookie的,就是document.cookie='post_key=36fbd2d698440f6b2af73ccfe514520c了。如果您写注册机的时候发现突然有cookie了就得想想这方面的问题咯,呵呵。。。。

原创粉丝点击