V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
KexyBiscuit

奇怪的 JavaScript

  •  
  •   KexyBiscuit · Apr 6, 2015 via Android · 3667 views
    This topic created in 4050 days ago, the information mentioned may be changed or developed.
    访问 MCBBS 后反复自动刷新页面,源码只有这一行。

    <script type='text/javascript'>document.cookie='shieldval=defendShield- (IP地址);path=/';if (window.location.href.match(/defendShield/)){window.location.replace('/');}else{window.location.reload();}</script>

    IP 地址就是本机的外网地址,用了代理就是代理 IP,HTTP 代理和 SS 都试过了,问题照旧。PC、iPad 出现同样问题。

    现在完全搞不懂哪一层出了问题,按理说用了 SS 就不可能是 ISP 劫持,换设备登陆就排除了浏览器问题……
    4 replies    2015-04-06 09:57:05 +08:00
    KCheshireCat
        1
    KCheshireCat  
       Apr 6, 2015   ❤️ 1
    添加一个cookie

    然后判断你访问的地址有没有含一个关键词“defendShield” (这里代码写的很怪)

    判断成立,跳转到根地址

    不成立,就地刷新
    KexyBiscuit
        2
    KexyBiscuit  
    OP
       Apr 6, 2015 via Android   ❤️ 1
    @KCheshireCat 请问具体如何操作?
    KCheshireCat
        3
    KCheshireCat  
       Apr 6, 2015   ❤️ 1
    @KexyBiscuit

    http://weibo.com/2128324340/CbKoioXYu

    应该是MCBBS服务出了点问题

    (手滑点了感谢。。。。。。
    KexyBiscuit
        4
    KexyBiscuit  
    OP
       Apr 6, 2015 via Android
    @KCheshireCat 感谢x2,谢谢啦!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   958 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 20:20 · PVG 04:20 · LAX 13:20 · JFK 16:20
    ♥ Do have faith in what you're doing.