From 6c4bf621a0b8d244c4f1b508a1c618aba3e53da1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=BD=87=E6=B4=92?=
<78096245+PizazzGY@users.noreply.github.com>
Date: Sun, 26 May 2024 13:39:40 +0800
Subject: [PATCH] Add files via upload
---
JS/drpy2.min.js | 554 ++++++++++++++++++++++++++++++++++-----
JS/jsencrypt.js | 528 ++++++++++++++++++-------------------
JS/node-rsa.js | 2 +
JS/pako.min.js | 2 +
JS/喵物次元.js | 59 +++--
JS/模板.js | 681 +++++++++++++++++++++++++++---------------------
6 files changed, 1166 insertions(+), 660 deletions(-)
create mode 100644 JS/node-rsa.js
create mode 100644 JS/pako.min.js
diff --git a/JS/drpy2.min.js b/JS/drpy2.min.js
index 7111baf..63b5a99 100644
--- a/JS/drpy2.min.js
+++ b/JS/drpy2.min.js
@@ -1,6 +1,8 @@
import cheerio from "assets://js/lib/cheerio.min.js";
import "assets://js/lib/crypto-js.js";
import "./jsencrypt.js";
+import "./node-rsa.js";
+import "./pako.min.js";
import 模板 from "./模板.js";
import {
gbkTool
@@ -10,10 +12,172 @@ from "./gbk.js";
function init_test() {
console.log("init_test_start");
console.log("当前版本号:" + VERSION);
+ console.log("本地代理地址:" + getProxyUrl());
console.log(RKEY);
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 = `
+-----BEGIN RSA PUBLIC KEY-----
+MEgCQQCrI0pQ/ERRpJ3Ou190XJedFq846nDYP52rOtXyDxlFK5D3p6JJu2RwsKwy
+lsQ9xY0xYPpRZUZKMEeR7e9gmRNLAgMBAAE=
+-----END RSA PUBLIC KEY-----
+`.trim();
+ let pkcs1_public_pem = `
+MEgCQQCrI0pQ/ERRpJ3Ou190XJedFq846nDYP52rOtXyDxlFK5D3p6JJu2RwsKwy
+lsQ9xY0xYPpRZUZKMEeR7e9gmRNLAgMBAAE=
+`.trim();
+ let pkcs8_public = `
+-----BEGIN PUBLIC KEY-----
+MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKsjSlD8RFGknc67X3Rcl50WrzjqcNg/
+nas61fIPGUUrkPenokm7ZHCwrDKWxD3FjTFg+lFlRkowR5Ht72CZE0sCAwEAAQ==
+-----END PUBLIC KEY-----`.trim();
+ let pkcs8_public_pem = `
+MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKsjSlD8RFGknc67X3Rcl50WrzjqcNg/
+nas61fIPGUUrkPenokm7ZHCwrDKWxD3FjTFg+lFlRkowR5Ht72CZE0sCAwEAAQ==
+`.trim();
+ let pkcs1_private = `
+-----BEGIN RSA PRIVATE KEY-----
+MIIBOAIBAAJBAKsjSlD8RFGknc67X3Rcl50WrzjqcNg/nas61fIPGUUrkPenokm7
+ZHCwrDKWxD3FjTFg+lFlRkowR5Ht72CZE0sCAwEAAQI/b6OV1z65UokQaMvSeRXt
+0Yv6wiYtduQI9qpq5nzy/ytaqsbBfClNTi/HifKPKxlRouWFkc518EQI8LBxoarJ
+AiEA4DaONMplV8PQNa3TKn2F+SDEvLOCjdL0kHKdN90Ti28CIQDDZnTBaHgZwZbA
+hS7Bbf5yvwjWMhO6Y7l04/Qm7R+35QIgPuQuqXIoUSD080mp1N5WyRW++atksIF+
+5lGv9e6GP/MCICnj8y/rl6Pd7tXDN6zcSeqLrfdNsREKhB3dKOCXgW9JAiAFYtFS
+EJNBXVRTK42SNsZ2hJ/9xLwOwnH2epT8Q43s3Q==
+-----END RSA PRIVATE KEY-----
+`.trim();
+ let pkcs8_private = `
+-----BEGIN PRIVATE KEY-----
+MIIBUgIBADANBgkqhkiG9w0BAQEFAASCATwwggE4AgEAAkEAqyNKUPxEUaSdzrtf
+dFyXnRavOOpw2D+dqzrV8g8ZRSuQ96eiSbtkcLCsMpbEPcWNMWD6UWVGSjBHke3v
+YJkTSwIDAQABAj9vo5XXPrlSiRBoy9J5Fe3Ri/rCJi125Aj2qmrmfPL/K1qqxsF8
+KU1OL8eJ8o8rGVGi5YWRznXwRAjwsHGhqskCIQDgNo40ymVXw9A1rdMqfYX5IMS8
+s4KN0vSQcp033ROLbwIhAMNmdMFoeBnBlsCFLsFt/nK/CNYyE7pjuXTj9CbtH7fl
+AiA+5C6pcihRIPTzSanU3lbJFb75q2SwgX7mUa/17oY/8wIgKePzL+uXo93u1cM3
+rNxJ6out902xEQqEHd0o4JeBb0kCIAVi0VIQk0FdVFMrjZI2xnaEn/3EvA7CcfZ6
+lPxDjezd
+-----END PRIVATE KEY-----
+`.trim();
+ let data = `
+NodeRsa
+这是node-rsa 现在修改集成在drpy里使用`.trim();
+ let encryptedWithPublic = NODERSA.encryptRSAWithPublicKey(data, pkcs1_public, {
+ outputEncoding: "base64",
+ options: {
+ environment: "browser",
+ encryptionScheme: "pkcs1_oaep"
+ }
+ });
+ console.log("公钥加密");
+ console.log(encryptedWithPublic);
+ let decryptedWithPrivate = NODERSA.decryptRSAWithPrivateKey(encryptedWithPublic, pkcs1_private, {
+ options: {
+ environment: "browser",
+ encryptionScheme: "pkcs1_oaep"
+ }
+ });
+ console.log("私钥解密");
+ console.log(decryptedWithPrivate);
+ let pkcs1_sha256_sign = NODERSA.sign("1", pkcs1_private, {
+ outputEncoding: "base64",
+ options: {
+ environment: "browser",
+ encryptionScheme: "pkcs1",
+ signingScheme: "pkcs1-sha256"
+ }
+ });
+ console.log("pkcs1_sha256_sign");
+ console.log(pkcs1_sha256_sign);
+ let pkcs1_sha256_sign_verify = NODERSA.verify("1", "Oulx2QrgeipKYBtqEDqFb2s/+ndk2cGQxO4CkhU7iBM1vyNmmvqubpsmeoUuN3waGrYZLknSEdwBkfv0tUMpFQ==", pkcs1_private, {
+ options: {
+ environment: "browser",
+ encryptionScheme: "pkcs1",
+ signingScheme: "pkcs1-sha256"
+ }
+ });
+ console.log("pkcs1_sha256_sign_verify");
+ console.log(pkcs1_sha256_sign_verify);
+ let pkcs1_oaep_sha256 = NODERSA.encryptRSAWithPublicKey(data, `-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEA5KOq1gRNyllLNWKQy8sGpZE3Q1ULLSmzZw+eaAhj9lvqn7IsT1du
+SYn08FfoOA2qMwtz+1O2l1mgzNoSVCyVpVabnTG+C9XKeZXAnJHd8aYA7l7Sxhdm
+kte+iymYZ0ZBPzijo8938iugtVvqi9UgDmnY3u/NlQDqiL5BGqSxSTd/Sgmy3zD8
+PYzEa3wD9vehQ5fZZ45vKIq8GNVh2Z8+IGO85FF1OsN7+b2yGJa/FmDDNn0+HP+m
+PfI+kYBqEVpo0Ztbc3UdxgFwGC8O1n8AQyriwHnSOtIiuBH62J/7qyC/3LEAApRb
+Dd9YszqzmODjQUddZKHmvc638VW+azc0EwIDAQAB
+-----END RSA PUBLIC KEY-----
+`, {
+ outputEncoding: "base64",
+ options: {
+ environment: "browser",
+ encryptionScheme: {
+ scheme: "pkcs1_oaep",
+ hash: "sha256"
+ }
+ }
+ });
+ console.log("pkcs1_oaep_sha256");
+ console.log(pkcs1_oaep_sha256);
+ decryptedWithPrivate = NODERSA.decryptRSAWithPrivateKey("kSZesAAyYh2hdsQnYMdGqb6gKAzTauBKouvBzWcc4+F8RvGd0nwO6mVkUMVilPgUuNxjEauHayHiY8gI3Py45UI3+km0rSGyHrS6dHiHgCkMejXHieglYzAB0IxX3Jkm4z/66bdB/D+GFy0oct5fGCMI1UHPjEAYOsazJDa8lBFNbjiWFeb/qiZtIx3vGM7KYPAZzyRf/zPbbQ8zy9xOmRuOl5nnIxgo0Okp3KO/RIPO4GZOSBA8f2lx1UtNwwrXAMpcNavtoqHVcjJ/9lcotXYQFrn5b299pSIRf2gVm8ZJ31SK6Z8cc14nKtvgnmsgClDzIXJ1o1RcDK+knVAySg==", `-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEA5KOq1gRNyllLNWKQy8sGpZE3Q1ULLSmzZw+eaAhj9lvqn7Is
+T1duSYn08FfoOA2qMwtz+1O2l1mgzNoSVCyVpVabnTG+C9XKeZXAnJHd8aYA7l7S
+xhdmkte+iymYZ0ZBPzijo8938iugtVvqi9UgDmnY3u/NlQDqiL5BGqSxSTd/Sgmy
+3zD8PYzEa3wD9vehQ5fZZ45vKIq8GNVh2Z8+IGO85FF1OsN7+b2yGJa/FmDDNn0+
+HP+mPfI+kYBqEVpo0Ztbc3UdxgFwGC8O1n8AQyriwHnSOtIiuBH62J/7qyC/3LEA
+ApRbDd9YszqzmODjQUddZKHmvc638VW+azc0EwIDAQABAoIBADZ/QGgUzInvsLp/
+zO2WbfYm39o/uhNAvk9RbLt1TIZbMFhyOpeKynHi3Swwd9xsfWX/U9zS/lGi/m31
+iKrhmaW4OA1G3vqpMcK7TBbFufYwUEaA+ZJX344euH8pIfdzyneMQ4z3Far2dS7l
+QsmjuilVV2kEFadveXewiYoVOWCu00w6bN8wy2SIHlQn+kIL6HQhWz12iKKflIKu
+eGRdzLHsKmBt6WbY1Wuhx7HU0fAKdlBDPxCHNlI+kybUYE9o5C2vJiaVM5wqJBgZ
+8Dz8kt1QbLJ910JoLXkLVQ8uC8NJKQwFtqQjTGPnEq0+wbgz6Ij599rKZkwW/xq9
+l6KoUiECgYEA6Ah42tVdkNW047f03xVYXFH96RgorHRS36mR8Y+ONUq1fwKidovC
+WjwVujt4OPf3l1W6iyn/F6cu/bsmvPrSc3HTN0B1V31QK4OjgetxQ2PSbTldH02J
+NPzkt+v+cPxXpx/P5mgt7Weefw5txU547KubGrHUV5rBKFtIx9pj16MCgYEA/EF0
+o19+D24DZAPwlDS5VbEd7FStnwY4oQ5PqbuNOSbSJLMWU0AqzXcRokp8UTyCZ0X3
+ATkS1REq97kShCuR+npTR6a6DlY7sdpPI1SMLNajgB2tkx0EOzX+PfNIbHUd4jpJ
+I0ZMAHv/OOtkzQHDaeTWBTrzsWm6/nTiykfduNECgYEA46AMD4HpPECqKAs66e5i
+tI6q7JSKskObWVdcmQEfnSAhVOwcvPb2Ptda6UuV8S0xcwDi88rLOUUFUFzc79+P
+vTkY38cYVi/VChsluDpk7ptqv0PbGu5Rf+3n4pZdEjI7OvR2W64wAAn67uIUxc7p
+yiO/ET0K9rYWb6S9jXGtKMkCgYEA2kPAqoO7zZoBMQ7/oR0lp/HC1HRIbiqx4RlC
+8Lgpb+QZPEwA6zPAVVvLVENi4d+bbcRp/xLlKpraNNJcJSSWAMbLPFoU7sbKjA87
+HnTPfRSTEA2d3Ibk3F7Rh8TzS3Ti0JZiJjVzGZAwu41iAMifzwaD8K6boUy80eNN
+QH2CaaECgYBUsLYvC/MiYg3w+LGOONuQongoVUXjGqnw2bjVa9RK7lwRdXPUqJ51
+MpVO98IkoLvGSI/0sGNP3GKNhC+eMGjJAVwFyEuOn+JsmMv9Y9uStIVi5tIHIhKw
+m7mp8il0kaftHdSxTbspG3tZ2fjIiFIZkLEOmRpd7ogWumgOajzUdA==
+-----END RSA PRIVATE KEY-----`, {
+ options: {
+ environment: "browser",
+ encryptionScheme: "pkcs1_oaep"
+ }
+ });
+ console.log("decryptedWithPrivate");
+ console.log(decryptedWithPrivate);
+ (() => {
+ let key = new NODERSA.NodeRSA({
+ b: 1024
+ });
+ key.setOptions({
+ encryptionScheme: "pkcs1"
+ });
+ let text = `你好drpy node-ras`;
+ let encrypted = key.encrypt(text, "base64");
+ console.log("encrypted: ", encrypted);
+ const decrypted = key.decrypt(encrypted, "utf8");
+ console.log("decrypted: ", decrypted)
+ })();
+ 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();
@@ -30,7 +194,7 @@ function pre() {
}
let rule = {};
let vercode = typeof pdfl === "function" ? "drpy2.1" : "drpy2";
-const VERSION = vercode + " 3.9.49beta40 202400426";
+const VERSION = vercode + " 3.9.50beta17 202400524";
const MOBILE_UA = "Mozilla/5.0 (Linux; Android 11; M2007J3SC Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045714 Mobile Safari/537.36";
const PC_UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36";
const UA = "Mozilla/5.0";
@@ -40,7 +204,7 @@ const RULE_CK = "cookie";
const CATE_EXCLUDE = "首页|留言|APP|下载|资讯|新闻|动态";
const TAB_EXCLUDE = "猜你|喜欢|下载|剧情|热播";
const OCR_RETRY = 3;
-const OCR_API = "http://drpy.nokia.press:8028/ocr/drpy/text";
+const OCR_API = "https://api.nn.ci/ocr/b64/text";
if (typeof MY_URL === "undefined") {
var MY_URL
}
@@ -61,6 +225,91 @@ const NOADD_INDEX = /:eq|:lt|:gt|:first|:last|^body$|^#/;
const URLJOIN_ATTR = /(url|src|href|-original|-src|-play|-url|style)$/;
const SELECT_REGEX = /:eq|:lt|:gt|#/g;
const SELECT_REGEX_A = /:eq|:lt|:gt/g;
+const $js = {
+ toString(func) {
+ let strfun = func.toString();
+ return strfun.replace(/^\(\)(\s+)?=>(\s+)?\{/, "js:")
+ .replace(/\}$/, "")
+ }
+};
+
+function window_b64() {
+ let b64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+ let base64DecodeChars = new Array(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
+
+ function btoa(str) {
+ var out, i, len;
+ var c1, c2, c3;
+ len = str.length;
+ i = 0;
+ out = "";
+ while (i < len) {
+ c1 = str.charCodeAt(i++) & 255;
+ if (i == len) {
+ out += b64map.charAt(c1 >> 2);
+ out += b64map.charAt((c1 & 3) << 4);
+ out += "==";
+ break
+ }
+ c2 = str.charCodeAt(i++);
+ if (i == len) {
+ out += b64map.charAt(c1 >> 2);
+ out += b64map.charAt((c1 & 3) << 4 | (c2 & 240) >> 4);
+ out += b64map.charAt((c2 & 15) << 2);
+ out += "=";
+ break
+ }
+ c3 = str.charCodeAt(i++);
+ out += b64map.charAt(c1 >> 2);
+ out += b64map.charAt((c1 & 3) << 4 | (c2 & 240) >> 4);
+ out += b64map.charAt((c2 & 15) << 2 | (c3 & 192) >> 6);
+ out += b64map.charAt(c3 & 63)
+ }
+ return out
+ }
+ function atob(str) {
+ var c1, c2, c3, c4;
+ var i, len, out;
+ len = str.length;
+ i = 0;
+ out = "";
+ while (i < len) {
+ do {
+ c1 = base64DecodeChars[str.charCodeAt(i++) & 255]
+ } while (i < len && c1 == -1);
+ if (c1 == -1) break;
+ do {
+ c2 = base64DecodeChars[str.charCodeAt(i++) & 255]
+ } while (i < len && c2 == -1);
+ if (c2 == -1) break;
+ out += String.fromCharCode(c1 << 2 | (c2 & 48) >> 4);
+ do {
+ c3 = str.charCodeAt(i++) & 255;
+ if (c3 == 61) return out;
+ c3 = base64DecodeChars[c3]
+ } while (i < len && c3 == -1);
+ if (c3 == -1) break;
+ out += String.fromCharCode((c2 & 15) << 4 | (c3 & 60) >> 2);
+ do {
+ c4 = str.charCodeAt(i++) & 255;
+ if (c4 == 61) return out;
+ c4 = base64DecodeChars[c4]
+ } while (i < len && c4 == -1);
+ if (c4 == -1) break;
+ out += String.fromCharCode((c3 & 3) << 6 | c4)
+ }
+ return out
+ }
+ return {
+ atob: atob,
+ btoa: btoa
+ }
+}
+if (typeof atob != "function" || typeof btoa != "function") {
+ var {
+ atob, btoa
+ } = window_b64()
+}
if (typeof Object.assign != "function") {
Object.assign = function() {
let target = arguments[0];
@@ -107,7 +356,8 @@ if (!Array.prototype.includes) {
k++
}
return false
- }
+ },
+ enumerable: false
})
}
if (typeof String.prototype.startsWith != "function") {
@@ -120,20 +370,8 @@ if (typeof String.prototype.endsWith != "function") {
return this.indexOf(suffix, this.length - suffix.length) !== -1
}
}
-Object.prototype.myValues = function(obj) {
- if (obj == null) {
- throw new TypeError("Cannot convert undefined or null to object")
- }
- var res = [];
- for (var k in obj) {
- if (obj.hasOwnProperty(k)) {
- res.push(obj[k])
- }
- }
- return res
-};
-if (typeof Object.prototype.values != "function") {
- Object.prototype.values = function(obj) {
+Object.defineProperty(Object.prototype, "myValues", {
+ value: function(obj) {
if (obj == null) {
throw new TypeError("Cannot convert undefined or null to object")
}
@@ -144,44 +382,77 @@ if (typeof Object.prototype.values != "function") {
}
}
return res
- }
+ },
+ enumerable: false
+});
+if (typeof Object.prototype.values != "function") {
+ Object.defineProperty(Object.prototype, "values", {
+ value: function(obj) {
+ if (obj == null) {
+ throw new TypeError("Cannot convert undefined or null to object")
+ }
+ var res = [];
+ for (var k in obj) {
+ if (obj.hasOwnProperty(k)) {
+ res.push(obj[k])
+ }
+ }
+ return res
+ },
+ enumerable: false
+ })
}
if (typeof Array.prototype.join != "function") {
- Array.prototype.join = function(emoji) {
- emoji = emoji || "";
- let self = this;
- let str = "";
- let i = 0;
- if (!Array.isArray(self)) {
- throw String(self) + "is not Array"
- }
- if (self.length === 0) {
- return ""
- }
- if (self.length === 1) {
- return String(self[0])
- }
- i = 1;
- str = this[0];
- for (; i < self.length; i++) {
- str += String(emoji) + String(self[i])
- }
- return str
- }
+ Object.defineProperty(Array.prototype, "join", {
+ value: function(emoji) {
+ emoji = emoji || "";
+ let self = this;
+ let str = "";
+ let i = 0;
+ if (!Array.isArray(self)) {
+ throw String(self) + "is not Array"
+ }
+ if (self.length === 0) {
+ return ""
+ }
+ if (self.length === 1) {
+ return String(self[0])
+ }
+ i = 1;
+ str = this[0];
+ for (; i < self.length; i++) {
+ str += String(emoji) + String(self[i])
+ }
+ return str
+ },
+ enumerable: false
+ })
}
if (typeof Array.prototype.toReversed != "function") {
- Array.prototype.toReversed = function() {
- const clonedList = this.slice();
- const reversedList = clonedList.reverse();
- return reversedList
- }
+ Object.defineProperty(Array.prototype, "toReversed", {
+ value: function() {
+ const clonedList = this.slice();
+ const reversedList = clonedList.reverse();
+ return reversedList
+ },
+ enumerable: false
+ })
}
-String.prototype.rstrip = function(chars) {
- let regex = new RegExp(chars + "$");
- return this.replace(regex, "")
-};
-Array.prototype.append = Array.prototype.push;
-String.prototype.strip = String.prototype.trim;
+Object.defineProperty(Array.prototype, "append", {
+ value: Array.prototype.push,
+ enumerable: false
+});
+Object.defineProperty(String.prototype, "strip", {
+ value: String.prototype.trim,
+ enumerable: false
+});
+Object.defineProperty(String.prototype, "rstrip", {
+ value: function(chars) {
+ let regex = new RegExp(chars + "$");
+ return this.replace(regex, "")
+ },
+ enumerable: false
+});
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");
@@ -336,6 +607,59 @@ 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;
+ out = "";
+ len = array.length;
+ i = 0;
+ while (i < len) {
+ c = array[i++];
+ switch (c >> 4) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ out += String.fromCharCode(c);
+ break;
+ case 12:
+ case 13:
+ char2 = array[i++];
+ out += String.fromCharCode((c & 31) << 6 | char2 & 63);
+ break;
+ case 14:
+ char2 = array[i++];
+ char3 = array[i++];
+ out += String.fromCharCode((c & 15) << 12 | (char2 & 63) << 6 | (char3 & 63) << 0);
+ break
+ }
+ }
+ return out
+}
+function gzip(str) {
+ let arr = pako.gzip(str, {
+ to: "string"
+ });
+ return uint8ArrayToBase64(arr)
+}
+function ungzip(b64Data) {
+ let strData = atob(b64Data);
+ const charData = strData.split("")
+ .map(function(x) {
+ return x.charCodeAt(0)
+ });
+ const binData = new Uint8Array(charData);
+ const data = pako.inflate(binData);
+ return Utf8ArrayToStr(data)
+}
function encodeStr(input, encoding) {
encoding = encoding || "gbk";
if (encoding.startsWith("gb")) {
@@ -472,9 +796,12 @@ function fixAdM3u8(m3u8_text, m3u8_url, ad_remove) {
.trim();
return m3u8_text
}
-function fixAdM3u8Ai(m3u8_url) {
+function fixAdM3u8Ai(m3u8_url, headers) {
let ts = (new Date)
.getTime();
+ let option = headers ? {
+ headers: headers
+ } : {};
function b(s1, s2) {
let i = 0;
@@ -491,16 +818,22 @@ function fixAdM3u8Ai(m3u8_url) {
.reverse()
.join("")
}
- let m3u8 = request(m3u8_url);
+ let m3u8 = request(m3u8_url, option);
m3u8 = m3u8.trim()
.split("\n")
.map(it => it.startsWith("#") ? it : urljoin(m3u8_url, it))
.join("\n");
+ m3u8 = m3u8.replace(/\n\n/gi, "\n");
let last_url = m3u8.split("\n")
.slice(-1)[0];
+ if (last_url.length < 5) {
+ last_url = m3u8.split("\n")
+ .slice(-2)[0]
+ }
if (last_url.includes(".m3u8") && last_url !== m3u8_url) {
- m3u8_url = last_url;
- m3u8 = request(m3u8_url)
+ m3u8_url = urljoin2(m3u8_url, last_url);
+ log("嵌套的m3u8_url:" + m3u8_url);
+ m3u8 = request(m3u8_url, option)
}
let s = m3u8.trim()
.split("\n")
@@ -513,12 +846,14 @@ function fixAdM3u8Ai(m3u8_url) {
let ml = Math.round(ss.length / 2)
.toString()
.length;
+ let maxc = 0;
let laststr = ss.toReversed()
.find(x => {
if (!x.startsWith("#")) {
let k = b(reverseString(firststr), reverseString(x));
maxl = b(firststr, x);
- if (firststrlen - maxl <= ml + k) {
+ maxc++;
+ if (firststrlen - maxl <= ml + k || maxc > 10) {
return true
}
}
@@ -587,6 +922,26 @@ let LISTS = [];
globalThis.encodeUrl = urlencode;
globalThis.urlencode = urlencode;
+function getQuery(url) {
+ try {
+ if (url.indexOf("?") > -1) {
+ url = url.slice(url.indexOf("?") + 1)
+ }
+ let arr = url.split("#")[0].split("&");
+ const resObj = {};
+ arr.forEach(item => {
+ let arr1 = item.split("=");
+ let key = arr1[0];
+ let value = arr1.slice(1)
+ .join("=");
+ resObj[key] = value
+ });
+ return resObj
+ } catch (err) {
+ log("getQuery发生错误:" + e.message);
+ return {}
+ }
+}
function urljoin(fromPath, nowPath) {
fromPath = fromPath || "";
nowPath = nowPath || "";
@@ -774,15 +1129,22 @@ var OcrApi = {
let code = "";
try {
log("通过drpy_ocr验证码接口过验证...");
- let html = request(OCR_API, {
- data: {
- img: img
- },
- headers: {
- "User-Agent": PC_UA
- },
- method: "POST"
- }, true);
+ let html = "";
+ if (this.api.endsWith("drpy/text")) {
+ html = request(this.api, {
+ data: {
+ img: img
+ },
+ headers: {
+ "User-Agent": PC_UA
+ },
+ method: "POST"
+ }, true)
+ } else {
+ html = post(this.api, {
+ body: img
+ })
+ }
code = html || ""
} catch (e) {
log(`OCR识别验证码发生错误:${e.message}`)
@@ -877,7 +1239,7 @@ function buildUrl(url, obj) {
url += prs;
return url
}
-function require(url) {
+function $require(url) {
eval(request(url))
}
function request(url, obj, ocr_flag) {
@@ -950,6 +1312,27 @@ function post(url, obj) {
obj.method = "POST";
return request(url, obj)
}
+function reqCookie(url, obj, all_cookie) {
+ obj = obj || {};
+ obj.withHeaders = true;
+ all_cookie = all_cookie || false;
+ let html = request(url, obj);
+ let json = JSON.parse(html);
+ let setCk = Object.keys(json)
+ .find(it => it.toLowerCase() === "set-cookie");
+ let cookie = setCk ? json[setCk] : "";
+ if (Array.isArray(cookie)) {
+ cookie = cookie.join(";")
+ }
+ if (!all_cookie) {
+ cookie = cookie.split(";")[0]
+ }
+ html = json.body;
+ return {
+ cookie: cookie,
+ html: html
+ }
+}
fetch = request;
print = function(data) {
data = data || "";
@@ -1307,6 +1690,7 @@ function categoryParse(cateObj) {
} else {
url = url.replace("fyfilter", rule.filter_url)
}
+ url = url.replaceAll("fyclass", cateObj.tid);
let fl = cateObj.filter ? cateObj.extend : {};
if (rule.filter_def && typeof rule.filter_def === "object") {
try {
@@ -1874,7 +2258,11 @@ function detailParse(detailObj) {
let t2 = (new Date)
.getTime();
console.log(`加载二级界面${MY_URL}耗时:${t2-t1}毫秒`);
- vod = vodDeal(vod);
+ try {
+ vod = vodDeal(vod)
+ } catch (e) {
+ console.log(`vodDeal发生错误:${e.message}`)
+ }
return JSON.stringify({
list: [vod]
})
@@ -1950,8 +2338,11 @@ function playParse(playObj) {
lazy_play = common_play
} else if (rule.play_parse && rule.lazy && typeof rule.lazy === "string") {
try {
- let lazy_code = rule.lazy.replace("js:", "")
- .trim();
+ let lazy_code = rule.lazy.trim();
+ if (lazy_code.startsWith("js:")) {
+ lazy_code = lazy_code.replace("js:", "")
+ .trim()
+ }
print("开始执行js免嗅=>" + lazy_code);
eval(lazy_code);
lazy_play = typeof input === "object" ? input : {
@@ -2037,13 +2428,19 @@ function init(ext) {
if (typeof ext == "object") {
rule = ext
} else if (typeof ext == "string") {
- if (ext.startsWith("http")) {
+ if (ext.startsWith("http") || ext.startsWith("file://")) {
+ let query = getQuery(ext);
let js = request(ext, {
method: "GET"
});
if (js) {
eval(js.replace("var rule", "rule"))
}
+ if (query.type === "url" && query.params) {
+ rule.params = urljoin(ext, query.params)
+ } else if (query.params) {
+ rule.params = query.params
+ }
} else {
eval(ext.replace("var rule", "rule"))
}
@@ -2109,9 +2506,15 @@ function init(ext) {
rule.play_json = rule.hasOwnProperty("play_json") ? rule.play_json : [];
rule.pagecount = rule.hasOwnProperty("pagecount") ? rule.pagecount : {};
rule.proxy_rule = rule.hasOwnProperty("proxy_rule") ? rule.proxy_rule : "";
+ if (!rule.hasOwnProperty("sniffer")) {
+ rule.sniffer = false
+ }
rule.sniffer = rule.hasOwnProperty("sniffer") ? rule.sniffer : "";
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*"
+ }
rule.tab_remove = rule.hasOwnProperty("tab_remove") ? rule.tab_remove : [];
rule.tab_order = rule.hasOwnProperty("tab_order") ? rule.tab_order : [];
rule.tab_rename = rule.hasOwnProperty("tab_rename") ? rule.tab_rename : {};
@@ -2160,6 +2563,15 @@ let homeHtmlCache = undefined;
function home(filter) {
console.log("home");
+ if (typeof rule.filter === "string" && rule.filter.trim()
+ .length > 0) {
+ try {
+ let filter_json = ungzip(rule.filter.trim());
+ rule.filter = JSON.parse(filter_json)
+ } catch (e) {
+ rule.filter = {}
+ }
+ }
let homeObj = {
filter: rule.filter || false,
MY_URL: rule.homeUrl,
@@ -2298,7 +2710,8 @@ function DRPY() {
search: search,
proxy: proxy,
sniffer: sniffer,
- isVideo: isVideo
+ isVideo: isVideo,
+ fixAdM3u8Ai: fixAdM3u8Ai
}
}
export
@@ -2313,5 +2726,6 @@ default {
proxy: proxy,
sniffer: sniffer,
isVideo: isVideo,
+ fixAdM3u8Ai: fixAdM3u8Ai,
DRPY: DRPY
};
\ No newline at end of file
diff --git a/JS/jsencrypt.js b/JS/jsencrypt.js
index fa3006c..e946a64 100644
--- a/JS/jsencrypt.js
+++ b/JS/jsencrypt.js
@@ -1,265 +1,265 @@
-/*
- * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
- * This devtool is neither made for production nor for readable output files.
- * It uses "eval()" calls to create a separate source file in the browser devtools.
- * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
- * or disable the default devtool with "devtool: false".
- * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
- */
-(function webpackUniversalModuleDefinition(root, factory) {
- if (typeof exports === 'object' && typeof module === 'object') {
- // CommonJS
- module.exports = exports = factory();
- } else if (typeof define === 'function' && define.amd) {
- // AMD
- define([], factory);
- } else {
- // Global (browser)
- globalThis.JSEncrypt = factory();
- }
-})(this, () => {
-return /******/ (() => { // webpackBootstrap
-/******/ var __webpack_modules__ = ({
-
-/***/ "./lib/JSEncrypt.js":
-/*!**************************!*\
- !*** ./lib/JSEncrypt.js ***!
- \**************************/
-/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
-
-"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"JSEncrypt\": () => (/* binding */ JSEncrypt)\n/* harmony export */ });\n/* harmony import */ var _lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/jsbn/base64 */ \"./lib/lib/jsbn/base64.js\");\n/* harmony import */ var _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./JSEncryptRSAKey */ \"./lib/JSEncryptRSAKey.js\");\n/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \"./node_modules/process/browser.js\");\nvar _a;\n\n\nvar version = typeof process !== 'undefined'\n ? (_a = process.env) === null || _a === void 0 ? void 0 : \"3.3.2\"\n : undefined;\n/**\n *\n * @param {Object} [options = {}] - An object to customize JSEncrypt behaviour\n * possible parameters are:\n * - default_key_size {number} default: 1024 the key size in bit\n * - default_public_exponent {string} default: '010001' the hexadecimal representation of the public exponent\n * - log {boolean} default: false whether log warn/error or not\n * @constructor\n */\nvar JSEncrypt = /** @class */ (function () {\n function JSEncrypt(options) {\n if (options === void 0) { options = {}; }\n options = options || {};\n this.default_key_size = options.default_key_size\n ? parseInt(options.default_key_size, 10)\n : 1024;\n this.default_public_exponent = options.default_public_exponent || \"010001\"; // 65537 default openssl public exponent for rsa key type\n this.log = options.log || false;\n // The private and public key.\n this.key = null;\n }\n /**\n * Method to set the rsa key parameter (one method is enough to set both the public\n * and the private key, since the private key contains the public key paramenters)\n * Log a warning if logs are enabled\n * @param {Object|string} key the pem encoded string or an object (with or without header/footer)\n * @public\n */\n JSEncrypt.prototype.setKey = function (key) {\n if (this.log && this.key) {\n console.warn(\"A key was already set, overriding existing.\");\n }\n this.key = new _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__.JSEncryptRSAKey(key);\n };\n /**\n * Proxy method for setKey, for api compatibility\n * @see setKey\n * @public\n */\n JSEncrypt.prototype.setPrivateKey = function (privkey) {\n // Create the key.\n this.setKey(privkey);\n };\n /**\n * Proxy method for setKey, for api compatibility\n * @see setKey\n * @public\n */\n JSEncrypt.prototype.setPublicKey = function (pubkey) {\n // Sets the public key.\n this.setKey(pubkey);\n };\n /**\n * Proxy method for RSAKey object's decrypt, decrypt the string using the private\n * components of the rsa key object. Note that if the object was not set will be created\n * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor\n * @param {string} str base64 encoded crypted string to decrypt\n * @return {string} the decrypted string\n * @public\n */\n JSEncrypt.prototype.decrypt = function (str) {\n // Return the decrypted string.\n try {\n return this.getKey().decrypt((0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.b64tohex)(str));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's encrypt, encrypt the string using the public\n * components of the rsa key object. Note that if the object was not set will be created\n * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor\n * @param {string} str the string to encrypt\n * @return {string} the encrypted string encoded in base64\n * @public\n */\n JSEncrypt.prototype.encrypt = function (str) {\n // Return the encrypted string.\n try {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getKey().encrypt(str));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's sign.\n * @param {string} str the string to sign\n * @param {function} digestMethod hash method\n * @param {string} digestName the name of the hash algorithm\n * @return {string} the signature encoded in base64\n * @public\n */\n JSEncrypt.prototype.sign = function (str, digestMethod, digestName) {\n // return the RSA signature of 'str' in 'hex' format.\n try {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getKey().sign(str, digestMethod, digestName));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's verify.\n * @param {string} str the string to verify\n * @param {string} signature the signature encoded in base64 to compare the string to\n * @param {function} digestMethod hash method\n * @return {boolean} whether the data and signature match\n * @public\n */\n JSEncrypt.prototype.verify = function (str, signature, digestMethod) {\n // Return the decrypted 'digest' of the signature.\n try {\n return this.getKey().verify(str, (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.b64tohex)(signature), digestMethod);\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Getter for the current JSEncryptRSAKey object. If it doesn't exists a new object\n * will be created and returned\n * @param {callback} [cb] the callback to be called if we want the key to be generated\n * in an async fashion\n * @returns {JSEncryptRSAKey} the JSEncryptRSAKey object\n * @public\n */\n JSEncrypt.prototype.getKey = function (cb) {\n // Only create new if it does not exist.\n if (!this.key) {\n // Get a new private key.\n this.key = new _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__.JSEncryptRSAKey();\n if (cb && {}.toString.call(cb) === \"[object Function]\") {\n this.key.generateAsync(this.default_key_size, this.default_public_exponent, cb);\n return;\n }\n // Generate the key.\n this.key.generate(this.default_key_size, this.default_public_exponent);\n }\n return this.key;\n };\n /**\n * Returns the pem encoded representation of the private key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the private key WITH header and footer\n * @public\n */\n JSEncrypt.prototype.getPrivateKey = function () {\n // Return the private representation of this key.\n return this.getKey().getPrivateKey();\n };\n /**\n * Returns the pem encoded representation of the private key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the private key WITHOUT header and footer\n * @public\n */\n JSEncrypt.prototype.getPrivateKeyB64 = function () {\n // Return the private representation of this key.\n return this.getKey().getPrivateBaseKeyB64();\n };\n /**\n * Returns the pem encoded representation of the public key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the public key WITH header and footer\n * @public\n */\n JSEncrypt.prototype.getPublicKey = function () {\n // Return the private representation of this key.\n return this.getKey().getPublicKey();\n };\n /**\n * Returns the pem encoded representation of the public key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the public key WITHOUT header and footer\n * @public\n */\n JSEncrypt.prototype.getPublicKeyB64 = function () {\n // Return the private representation of this key.\n return this.getKey().getPublicBaseKeyB64();\n };\nvar b64map=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";var b64pad=\"=\";var base64DecodeChars=new Array(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1);function btoa(str){var out,i,len;var c1,c2,c3;len=str.length;i=0;out=\"\";while(i \n * This name space provides following name spaces:\n * \n *
\n *
\n * This is ITU-T X.690 ASN.1 DER encoder class library and\n * class structure and methods is very similar to\n * org.bouncycastle.asn1 package of\n * well known BouncyCaslte Cryptography Library.\n *
\n * {TYPE-OF-ASNOBJ: ASN1OBJ-PARAMETER}\n *\n * 'TYPE-OF-ASN1OBJ' can be one of following symbols:\n *
\n * This name space provides following name spaces:\n *
\n * This is ITU-T X.690 ASN.1 DER encoder class library and\n * class structure and methods is very similar to\n * org.bouncycastle.asn1 package of\n * well known BouncyCaslte Cryptography Library.\n *
\n * {TYPE-OF-ASNOBJ: ASN1OBJ-PARAMETER}\n *\n * 'TYPE-OF-ASN1OBJ' can be one of following symbols:\n *
>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(P=r[i]).high^=s,P.low^=o}for(var a=0;a<24;a++){for(var p=0;p<5;p++){for(var l=0,y=0,g=0;g<5;g++)l^=(P=r[p+5*g]).high,y^=P.low;var d=h[p];d.high=l,d.low=y}for(p=0;p<5;p++){var v=h[(p+4)%5],m=h[(p+1)%5],S=m.high,_=m.low;for(l=v.high^(S<<1|_>>>31),y=v.low^(_<<1|S>>>31),g=0;g<5;g++)(P=r[p+5*g]).high^=l,P.low^=y}for(var b=1;b<25;b++){var E=(P=r[b]).high,w=P.low,O=f[b];O<32?(l=E< >>=p,c-=p),c<15&&(f+=z[a++]< o){t.msg="invalid distance too far back",E.mode=he;break t}if(f>>>=p,c-=p,p=n-s,v>p){if(p=v-p,p>h&&E.sane){t.msg="invalid distance too far back",E.mode=he;break t}if(y=0,x=_,0===d){if(y+=l-p,p>>0?1:0))+nt+((V+=it)>>>0
>>0?1:0),Ot=vt+gt;G=F,q=z,F=j,z=H,j=U,H=M,U=L+(wt=(wt=(wt=wt+pt+((ht+=lt)>>>0
>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),e[31+(n+128>>>10<<5)]=r,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=e._createHelper(c),t.HmacSHA512=e._createHmacHelper(c)}(),n.SHA512)},7628:function(t,e,r){var n;t.exports=(n=r(9021),r(754),r(4636),r(9506),r(7165),function(){var t=n,e=t.lib,r=e.WordArray,i=e.BlockCipher,o=t.algo,s=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],a=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],f=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],c=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=o.DES=i.extend({_doReset:function(){for(var t=this._key.words,e=[],r=0;r<56;r++){var n=s[r]-1;e[r]=t[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var u=i[o]=[],c=f[o];for(r=0;r<24;r++)u[r/6|0]|=e[(a[r]-1+c)%28]<<31-r%6,u[4+(r/6|0)]|=e[28+(a[r+24]-1+c)%28]<<31-r%6;for(u[0]=u[0]<<1|u[0]>>>31,r=1;r<7;r++)u[r]=u[r]>>>4*(r-1)+3;u[7]=u[7]<<5|u[7]>>>27}var h=this._invSubKeys=[];for(r=0;r<16;r++)h[r]=i[15-r]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,r){this._lBlock=t[e],this._rBlock=t[e+1],p.call(this,4,252645135),p.call(this,16,65535),l.call(this,2,858993459),l.call(this,8,16711935),p.call(this,1,1431655765);for(var n=0;n<16;n++){for(var i=r[n],o=this._lBlock,s=this._rBlock,a=0,f=0;f<8;f++)a|=u[f][((s^i[f])&c[f])>>>0];this._lBlock=s,this._rBlock=o^a}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,p.call(this,1,1431655765),l.call(this,8,16711935),l.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function p(t,e){var r=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=r,this._lBlock^=r<
0)throw Error("Incorrect data or key");for(var r=[],i=0,o=0,s=t.length/this.encryptedDataLength,a=0;a>3},t}()},2487:(t,e,r)=>{var n=r(8287).Buffer,i=(r(1973),r(3200));t.exports={isEncryption:!0,isSignature:!1},t.exports.digestLength={md4:16,md5:16,ripemd160:20,rmd160:20,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64};var o="sha1";t.exports.eme_oaep_mgf1=function(e,r,s){s=s||o;for(var a=t.exports.digestLength[s],f=Math.ceil(r/a),u=n.alloc(a*f),c=n.alloc(4),h=0;h>>8^n[255&(t^e[a])];return-1^t},j={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},K={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:P,_tr_stored_block:Y,_tr_flush_block:G,_tr_tally:X,_tr_align:W}=B,{Z_NO_FLUSH:q,Z_PARTIAL_FLUSH:J,Z_FULL_FLUSH:Q,Z_FINISH:V,Z_BLOCK:$,Z_OK:tt,Z_STREAM_END:et,Z_STREAM_ERROR:at,Z_DATA_ERROR:it,Z_BUF_ERROR:nt,Z_DEFAULT_COMPRESSION:st,Z_FILTERED:rt,Z_HUFFMAN_ONLY:ot,Z_RLE:lt,Z_FIXED:ht,Z_DEFAULT_STRATEGY:dt,Z_UNKNOWN:_t,Z_DEFLATED:ft}=K,ct=258,ut=262,wt=42,mt=113,bt=666,gt=(t,e)=>(t.msg=j[e],e),pt=t=>2*t-(t>4?9:0),kt=t=>{let e=t.length;for(;--e>=0;)t[e]=0},vt=t=>{let e,a,i,n=t.w_size;e=t.hash_size,i=e;do{a=t.head[--i],t.head[i]=a>=n?a-n:0}while(--e);e=n,i=e;do{a=t.prev[--i],t.prev[i]=a>=n?a-n:0}while(--e)};let yt=(t,e,a)=>(e<>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,xt(t.strm),i&&(i>a&&(i=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,a-=i),a&&(Rt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===r);return o-=t.strm.avail_in,o&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_watert.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=X(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2})(a,e):It[a.level].func(a,e);if(3!==i&&4!==i||(a.status=bt),1===i||3===i)return 0===t.avail_out&&(a.last_flush=-1),tt;if(2===i&&(e===J?W(a):e!==$&&(Y(a,0,0,!1),e===Q&&(kt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),xt(t),0===t.avail_out))return a.last_flush=-1,tt}return e!==V?tt:a.wrap<=0?et:(2===a.wrap?(At(a,255&t.adler),At(a,t.adler>>8&255),At(a,t.adler>>16&255),At(a,t.adler>>24&255),At(a,255&t.total_in),At(a,t.total_in>>8&255),At(a,t.total_in>>16&255),At(a,t.total_in>>24&255)):(Et(a,t.adler>>>16),Et(a,65535&t.adler)),xt(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?tt:et)},deflateEnd:t=>{if(Lt(t))return at;const e=t.state.status;return t.state=null,e===mt?gt(t,it):tt},deflateSetDictionary:(t,e)=>{let a=e.length;if(Lt(t))return at;const i=t.state,n=i.wrap;if(2===n||1===n&&i.status!==wt||i.lookahead)return at;if(1===n&&(t.adler=C(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(kt(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(a-i.w_size,a),0),e=t,a=i.w_size}const s=t.avail_in,r=t.next_in,o=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,Ut(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=yt(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,Ut(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=r,t.input=o,t.avail_in=s,i.wrap=n,tt},deflateInfo:"pako deflate (from Nodeca project)"};const Ht=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var jt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(const e in a)Ht(a,e)&&(t[e]=a[e])}}return t},Kt=t=>{let e=0;for(let a=0,i=t.length;a=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Yt[254]=Yt[254]=1;var Gt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,i,n,s,r=t.length,o=0;for(n=0;n