Add files via upload
This commit is contained in:
parent
b5449375c3
commit
c234c394e5
4331
JS/cheerio.min.js
vendored
4331
JS/cheerio.min.js
vendored
File diff suppressed because one or more lines are too long
1361
JS/crypto-hiker.js
1361
JS/crypto-hiker.js
File diff suppressed because it is too large
Load Diff
1376
JS/crypto-js.js
1376
JS/crypto-js.js
File diff suppressed because it is too large
Load Diff
75
JS/drpy2.js
75
JS/drpy2.js
@ -5,7 +5,9 @@ import './node-rsa.js';
|
||||
import './pako.min.js';
|
||||
// import JSEncrypt from './jsencrypt.js'; // 会导致壳子崩溃的
|
||||
import 模板 from './模板.js'
|
||||
import { gbkTool } from './gbk.js'
|
||||
import {
|
||||
gbkTool
|
||||
} from './gbk.js'
|
||||
import './json5.js'
|
||||
// 下面是尝试对jinja2库进行更换
|
||||
import './jinja.js'
|
||||
@ -450,7 +452,8 @@ function window_b64() {
|
||||
*/
|
||||
if (typeof atob !== 'function' || typeof btoa !== 'function') {
|
||||
var {
|
||||
atob, btoa
|
||||
atob,
|
||||
btoa
|
||||
} = window_b64();
|
||||
}
|
||||
|
||||
@ -829,7 +832,8 @@ function Utf8ArrayToStr(array) {
|
||||
char2 = array[i++];
|
||||
char3 = array[i++];
|
||||
out += String.fromCharCode(
|
||||
((c & 0x0f) << 12) | ((char2 & 0x3f) << 6) | ((char3 & 0x3f) << 0));
|
||||
((c & 0x0f) << 12) | ((char2 & 0x3f) << 6) | ((char3 & 0x3f) << 0)
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -3103,36 +3107,39 @@ function getOriginalJs(js_code) {
|
||||
}
|
||||
|
||||
let decode_funcs = [
|
||||
(text) => {
|
||||
try {
|
||||
return ungzip(text)
|
||||
} catch (e) {
|
||||
logger('非gzip加密');
|
||||
return ''
|
||||
}
|
||||
}, (text) => {
|
||||
try {
|
||||
return base64Decode(text)
|
||||
} catch (e) {
|
||||
logger('非b64加密');
|
||||
return ''
|
||||
}
|
||||
}, (text) => {
|
||||
try {
|
||||
return aes_decrypt(text)
|
||||
} catch (e) {
|
||||
logger('非aes加密');
|
||||
return ''
|
||||
}
|
||||
}, (text) => {
|
||||
try {
|
||||
return RSA.decode(text, rsa_private_key, null)
|
||||
} catch (e) {
|
||||
logger('非rsa加密');
|
||||
return ''
|
||||
}
|
||||
},
|
||||
// (text)=>{try {return NODERSA.decryptRSAWithPrivateKey(text, RSA.getPrivateKey(rsa_private_key).replace(/RSA /g,''), {options: {environment: "browser", encryptionScheme: 'pkcs1',b:'1024'}});} catch (e) {log(e.message);return ''}},
|
||||
(text) => {
|
||||
try {
|
||||
return ungzip(text)
|
||||
} catch (e) {
|
||||
logger('非gzip加密');
|
||||
return ''
|
||||
}
|
||||
},
|
||||
(text) => {
|
||||
try {
|
||||
return base64Decode(text)
|
||||
} catch (e) {
|
||||
logger('非b64加密');
|
||||
return ''
|
||||
}
|
||||
},
|
||||
(text) => {
|
||||
try {
|
||||
return aes_decrypt(text)
|
||||
} catch (e) {
|
||||
logger('非aes加密');
|
||||
return ''
|
||||
}
|
||||
},
|
||||
(text) => {
|
||||
try {
|
||||
return RSA.decode(text, rsa_private_key, null)
|
||||
} catch (e) {
|
||||
logger('非rsa加密');
|
||||
return ''
|
||||
}
|
||||
},
|
||||
// (text)=>{try {return NODERSA.decryptRSAWithPrivateKey(text, RSA.getPrivateKey(rsa_private_key).replace(/RSA /g,''), {options: {environment: "browser", encryptionScheme: 'pkcs1',b:'1024'}});} catch (e) {log(e.message);return ''}},
|
||||
]
|
||||
let func_index = 0
|
||||
while (!current_match.test(decode_content)) {
|
||||
@ -3313,7 +3320,7 @@ function init(ext) {
|
||||
rule.sniffer = false;
|
||||
}
|
||||
rule.sniffer = rule.hasOwnProperty('sniffer') ? rule.sniffer : '';
|
||||
rule.sniffer = !! (rule.sniffer && rule.sniffer !== '0' && rule.sniffer !== 'false');
|
||||
rule.sniffer = !!(rule.sniffer && rule.sniffer !== '0' && rule.sniffer !== 'false');
|
||||
|
||||
rule.isVideo = rule.hasOwnProperty('isVideo') ? rule.isVideo : '';
|
||||
if (rule.sniffer && !rule.isVideo) { // 默认辅助嗅探自动增强嗅探规则
|
||||
|
97
JS/drpy2.min.js
vendored
97
JS/drpy2.min.js
vendored
@ -4,7 +4,9 @@ import "./jsencrypt.js";
|
||||
import "./node-rsa.js";
|
||||
import "./pako.min.js";
|
||||
import 模板 from "./模板.js";
|
||||
import { gbkTool } from "./gbk.js";
|
||||
import {
|
||||
gbkTool
|
||||
} from "./gbk.js";
|
||||
import "./json5.js";
|
||||
import "./jinja.js";
|
||||
const _jinja2 = cheerio.jinja2;
|
||||
@ -25,12 +27,14 @@ function init_test() {
|
||||
console.log(JSON.stringify(rule));
|
||||
console.log("init_test_end")
|
||||
}
|
||||
|
||||
function ocr_demo_test() {
|
||||
let img_base64 = `iVBORw0KGgoAAAANSUhEUgAAAIAAAAAoBAMAAADEX+97AAAAG1BMVEXz+/4thQTa7N6QwIFFkyNeokKozqDB3b93sWHFR+MEAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABN0lEQVRIie2TQU+DQBCFt9vScvQpxR4xrcSjJCZ67JDGXsX+AdR4B3vpsSYm/m2HXaRLmuySepR3Gdidb/btDAjRq5dT96eCMlfBuzi1QLZUoZy2yz5sOvI+9iomaPEZ6nWnEtxqIyiM1RcAy44GNDhBXUjot/VVNweV1ah68FqWRyjKIOqAcyYF6rGcmpYnHzGt3fycNoMw0d3/THFu7hFSJ/8OXO6iTM8/KSg09obAzIHLO250LgQ0txOZSfgrV4Exdw98uGycJ0ErAeExZGhOmFHV9zHO6qVSj0MpLq7xZON56o++MjlsEgfVhbQWWME+xQX7J4V6zfi9A1Ly9rP1BvEXp+BbVJ/M77n+wfOIDVp51pZ4iBxvmj9AGrtvry6emwfKnVkW+ZRKd5ZNMvob36vXP9YPDmQki8QiCFAAAAAASUVORK5CYII=`;
|
||||
OcrApi.api = OCR_API;
|
||||
let code = OcrApi.classification(img_base64);
|
||||
log("测试验证码图片的ocr识别结果为:" + code)
|
||||
}
|
||||
|
||||
function rsa_demo_test() {
|
||||
let t1 = (new Date).getTime();
|
||||
let pkcs1_public = `
|
||||
@ -184,6 +188,7 @@ m7mp8il0kaftHdSxTbspG3tZ2fjIiFIZkLEOmRpd7ogWumgOajzUdA==
|
||||
let t2 = (new Date).getTime();
|
||||
console.log("rsa_demo_test 测试耗时:" + (t2 - t1) + "毫秒")
|
||||
}
|
||||
|
||||
function pre() {
|
||||
if (typeof rule.预处理 === "string" && rule.预处理 && rule.预处理.trim()) {
|
||||
let code = rule.预处理.trim();
|
||||
@ -272,6 +277,7 @@ function window_b64() {
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
function atob(str) {
|
||||
var c1, c2, c3, c4;
|
||||
var i, len, out;
|
||||
@ -312,7 +318,8 @@ function window_b64() {
|
||||
}
|
||||
if (typeof atob !== "function" || typeof btoa !== "function") {
|
||||
var {
|
||||
atob, btoa
|
||||
atob,
|
||||
btoa
|
||||
} = window_b64()
|
||||
}
|
||||
if (typeof Object.assign !== "function") {
|
||||
@ -463,6 +470,7 @@ function 是否正版(vipUrl) {
|
||||
let flag = new RegExp("qq.com|iqiyi.com|youku.com|mgtv.com|bilibili.com|sohu.com|ixigua.com|pptv.com|miguvideo.com|le.com|1905.com|fun.tv");
|
||||
return flag.test(vipUrl)
|
||||
}
|
||||
|
||||
function urlDeal(vipUrl) {
|
||||
if (!vipUrl) {
|
||||
return ""
|
||||
@ -475,6 +483,7 @@ function urlDeal(vipUrl) {
|
||||
}
|
||||
return vipUrl
|
||||
}
|
||||
|
||||
function setResult(d) {
|
||||
if (!Array.isArray(d)) {
|
||||
return []
|
||||
@ -511,16 +520,19 @@ function setResult(d) {
|
||||
});
|
||||
return VODS
|
||||
}
|
||||
|
||||
function setResult2(res) {
|
||||
VODS = res.list || [];
|
||||
return VODS
|
||||
}
|
||||
|
||||
function setHomeResult(res) {
|
||||
if (!res || typeof res !== "object") {
|
||||
return []
|
||||
}
|
||||
return setResult(res.list)
|
||||
}
|
||||
|
||||
function rc(js) {
|
||||
if (js === "maomi_aes.js") {
|
||||
var a = CryptoJS.enc.Utf8.parse("625222f9149e961d");
|
||||
@ -546,6 +558,7 @@ function rc(js) {
|
||||
}
|
||||
return {}
|
||||
}
|
||||
|
||||
function maoss(jxurl, ref, key) {
|
||||
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
|
||||
eval(getCryptoJS());
|
||||
@ -588,10 +601,12 @@ function maoss(jxurl, ref, key) {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
function urlencode(str) {
|
||||
str = (str + "").toString();
|
||||
return encodeURIComponent(str).replace(/!/g, "%21").replace(/'/g, "%27").replace(/\(/g, "%28").replace(/\)/g, "%29").replace(/\*/g, "%2A").replace(/%20/g, "+")
|
||||
}
|
||||
|
||||
function encodeUrl(str) {
|
||||
if (typeof encodeURI == "function") {
|
||||
return encodeURI(str)
|
||||
@ -600,19 +615,24 @@ function encodeUrl(str) {
|
||||
return encodeURIComponent(str).replace(/%2F/g, "/").replace(/%3F/g, "?").replace(/%3A/g, ":").replace(/%40/g, "@").replace(/%3D/g, "=").replace(/%3A/g, ":").replace(/%2C/g, ",").replace(/%2B/g, "+").replace(/%24/g, "$")
|
||||
}
|
||||
}
|
||||
|
||||
function base64Encode(text) {
|
||||
return CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(text))
|
||||
}
|
||||
|
||||
function base64Decode(text) {
|
||||
return CryptoJS.enc.Utf8.stringify(CryptoJS.enc.Base64.parse(text))
|
||||
}
|
||||
|
||||
function md5(text) {
|
||||
return CryptoJS.MD5(text).toString()
|
||||
}
|
||||
|
||||
function uint8ArrayToBase64(uint8Array) {
|
||||
let binaryString = String.fromCharCode.apply(null, Array.from(uint8Array));
|
||||
return btoa(binaryString)
|
||||
}
|
||||
|
||||
function Utf8ArrayToStr(array) {
|
||||
var out, i, len, c;
|
||||
var char2, char3;
|
||||
@ -646,10 +666,12 @@ function Utf8ArrayToStr(array) {
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
function gzip(str) {
|
||||
let arr = pako.gzip(str, {});
|
||||
return uint8ArrayToBase64(arr)
|
||||
}
|
||||
|
||||
function ungzip(b64Data) {
|
||||
let strData = atob(b64Data);
|
||||
const charData = strData.split("").map(function(x) {
|
||||
@ -659,6 +681,7 @@ function ungzip(b64Data) {
|
||||
const data = pako.inflate(binData);
|
||||
return Utf8ArrayToStr(data)
|
||||
}
|
||||
|
||||
function encodeStr(input, encoding) {
|
||||
encoding = encoding || "gbk";
|
||||
if (encoding.startsWith("gb")) {
|
||||
@ -667,6 +690,7 @@ function encodeStr(input, encoding) {
|
||||
}
|
||||
return input
|
||||
}
|
||||
|
||||
function decodeStr(input, encoding) {
|
||||
encoding = encoding || "gbk";
|
||||
if (encoding.startsWith("gb")) {
|
||||
@ -675,6 +699,7 @@ function decodeStr(input, encoding) {
|
||||
}
|
||||
return input
|
||||
}
|
||||
|
||||
function getCryptoJS() {
|
||||
return 'console.log("CryptoJS已装载");'
|
||||
}
|
||||
@ -735,6 +760,7 @@ function getProxyUrl() {
|
||||
return "http://127.0.0.1:9978/proxy?do=js"
|
||||
}
|
||||
}
|
||||
|
||||
function fixAdM3u8(m3u8_text, m3u8_url, ad_remove) {
|
||||
if (!m3u8_text && !m3u8_url || !m3u8_text && m3u8_url && !m3u8_url.startsWith("http")) {
|
||||
return ""
|
||||
@ -789,6 +815,7 @@ function fixAdM3u8(m3u8_text, m3u8_url, ad_remove) {
|
||||
m3u8_text = [m3u8_start, new_m3u8_body, m3u8_end].join("\n").trim();
|
||||
return m3u8_text
|
||||
}
|
||||
|
||||
function fixAdM3u8Ai(m3u8_url, headers) {
|
||||
let ts = (new Date).getTime();
|
||||
let option = headers ? {
|
||||
@ -805,6 +832,7 @@ function fixAdM3u8Ai(m3u8_url, headers) {
|
||||
}
|
||||
return i
|
||||
}
|
||||
|
||||
function reverseString(str) {
|
||||
return str.split("").reverse().join("")
|
||||
}
|
||||
@ -883,6 +911,7 @@ function fixAdM3u8Ai(m3u8_url, headers) {
|
||||
log("处理耗时:" + ((new Date).getTime() - ts).toString());
|
||||
return m3u8
|
||||
}
|
||||
|
||||
function forceOrder(lists, key, option) {
|
||||
let start = Math.floor(lists.length / 2);
|
||||
let end = Math.min(lists.length - 1, start + 1);
|
||||
@ -938,6 +967,7 @@ function getQuery(url) {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
|
||||
function urljoin(fromPath, nowPath) {
|
||||
fromPath = fromPath || "";
|
||||
nowPath = nowPath || "";
|
||||
@ -969,6 +999,7 @@ function pdfh2(html, parse) {
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
function pdfa2(html, parse) {
|
||||
let html2 = html;
|
||||
try {
|
||||
@ -980,6 +1011,7 @@ function pdfa2(html, parse) {
|
||||
}
|
||||
return defaultParser.pdfa(html2, parse)
|
||||
}
|
||||
|
||||
function pd2(html, parse, uri) {
|
||||
let ret = pdfh2(html, parse);
|
||||
if (typeof uri === "undefined" || !uri) {
|
||||
@ -1028,7 +1060,8 @@ const parseTags = {
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}, pdfa(html, parse) {
|
||||
},
|
||||
pdfa(html, parse) {
|
||||
if (!parse || !parse.trim()) {
|
||||
return ""
|
||||
}
|
||||
@ -1044,7 +1077,8 @@ const parseTags = {
|
||||
return ret[0] || []
|
||||
}
|
||||
return ret || []
|
||||
}, pd(html, parse) {
|
||||
},
|
||||
pd(html, parse) {
|
||||
let ret = parseTags.json.pdfh(html, parse);
|
||||
if (ret) {
|
||||
return urljoin(MY_URL, ret)
|
||||
@ -1060,7 +1094,8 @@ const parseTags = {
|
||||
parse = parse.trim();
|
||||
let result = defaultParser.pdfh(html, parse);
|
||||
return result
|
||||
}, pdfa(html, parse) {
|
||||
},
|
||||
pdfa(html, parse) {
|
||||
if (!html || !parse || !parse.trim()) {
|
||||
return []
|
||||
}
|
||||
@ -1068,7 +1103,8 @@ const parseTags = {
|
||||
let result = defaultParser.pdfa(html, parse);
|
||||
print(`pdfa解析${parse}=>${result.length}`);
|
||||
return result
|
||||
}, pd(html, parse, base_url) {
|
||||
},
|
||||
pd(html, parse, base_url) {
|
||||
if (!html || !parse || !parse.trim()) {
|
||||
return ""
|
||||
}
|
||||
@ -1103,6 +1139,7 @@ function readFile(filePath) {
|
||||
console.log(text);
|
||||
return text
|
||||
}
|
||||
|
||||
function dealJson(html) {
|
||||
try {
|
||||
html = html.trim();
|
||||
@ -1191,16 +1228,20 @@ function verifyCode(url) {
|
||||
}
|
||||
return cookie
|
||||
}
|
||||
|
||||
function setItem(k, v) {
|
||||
local.set(RKEY, k, v);
|
||||
console.log(`规则${RKEY}设置${k} => ${v}`)
|
||||
}
|
||||
|
||||
function getItem(k, v) {
|
||||
return local.get(RKEY, k) || v
|
||||
}
|
||||
|
||||
function clearItem(k) {
|
||||
local.delete(RKEY, k)
|
||||
}
|
||||
|
||||
function getHome(url) {
|
||||
if (!url) {
|
||||
return ""
|
||||
@ -1212,6 +1253,7 @@ function getHome(url) {
|
||||
} catch (e) {}
|
||||
return url
|
||||
}
|
||||
|
||||
function buildUrl(url, obj) {
|
||||
obj = obj || {};
|
||||
if (url.indexOf("?") < 0) {
|
||||
@ -1229,9 +1271,11 @@ function buildUrl(url, obj) {
|
||||
url += prs;
|
||||
return url
|
||||
}
|
||||
|
||||
function $require(url) {
|
||||
eval(request(url))
|
||||
}
|
||||
|
||||
function keysToLowerCase(obj) {
|
||||
return Object.keys(obj).reduce((result, key) => {
|
||||
const newKey = key.toLowerCase();
|
||||
@ -1239,6 +1283,7 @@ function keysToLowerCase(obj) {
|
||||
return result
|
||||
}, {})
|
||||
}
|
||||
|
||||
function request(url, obj, ocr_flag) {
|
||||
ocr_flag = ocr_flag || false;
|
||||
if (typeof obj === "undefined" || !obj || obj === {}) {
|
||||
@ -1310,11 +1355,13 @@ function request(url, obj, ocr_flag) {
|
||||
return html
|
||||
}
|
||||
}
|
||||
|
||||
function post(url, obj) {
|
||||
obj = obj || {};
|
||||
obj.method = "POST";
|
||||
return request(url, obj)
|
||||
}
|
||||
|
||||
function reqCookie(url, obj, all_cookie) {
|
||||
obj = obj || {};
|
||||
obj.withHeaders = true;
|
||||
@ -1363,11 +1410,13 @@ function checkHtml(html, url, obj) {
|
||||
}
|
||||
return html
|
||||
}
|
||||
|
||||
function getCode(url, obj) {
|
||||
let html = request(url, obj);
|
||||
html = checkHtml(html, url, obj);
|
||||
return html
|
||||
}
|
||||
|
||||
function getHtml(url) {
|
||||
let obj = {};
|
||||
if (rule.headers) {
|
||||
@ -1394,6 +1443,7 @@ function getHtml(url) {
|
||||
let html = getCode(url, obj);
|
||||
return html
|
||||
}
|
||||
|
||||
function homeParse(homeObj) {
|
||||
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
|
||||
let classes = [];
|
||||
@ -1488,6 +1538,7 @@ function homeParse(homeObj) {
|
||||
console.log(JSON.stringify(resp));
|
||||
return JSON.stringify(resp)
|
||||
}
|
||||
|
||||
function getPP(p, pn, pp, ppn) {
|
||||
try {
|
||||
let ps = p[pn] === "*" && pp.length > ppn ? pp[ppn] : p[pn];
|
||||
@ -1496,6 +1547,7 @@ function getPP(p, pn, pp, ppn) {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
function homeVodParse(homeVodObj) {
|
||||
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
|
||||
let d = [];
|
||||
@ -1674,6 +1726,7 @@ function homeVodParse(homeVodObj) {
|
||||
list: d
|
||||
})
|
||||
}
|
||||
|
||||
function categoryParse(cateObj) {
|
||||
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
|
||||
let p = cateObj.一级;
|
||||
@ -1838,6 +1891,7 @@ function categoryParse(cateObj) {
|
||||
});
|
||||
return vod
|
||||
}
|
||||
|
||||
function searchParse(searchObj) {
|
||||
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
|
||||
let d = [];
|
||||
@ -2013,6 +2067,7 @@ function searchParse(searchObj) {
|
||||
list: d
|
||||
})
|
||||
}
|
||||
|
||||
function detailParse(detailObj) {
|
||||
let t1 = (new Date).getTime();
|
||||
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
|
||||
@ -2248,6 +2303,7 @@ function detailParse(detailObj) {
|
||||
list: [vod]
|
||||
})
|
||||
}
|
||||
|
||||
function get_tab_index(vod) {
|
||||
let obj = {};
|
||||
vod.vod_play_from.split("$$$").forEach((it, index) => {
|
||||
@ -2255,6 +2311,7 @@ function get_tab_index(vod) {
|
||||
});
|
||||
return obj
|
||||
}
|
||||
|
||||
function vodDeal(vod) {
|
||||
let vod_play_from = vod.vod_play_from.split("$$$");
|
||||
let vod_play_url = vod.vod_play_url.split("$$$");
|
||||
@ -2286,6 +2343,7 @@ function vodDeal(vod) {
|
||||
vod.vod_play_url = play_ordered_list.join("$$$");
|
||||
return vod
|
||||
}
|
||||
|
||||
function tellIsJx(url) {
|
||||
try {
|
||||
let is_vip = !/\.(m3u8|mp4|m4a)$/.test(url.split("?")[0]) && 是否正版(url);
|
||||
@ -2294,6 +2352,7 @@ function tellIsJx(url) {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
function playParse(playObj) {
|
||||
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
|
||||
MY_URL = playObj.url;
|
||||
@ -2362,6 +2421,7 @@ function playParse(playObj) {
|
||||
console.log(JSON.stringify(lazy_play));
|
||||
return JSON.stringify(lazy_play)
|
||||
}
|
||||
|
||||
function proxyParse(proxyObj) {
|
||||
var input = proxyObj.params;
|
||||
if (proxyObj.proxy_rule) {
|
||||
@ -2380,6 +2440,7 @@ function proxyParse(proxyObj) {
|
||||
return [404, "text/plain", "Not Found"]
|
||||
}
|
||||
}
|
||||
|
||||
function isVideoParse(isVideoObj) {
|
||||
var input = isVideoObj.url;
|
||||
if (!isVideoObj.t) {
|
||||
@ -2399,6 +2460,7 @@ function isVideoParse(isVideoObj) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getOriginalJs(js_code) {
|
||||
let current_match = /var rule|[\u4E00-\u9FA5]+|function|let |var |const |\(|\)|"|'/;
|
||||
if (current_match.test(js_code)) {
|
||||
@ -2433,24 +2495,21 @@ function getOriginalJs(js_code) {
|
||||
logger("非gzip加密");
|
||||
return ""
|
||||
}
|
||||
},
|
||||
text => {
|
||||
}, text => {
|
||||
try {
|
||||
return base64Decode(text)
|
||||
} catch (e) {
|
||||
logger("非b64加密");
|
||||
return ""
|
||||
}
|
||||
},
|
||||
text => {
|
||||
}, text => {
|
||||
try {
|
||||
return aes_decrypt(text)
|
||||
} catch (e) {
|
||||
logger("非aes加密");
|
||||
return ""
|
||||
}
|
||||
},
|
||||
text => {
|
||||
}, text => {
|
||||
try {
|
||||
return RSA.decode(text, rsa_private_key, null)
|
||||
} catch (e) {
|
||||
@ -2468,6 +2527,7 @@ function getOriginalJs(js_code) {
|
||||
}
|
||||
return decode_content
|
||||
}
|
||||
|
||||
function runMain(main_func_code, arg) {
|
||||
let mainFunc = function() {
|
||||
return ""
|
||||
@ -2480,6 +2540,7 @@ function runMain(main_func_code, arg) {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
function init(ext) {
|
||||
console.log("init");
|
||||
rule = {};
|
||||
@ -2603,7 +2664,7 @@ function init(ext) {
|
||||
rule.sniffer = false
|
||||
}
|
||||
rule.sniffer = rule.hasOwnProperty("sniffer") ? rule.sniffer : "";
|
||||
rule.sniffer = !! (rule.sniffer && rule.sniffer !== "0" && rule.sniffer !== "false");
|
||||
rule.sniffer = !!(rule.sniffer && rule.sniffer !== "0" && rule.sniffer !== "false");
|
||||
rule.isVideo = rule.hasOwnProperty("isVideo") ? rule.isVideo : "";
|
||||
if (rule.sniffer && !rule.isVideo) {
|
||||
rule.isVideo = "http((?!http).){12,}?\\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a|mp3)\\?.*|http((?!http).){12,}\\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a|mp3)|http((?!http).)*?video/tos*|http((?!http).)*?obj/tos*"
|
||||
@ -2677,6 +2738,7 @@ function home(filter, home_html, class_parse) {
|
||||
};
|
||||
return homeParse(homeObj)
|
||||
}
|
||||
|
||||
function homeVod(params) {
|
||||
console.log("homeVod");
|
||||
let homeVodObj = {
|
||||
@ -2687,6 +2749,7 @@ function homeVod(params) {
|
||||
};
|
||||
return homeVodParse(homeVodObj)
|
||||
}
|
||||
|
||||
function category(tid, pg, filter, extend) {
|
||||
let cateObj = {
|
||||
url: rule.url,
|
||||
@ -2698,6 +2761,7 @@ function category(tid, pg, filter, extend) {
|
||||
};
|
||||
return categoryParse(cateObj)
|
||||
}
|
||||
|
||||
function detail(vod_url) {
|
||||
let orId = vod_url;
|
||||
let fyclass = "";
|
||||
@ -2727,6 +2791,7 @@ function detail(vod_url) {
|
||||
};
|
||||
return detailParse(detailObj)
|
||||
}
|
||||
|
||||
function play(flag, id, flags) {
|
||||
let playObj = {
|
||||
url: id,
|
||||
@ -2735,6 +2800,7 @@ function play(flag, id, flags) {
|
||||
};
|
||||
return playParse(playObj)
|
||||
}
|
||||
|
||||
function search(wd, quick, pg) {
|
||||
if (rule.search_encoding) {
|
||||
if (rule.search_encoding.toLowerCase() !== "utf-8") {
|
||||
@ -2752,6 +2818,7 @@ function search(wd, quick, pg) {
|
||||
};
|
||||
return searchParse(searchObj)
|
||||
}
|
||||
|
||||
function proxy(params) {
|
||||
if (rule.proxy_rule && rule.proxy_rule.trim()) {
|
||||
rule.proxy_rule = rule.proxy_rule.trim()
|
||||
@ -2765,6 +2832,7 @@ function proxy(params) {
|
||||
};
|
||||
return proxyParse(proxyObj)
|
||||
}
|
||||
|
||||
function sniffer() {
|
||||
let enable_sniffer = rule.sniffer || false;
|
||||
if (enable_sniffer) {
|
||||
@ -2772,6 +2840,7 @@ function sniffer() {
|
||||
}
|
||||
return enable_sniffer
|
||||
}
|
||||
|
||||
function isVideo(url) {
|
||||
let t = 0;
|
||||
let is_video;
|
||||
@ -2793,9 +2862,11 @@ function isVideo(url) {
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
function getRule(key) {
|
||||
return key ? rule[key] || "" : rule
|
||||
}
|
||||
|
||||
function DRPY() {
|
||||
return {
|
||||
runMain: runMain,
|
||||
|
25
JS/jinja.js
25
JS/jinja.js
@ -21,7 +21,9 @@
|
||||
/*global require, exports, module, define */
|
||||
|
||||
(function(global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jinja = {}));
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jinja = {}));
|
||||
})(this, (function(jinja) {
|
||||
"use strict";
|
||||
var STRINGS = /'(\\.|[^'])*'|"(\\.|[^"'"])*"/g;
|
||||
@ -401,19 +403,20 @@
|
||||
var _toString = Object.prototype.toString;
|
||||
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
var getKeys = Object.keys || function(obj) {
|
||||
var keys = [];
|
||||
for (var n in obj) if (_hasOwnProperty.call(obj, n)) keys.push(n);
|
||||
return keys;
|
||||
};
|
||||
var keys = [];
|
||||
for (var n in obj)
|
||||
if (_hasOwnProperty.call(obj, n)) keys.push(n);
|
||||
return keys;
|
||||
};
|
||||
var isArray = Array.isArray || function(obj) {
|
||||
return _toString.call(obj) === '[object Array]';
|
||||
};
|
||||
return _toString.call(obj) === '[object Array]';
|
||||
};
|
||||
var create = Object.create || function(obj) {
|
||||
function F() {}
|
||||
function F() {}
|
||||
|
||||
F.prototype = obj;
|
||||
return new F();
|
||||
};
|
||||
F.prototype = obj;
|
||||
return new F();
|
||||
};
|
||||
var toString = function(val) {
|
||||
if (val == null) return '';
|
||||
return (typeof val.toString == 'function') ? val.toString() : _toString.call(val);
|
||||
|
360
JS/jsencrypt.js
360
JS/jsencrypt.js
File diff suppressed because one or more lines are too long
127
JS/json5.js
127
JS/json5.js
@ -1,5 +1,7 @@
|
||||
(function(global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.JSON5 = factory());
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.JSON5 = factory());
|
||||
}(this, (function() {
|
||||
'use strict';
|
||||
|
||||
@ -11,10 +13,11 @@
|
||||
|
||||
var _global = createCommonjsModule(function(module) {
|
||||
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
||||
var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self
|
||||
// eslint-disable-next-line no-new-func
|
||||
:
|
||||
Function('return this')();
|
||||
var global = module.exports = typeof window != 'undefined' && window.Math == Math ?
|
||||
window : typeof self != 'undefined' && self.Math == Math ? self
|
||||
// eslint-disable-next-line no-new-func
|
||||
:
|
||||
Function('return this')();
|
||||
if (typeof __g == 'number') {
|
||||
__g = global;
|
||||
} // eslint-disable-line no-undef
|
||||
@ -97,22 +100,23 @@
|
||||
var dP = Object.defineProperty;
|
||||
|
||||
var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
|
||||
_anObject(O);
|
||||
P = _toPrimitive(P, true);
|
||||
_anObject(Attributes);
|
||||
if (_ie8DomDefine) {
|
||||
try {
|
||||
return dP(O, P, Attributes);
|
||||
} catch (e) { /* empty */}
|
||||
}
|
||||
if ('get' in Attributes || 'set' in Attributes) {
|
||||
throw TypeError('Accessors not supported!');
|
||||
}
|
||||
if ('value' in Attributes) {
|
||||
O[P] = Attributes.value;
|
||||
}
|
||||
return O;
|
||||
};
|
||||
_anObject(O);
|
||||
P = _toPrimitive(P, true);
|
||||
_anObject(Attributes);
|
||||
if (_ie8DomDefine) {
|
||||
try {
|
||||
return dP(O, P, Attributes);
|
||||
} catch (e) {
|
||||
/* empty */ }
|
||||
}
|
||||
if ('get' in Attributes || 'set' in Attributes) {
|
||||
throw TypeError('Accessors not supported!');
|
||||
}
|
||||
if ('value' in Attributes) {
|
||||
O[P] = Attributes.value;
|
||||
}
|
||||
return O;
|
||||
};
|
||||
|
||||
var _objectDp = {
|
||||
f: f
|
||||
@ -128,11 +132,11 @@
|
||||
};
|
||||
|
||||
var _hide = _descriptors ? function(object, key, value) {
|
||||
return _objectDp.f(object, key, _propertyDesc(1, value));
|
||||
} : function(object, key, value) {
|
||||
object[key] = value;
|
||||
return object;
|
||||
};
|
||||
return _objectDp.f(object, key, _propertyDesc(1, value));
|
||||
} : function(object, key, value) {
|
||||
object[key] = value;
|
||||
return object;
|
||||
};
|
||||
|
||||
var hasOwnProperty = {}.hasOwnProperty;
|
||||
var _has = function(it, key) {
|
||||
@ -306,7 +310,9 @@
|
||||
return TO_STRING ? '' : undefined;
|
||||
}
|
||||
a = s.charCodeAt(i);
|
||||
return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
|
||||
return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ?
|
||||
TO_STRING ? s.charAt(i) : a :
|
||||
TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
|
||||
};
|
||||
};
|
||||
|
||||
@ -331,7 +337,7 @@
|
||||
var $fromCodePoint = String.fromCodePoint;
|
||||
|
||||
// length should be 1, old FF problem
|
||||
_export(_export.S + _export.F * ( !! $fromCodePoint && $fromCodePoint.length != 1), 'String', {
|
||||
_export(_export.S + _export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
|
||||
// 21.1.2.2 String.fromCodePoint(...codePoints)
|
||||
fromCodePoint: function fromCodePoint(x) {
|
||||
var arguments$1 = arguments;
|
||||
@ -345,7 +351,10 @@
|
||||
if (_toAbsoluteIndex(code, 0x10ffff) !== code) {
|
||||
throw RangeError(code + ' is not a valid code point');
|
||||
}
|
||||
res.push(code < 0x10000 ? fromCharCode(code) : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00));
|
||||
res.push(code < 0x10000 ?
|
||||
fromCharCode(code) :
|
||||
fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
|
||||
);
|
||||
}
|
||||
return res.join('');
|
||||
}
|
||||
@ -371,12 +380,22 @@
|
||||
|
||||
isIdStartChar: function isIdStartChar(c) {
|
||||
return typeof c === 'string' && (
|
||||
(c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c === '$') || (c === '_') || unicode.ID_Start.test(c))
|
||||
(c >= 'a' && c <= 'z') ||
|
||||
(c >= 'A' && c <= 'Z') ||
|
||||
(c === '$') || (c === '_') ||
|
||||
unicode.ID_Start.test(c)
|
||||
)
|
||||
},
|
||||
|
||||
isIdContinueChar: function isIdContinueChar(c) {
|
||||
return typeof c === 'string' && (
|
||||
(c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || (c === '$') || (c === '_') || (c === '') || (c === '') || unicode.ID_Continue.test(c))
|
||||
(c >= 'a' && c <= 'z') ||
|
||||
(c >= 'A' && c <= 'Z') ||
|
||||
(c >= '0' && c <= '9') ||
|
||||
(c === '$') || (c === '_') ||
|
||||
(c === '\u200C') || (c === '\u200D') ||
|
||||
unicode.ID_Continue.test(c)
|
||||
)
|
||||
},
|
||||
|
||||
isDigit: function isDigit(c) {
|
||||
@ -526,12 +545,12 @@
|
||||
case '\v':
|
||||
case '\f':
|
||||
case ' ':
|
||||
case ' ':
|
||||
case '':
|
||||
case '\u00A0':
|
||||
case '\uFEFF':
|
||||
case '\n':
|
||||
case '\r':
|
||||
case '
':
|
||||
case '
':
|
||||
case '\u2028':
|
||||
case '\u2029':
|
||||
read();
|
||||
return
|
||||
|
||||
@ -611,8 +630,8 @@
|
||||
switch (c) {
|
||||
case '\n':
|
||||
case '\r':
|
||||
case '
':
|
||||
case '
':
|
||||
case '\u2028':
|
||||
case '\u2029':
|
||||
read();
|
||||
lexState = 'default';
|
||||
return
|
||||
@ -727,8 +746,8 @@
|
||||
switch (c) {
|
||||
case '$':
|
||||
case '_':
|
||||
case '':
|
||||
case '':
|
||||
case '\u200C':
|
||||
case '\u200D':
|
||||
buffer += read();
|
||||
return
|
||||
|
||||
@ -756,8 +775,8 @@
|
||||
switch (u) {
|
||||
case '$':
|
||||
case '_':
|
||||
case '':
|
||||
case '':
|
||||
case '\u200C':
|
||||
case '\u200D':
|
||||
break
|
||||
|
||||
default:
|
||||
@ -986,8 +1005,8 @@
|
||||
case '\r':
|
||||
throw invalidChar(read())
|
||||
|
||||
case '
':
|
||||
case '
':
|
||||
case '\u2028':
|
||||
case '\u2029':
|
||||
separatorChar(c);
|
||||
break
|
||||
|
||||
@ -1162,8 +1181,8 @@
|
||||
return unicodeEscape()
|
||||
|
||||
case '\n':
|
||||
case '
':
|
||||
case '
':
|
||||
case '\u2028':
|
||||
case '\u2029':
|
||||
read();
|
||||
return ''
|
||||
|
||||
@ -1482,8 +1501,8 @@
|
||||
'\t': '\\t',
|
||||
'\v': '\\v',
|
||||
'\0': '\\0',
|
||||
'
': '\\u2028',
|
||||
'
': '\\u2029',
|
||||
'\u2028': '\\u2028',
|
||||
'\u2029': '\\u2029',
|
||||
};
|
||||
|
||||
if (replacements[c]) {
|
||||
@ -1514,7 +1533,10 @@
|
||||
var quote;
|
||||
|
||||
if (
|
||||
replacer != null && typeof replacer === 'object' && !Array.isArray(replacer)) {
|
||||
replacer != null &&
|
||||
typeof replacer === 'object' &&
|
||||
!Array.isArray(replacer)
|
||||
) {
|
||||
space = replacer.space;
|
||||
quote = replacer.quote;
|
||||
replacer = replacer.replacer;
|
||||
@ -1532,7 +1554,10 @@
|
||||
if (typeof v === 'string') {
|
||||
item = v;
|
||||
} else if (
|
||||
typeof v === 'number' || v instanceof String || v instanceof Number) {
|
||||
typeof v === 'number' ||
|
||||
v instanceof String ||
|
||||
v instanceof Number
|
||||
) {
|
||||
item = String(v);
|
||||
}
|
||||
|
||||
@ -1624,8 +1649,8 @@
|
||||
'\t': '\\t',
|
||||
'\v': '\\v',
|
||||
'\0': '\\0',
|
||||
'
': '\\u2028',
|
||||
'
': '\\u2029',
|
||||
'\u2028': '\\u2028',
|
||||
'\u2029': '\\u2029',
|
||||
};
|
||||
|
||||
var product = '';
|
||||
|
11152
JS/node-rsa.js
11152
JS/node-rsa.js
File diff suppressed because it is too large
Load Diff
957
JS/pako.min.js
vendored
957
JS/pako.min.js
vendored
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user