V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
KexyBiscuit
V2EX  ›  JavaScript

奇怪的 JavaScript

  •  
  •   KexyBiscuit · 2015-04-06 09:27:52 +08:00 via Android · 3007 次点击
    这是一个创建于 3306 天前的主题,其中的信息可能已经有所发展或是发生改变。
    访问 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 条回复    2015-04-06 09:57:05 +08:00
    KCheshireCat
        1
    KCheshireCat  
       2015-04-06 09:39:06 +08:00   ❤️ 1
    添加一个cookie

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

    判断成立,跳转到根地址

    不成立,就地刷新
    KexyBiscuit
        2
    KexyBiscuit  
    OP
       2015-04-06 09:45:48 +08:00 via Android   ❤️ 1
    @KCheshireCat 请问具体如何操作?
    KCheshireCat
        3
    KCheshireCat  
       2015-04-06 09:51:19 +08:00   ❤️ 1
    @KexyBiscuit

    http://weibo.com/2128324340/CbKoioXYu

    应该是MCBBS服务出了点问题

    (手滑点了感谢。。。。。。
    KexyBiscuit
        4
    KexyBiscuit  
    OP
       2015-04-06 09:57:05 +08:00 via Android
    @KCheshireCat 感谢x2,谢谢啦!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1121 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 82ms · UTC 22:57 · PVG 06:57 · LAX 15:57 · JFK 18:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.