当前位置:WooYun(白帽子技术社区) >> Web服务器 >> 一款12306辅助购票插件,使得github的服务受到影响

一款12306辅助购票插件,使得github的服务受到影响

horseluke (微碌) | 2013-01-15 19:10

见github运维给12306_ticket_helper(一款用于辅助在12306.CN上购票的Chrome&Firefox脚本)的issue:https://github.com/iccfish/12306_ticket_helper/issues/16

jnewland opened this issue 6 hours ago
raw.github.com embeds disabled
No milestone
No one is assigned
Hi, I'm @jnewland, a member of GitHub's Ops Team.

We've detected that https://dynamic.12306.cn/otsweb/ is embedding several javascript files from this repo, causing a negative impact on our service. We've disabled hotlinking to resources from this repo via the raw.github.com domain for the time being.

I've contacted [email protected] about this, but figured I'd file an issue here too. If you're a developer on 12306.cn, please remove this embed and host this file from your own servers as soon as possible. Thanks!


大意是,github的运维发现来自https://dynamic.12306.cn/otsweb/的页面,内嵌了几个来自12306_ticket_helper项目库的脚本文件,导致github的服务出现负面影响。当前解决方法是暂时屏蔽从raw.github.com访问这几个脚本。

有意思的是,运维以为这个库是12306.cn的开发者,请求尽快删掉内嵌的内容。

iccfish commented 5 hours ago
Sorry for this inconvenience, I will remove this script reference immediatly. This script used for check new version from repositiory, from now on this script will be removed, and will never do this agagin after they all update they client scrips.
Very sorry for this.


该脚本作者回应是说,这个脚本本意是用于提醒升级的,现在已经移除。

后面还有数个运维请求和应急调整情况,以及作者对这个问题的解释:在设计上,若脚本载入失败(http 40x)后,会5秒重试一次,结果惹祸。

具体见issue。

微博的评论是“看来以后要ddos什么网站,做个12306的插件就行了。”(http://weibo.com/1686211971/zeAYQhQTn

有预感各种云会成为潜在灾区...

分享到:
  1. 1#
    回复此人 感谢
    斯文的鸡蛋 (顿时我就傻逼了) | 2013-01-15 19:13

    云怎样怎样好只是厂商在那吹牛逼罢了,安全不过关神马都是浮云

  2. 2#
    回复此人 感谢
    horseluke (微碌) | 2013-01-15 19:15

    附上作者的更新:
    https://github.com/iccfish/12306_ticket_helper/commit/eaa4e00c6845972f141d98a8a599f88fb25edbda

    update_1.JPG

  3. 3#
    回复此人 感谢
    horseluke (微碌) | 2013-01-15 20:41

    12306_ticket_helper.user.js代码追踪:

    最早此插件作者,是将升级版本文件放在自己的服务器上。

    “2012年5月26日:第一次完整发布”
    https://github.com/iccfish/12306_ticket_helper/commit/f06d22cb10064abe9368f10772ab86a5e4fa7162
    //#region 检查更新
    function checkUpdate() {
        if (isFirefox) {
            if (typeof (GM_xmlhttpRequest) == "undefined") return;
            var request = GM_xmlhttpRequest({
                url:"http://em.tiande.com/fish/44.txt",
        ......(略)

    }

    function updateScriptContentForChrome() {
        var updateScipt = document.createElement('script');
        updateScipt.src = 'http://em.tiande.com/fish/44.js?' + Math.random();
         ......(略)
    }




    到了2012年8月份,作者为了避免浏览器的安全限制,开始将repo当作静态服务器使用。


    “8月23日,3.0.6”
    “修改检查更新所使用的地址,避免出现不安全脚本不让更新的问题”
    https://github.com/iccfish/12306_ticket_helper/commit/3906ed2301e94b93dc795d84eff96dd1670a967a
    function updateScriptContentForChrome() {
       var updateScipt = document.createElement('script');
    -  updateScipt.src = 'http://www.fishlee.net/file/44/version.js?' + Math.random();
    +  updateScipt.src = 'https://github.com/iccfish/12306_ticket_helper/raw/master/version.js?' + Math.random();
         ......(略)
    }



    “2012年9月13日,3.2.9, 彻底修正登录人多时自动重试过快的问题;修改默认音乐地址,避免浏览器安全设置导致没有音乐;”
    https://github.com/iccfish/12306_ticket_helper/commit/c6c4e566d5818987a647ce45b575414e3727ab7e
    getAudioUrl: function () {
         /// <summary>获得音乐地址</summary>    
    -    return window.localStorage["audioUrl"] || "http://www.w3school.com.cn/i/song.ogg";
    +    return window.localStorage["audioUrl"] || "https://github.com/iccfish/12306_ticket_helper/raw/master/res/song.ogg";
    },



    2012年9月,开始直接将repo当作静态服务器使用。

    “2012-9-18,允许禁用自动登录改用手动登录”
    https://github.com/iccfish/12306_ticket_helper/commit/83ca4de0d542b317a4adf91b36931ea0dfd7bdb4
    function updateScriptContentForChrome() {
       var updateScipt = document.createElement('script');    
    -  updateScipt.src = 'https://github.com/iccfish/12306_ticket_helper/raw/master/version.js?' + Math.random();
    +  updateScipt.src = 'https://github.com/iccfish/12306_ticket_helper/raw/master/version.js';
         ......(略)
    }




    “2012年9月19日:3.4.0 released.”
    https://github.com/iccfish/12306_ticket_helper/commit/b707e6d3dec5f370e42c94eef885faf4d0fef895
    12306_ticket_helper.user.js
    getAudioUrl: function () {
         /// <summary>获得音乐地址</summary>   
    -    return window.localStorage["audioUrl"] || "https://github.com/iccfish/12306_ticket_helper/raw/master/res/song.ogg";
    +    return window.localStorage["audioUrl"] || (navigator.userAgent.indexOf("Firefox") != -1 ? "https://github.com/iccfish/12306_ticket_helper/raw/master/res/song.ogg" : "http://www.w3school.com.cn/i/song.ogg");
    },



    “2012年9月20日:添加音乐资源”
    https://github.com/iccfish/12306_ticket_helper/commit/9b89ea54540498c137a21bda3cbc1f2537062580
    (这个......有点凶残啊......)



    “2012年9月20日:项目重新组织结构”
    https://github.com/iccfish/12306_ticket_helper/commit/c307219a897269a66d082183add6d40ea581017c
    getFailAudioUrl: function () {
        return (utility.isWebKit() ? "http://resbak.fishlee.net/res/" : "https://github.com/iccfish/12306_ticket_helper/raw/master/res/") + "music3.ogg";
      },

    ......

    function updateScriptContentForChrome() {
      var updateScipt = document.createElement('script');
      updateScipt.src = 'https://github.com/iccfish/12306_ticket_helper/raw/master/version.js';
         ......(略)
    }




    与此同时,作者还与数个国产浏览器(淘宝浏览器、猎豹浏览器)合作,进行特别版本制作。相关的文件仍然放在resp下面。

    而这些浏览器针对节日,对捆绑此插件的浏览器进行特别主推,比如2013年1月14日前后,猎豹浏览器以春运为时机进行主推(http://12306.liebao.cn/ ),从而客观上助长了悲剧的发生

  4. 4#
    回复此人 感谢
    horseluke (微碌) | 2013-01-15 20:42

    在这里,呼吁搞前端的不要把版本库(repo)当作静态文件服务器来使用,这就是一个很好的反例

  5. 5#
    回复此人 感谢
    xslidian (.) | 2013-01-15 20:55

    github 尽可能为用户提供便利,所有高开销操作均不作限制不设缓存。可这次不但付费用户受影响造成损失,还要被不明事理的人辱骂单方面违背服务条款。免费基础服务来之不易,大家要好好珍惜!

  6. 6#
    回复此人 感谢
    0ps | 2013-01-15 21:00

    我就是用这个插件搞到的票。没这插件还真难买!

  7. 7#
    回复此人 感谢
    CHForce (带马师) | 2013-01-15 21:33

    呵呵。不得比说12306的服务器压力。国人抢票的热潮,连github 都受不了了,更多网页和资源计算的12306 ,能扛得住吗?

  8. 8#
    回复此人 感谢
    Mujj (为何我的眼中饱含泪水?因为我装逼装的深沉) | 2013-01-15 21:36

    @CHForce 剑心最近在谈12306地区代理的项目,如果成功了相信会缓解买票难的问题

  9. 9#
    回复此人 感谢
    CHForce (带马师) | 2013-01-15 22:43

    @Mujj 嘿嘿。真的 假的......1WB一张票 >_<!!!

  10. 10#
    回复此人 感谢
    Clar | 2013-01-16 09:02

    @Mujj 希望是真的。

  11. 11#
    回复此人 感谢
    斯文的鸡蛋 (顿时我就傻逼了) | 2013-01-16 09:14

    @Mujj 校长这是真的么?求内幕

  12. 12#
    回复此人 感谢
    斯文的鸡蛋 (顿时我就傻逼了) | 2013-01-16 09:14

    @Mujj 我现在回家过年都成问题,苦逼~

  13. 13#
    回复此人 感谢
    c4bbage (天津 祈福) | 2013-01-16 09:14

    @Mujj 淘宝好像也在入手这个

  14. 14#
    回复此人 感谢
    GaRY | 2013-01-16 11:34

    这github原帖子见一次笑一次

  15. 15#
    回复此人 感谢
    horseluke (微碌) | 2013-01-16 12:12

    @GaRY 据SAE同事在上面的留言,转移到SAE上后的https请求数半天5万。

    作者回复我说,放到github主要是为了绕开https的各种限制,对前端有了解各位的应该如何评价?

  16. 16# 感谢(1)
    回复此人 感谢
    GaRY | 2013-01-16 12:20

    @horseluke 我觉得,主要问题应该不是github收到流量多少导致ddos的问题,主要是github本身是代码库,需要有一定背后操作,不只是静态文件server这么简单.同时最基本的,这违反了github的策略,虽然不是很大,但是也会影响到github提供服务的本意,更何况作者那个5秒轮训的坑爹机制

    关于https的限制问题,这个没啥好评价的,chrome这么做也算是提高了一定门槛,只是他这个case正好各种巧合在一起了.

  17. 17#
    回复此人 感谢
    horseluke (微碌) | 2013-01-16 12:33

    @GaRY 嗯,后面都成水贴了。连google工程师等也来观摩了:
    http://weibo.com/1833043614/zeInXkMC5

    6d42069ejw1e0vaajs79ij.jpg

  18. 18#
    回复此人 感谢
    horseluke (微碌) | 2013-01-16 12:38

    最新情况,该repo被删除或转为私有,目前公开渠道已经不可访问

  19. 19#
    回复此人 感谢
    GaRY | 2013-01-16 12:44

    @horseluke 最后一句亮了,哈哈

  20. 20#
    回复此人 感谢
    无敌L.t.H (‮……天百一爱恋考高:簿相色白产国) | 2013-01-16 13:16

    让网宿提供一个CDN放吧

添加新回复

登录 后才能参与评论.

WooYun(白帽子技术社区)

网络安全资讯、讨论,跨站师,渗透师,结界师聚集之地

登录

其它内容

  • 暂无