V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
MurphyL
V2EX  ›  问与答

求大神指点,访问百度、verycd、oschina 等网站出现 302,但是 ping 是没有问题的

  •  
  •   MurphyL · 2015-09-02 23:27:36 +08:00 · 4655 次点击
    这是一个创建于 3184 天前的主题,其中的信息可能已经有所发展或是发生改变。

    最近一段时间访问百度、 verycd 、 oschina 等网站出现 302 ,但是 ping 是没有问题的。不论是 WIFI 还是有线,无一不是 302...

    使用 fiddler2 抓包结果如下:

    edge 浏览器:

    GET http://www.baidu.com/index.php?tn=mswin_oem_dg HTTP/1.1
    Accept: text/html, application/xhtml+xml, image/jxr, */*
    Accept-Language: zh-Hans-CN,zh-Hans;q=0.8,en-US;q=0.5,en;q=0.3
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64 ) AppleWebKit/537.36 (KHTML, like Gecko ) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240
    Accept-Encoding: gzip, deflate
    DNT: 1
    Host: www.baidu.com
    Connection: Keep-Alive
    Cookie: BAIDUID=5347AAF194C48A498F6CA71A3B18F4E7:FG=1; BIDUPSID=5347AAF194C48A498F6CA71A3B18F4E7; PSTM=1438868195; BDRCVFR[bLbo9QmdyQn]=aeXf-1x8UdYcs; BD_LAST_QID=16798790746009251183
    
    HTTP/1.1 302 Moved Temporarily
    Date: Wed, 02 Sep 2015 15:22:40 GMT
    Content-Type: text/html
    Content-Length: 215
    Connection: Keep-Alive
    Set-Cookie: BDRCVFR[bLbo9QmdyQn]=aeXf-1x8UdYcs; path=/; domain=.baidu.com
    Set-Cookie: BD_LAST_QID=17768487627213785721; path=/; Max-Age=1
    P3P: CP=" OTI DSP COR IVA OUR IND COM "
    Location: https://www.baidu.com/index.php?tn=mswin_oem_dg
    Server: BWS/1.1
    X-UA-Compatible: IE=Edge,chrome=1
    
    <html>
    <head><title>302 Found</title></head>
    <body bgcolor="white">
    <center><h1>302 Found</h1></center>
    <hr><center>pr-nginx_1-0-244_BRANCH Branch
    Time : Mon Aug 24 14:55:36 CST 2015</center>
    </body>
    </html>
    

    chrome 浏览器:

    GET http://www.baidu.com/ HTTP/1.1
    Host: www.baidu.com
    Connection: keep-alive
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
    User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64 ) AppleWebKit/537.36 (KHTML, like Gecko ) Chrome/43.0.2357.134 Safari/537.36
    DNT: 1
    Accept-Encoding: gzip, deflate, sdch
    Accept-Language: zh-CN,zh;q=0.8
    Cookie: BAIDUID=0EC51BBDB390148A685AE8EB3B1D5884:FG=1; BIDUPSID=0EC51BBDB390148A685AE8EB3B1D5884; BDUSS=1JZZUstYnhoUkhCanZIT0ctY243R3pHMXN2ZEY3cURVQ1RBUHR0OTFybU90SXBWQVFBQUFBJCQAAAAAAAAAAAEAAAATSKgWTXVycGh5TAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI4nY1WOJ2NVM; PSTM=1432649891; ispeed_lsm=2; BD_UPN=12314753
    
    HTTP/1.1 302 Moved Temporarily
    Date: Wed, 02 Sep 2015 15:24:28 GMT
    Content-Type: text/html
    Content-Length: 215
    Connection: Keep-Alive
    Location: https://www.baidu.com/
    Server: BWS/1.1
    X-UA-Compatible: IE=Edge,chrome=1
    Set-Cookie: BD_LAST_QID=13215679850863398944; path=/; Max-Age=1
    
    <html>
    <head><title>302 Found</title></head>
    <body bgcolor="white">
    <center><h1>302 Found</h1></center>
    <hr><center>pr-nginx_1-0-244_BRANCH Branch
    Time : Mon Aug 24 14:55:36 CST 2015</center>
    </body>
    </html>
    
    13 条回复    2015-09-03 15:47:12 +08:00
    MurphyL
        1
    MurphyL  
    OP
       2015-09-02 23:44:35 +08:00
    ➜ ~ ping baidu.com
    PING baidu.com (220.181.57.217 ): 56 data bytes
    64 bytes from 220.181.57.217: icmp_seq=0 ttl=53 time=20.313 ms
    64 bytes from 220.181.57.217: icmp_seq=1 ttl=53 time=22.894 ms
    64 bytes from 220.181.57.217: icmp_seq=2 ttl=53 time=22.549 ms
    ^C
    --- baidu.com ping statistics ---
    3 packets transmitted, 3 packets received, 0.0% packet loss
    round-trip min/avg/max/stddev = 20.313/21.919/22.894/1.144 ms
    oott123
        2
    oott123  
       2015-09-02 23:52:41 +08:00 via Android
    改用 https 试试,目测运营商劫持。
    另外建议楼主改下密码, cookies 都暴露了~
    MurphyL
        3
    MurphyL  
    OP
       2015-09-03 00:01:49 +08:00
    @oott123 呃,没有意识到这一点。尴尬了,上不去...
    MurphyL
        4
    MurphyL  
    OP
       2015-09-03 00:06:20 +08:00
    @oott123 谢谢提醒,用非常手段改掉了~~
    Strikeactor
        5
    Strikeactor  
       2015-09-03 00:10:35 +08:00
    能 302 一般 ping 是肯定没问题的
    楼主补补基础知识吧。。
    datocp
        6
    datocp  
       2015-09-03 00:20:19 +08:00 via Android
    302 重定向早已经习惯,电信线路也经常需要刷新才能看到有些论坛新内容。网上到处是缓存服务器,不知道这些东东是否跟行为管理路由一样的是否会把密码也到处保存着,想想都觉得可怕。
    MurphyL
        7
    MurphyL  
    OP
       2015-09-03 00:22:05 +08:00
    @Strikeactor 啊,嗯,谢谢建议。对这些的确没什么概念~
    MurphyL
        8
    MurphyL  
    OP
       2015-09-03 00:29:52 +08:00
    @datocp 唉,一连好几天...不知道说什么好了~
    datocp
        9
    datocp  
       2015-09-03 00:55:42 +08:00 via Android
    这个问题应该属于无解状态,尝试按网上的教程封锁 302 服务器封得手软,关键像 wget 这种单线程工具立马不能工作,最终只能放弃,按流行的话讲这已经是新常态了。
    imn1
        10
    imn1  
       2015-09-03 01:49:12 +08:00   ❤️ 1
    GET http
    302 Location https
    插件或工具还是浏览器本身强制 SSL 吧?
    oott123
        11
    oott123  
       2015-09-03 08:14:58 +08:00 via Android
    @imn1 你说得好像正解,我还没注意看。
    这貌似不是劫持,而是百度的正常动作…
    MurphyL
        12
    MurphyL  
    OP
       2015-09-03 15:42:53 +08:00
    @imn1
    @oott123
    一开始我也这样怀疑,可是我几乎尝试了已安装的所有浏览器: ie 、 edge 、 chrome 、 ff ……即便换做室友( windows 、 mac )也是这个现象~~
    oott123
        13
    oott123  
       2015-09-03 15:47:12 +08:00
    @MurphyL 百度已经全线启用 https 了,所以百度这个应该是它自己做的。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2438 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 15:21 · PVG 23:21 · LAX 08:21 · JFK 11:21
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.