推荐关注
› 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 · 4161 views
    This topic created in 4231 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
    KCheshireCat
    Apr 6, 2015❤️1
    1
    添加一个cookie

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

    判断成立,跳转到根地址

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

    http://weibo.com/2128324340/CbKoioXYu

    应该是MCBBS服务出了点问题

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