mirror of
https://github.com/3288588344/toulu.git
synced 2025-12-16 23:11:00 +08:00
Delete 喜爱帮.js
This commit is contained in:
796
喜爱帮.js
796
喜爱帮.js
@@ -1,796 +0,0 @@
|
||||
/*
|
||||
|
||||
TL库:https://github.com/3288588344/toulu.git
|
||||
tg频道:https://t.me/TLtoulu
|
||||
QQ频道:https://pd.qq.com/s/672fku8ge
|
||||
|
||||
喜爱帮
|
||||
入口:https://m.xiaicn.cn/invite/740473
|
||||
邀请码:2740473
|
||||
变量 xabzh 值:手机号1#密码1@手机号2#密码2
|
||||
cron: 3 0 * * *
|
||||
*/
|
||||
const $ = new Env('喜爱帮');
|
||||
const _0x417615 = _0x26c8,
|
||||
_0x3357a1 = _0x26c8,
|
||||
_0x4197ba = _0x26c8,
|
||||
_0x25a3ec = _0x26c8,
|
||||
_0x43e8a8 = _0x4360,
|
||||
_0x2267c2 = _0x4360,
|
||||
_0x3c5bbd = _0x4360;
|
||||
(function(_0xda14df, _0x3f7fc6) {
|
||||
const _0x2f48f4 = _0x26c8,
|
||||
_0x2de429 = _0x26c8,
|
||||
_0x536443 = _0x26c8,
|
||||
_0x48140c = _0x26c8,
|
||||
_0x1bd272 = _0x26c8,
|
||||
_0xaac941 = _0x4360,
|
||||
_0x2b4670 = _0x4360,
|
||||
_0x474764 = _0x4360,
|
||||
_0x45661b = _0xda14df();
|
||||
while (!![]) {
|
||||
try {
|
||||
const _0x3bade5 = -parseInt(_0xaac941(0x1c2, 'ynYN')) / 0x1 + parseInt(_0x2f48f4('0x1bd')) / 0x2 + -parseInt(_0x2de429('0x18c')) / 0x3 + -parseInt(_0x2b4670('0x188', 'detE')) / 0x4 + parseInt(_0x2f48f4(0x1aa)) / 0x5 + parseInt(_0x474764(0x1b5, 's[2#')) / 0x6 + -parseInt(_0x536443('0x199')) / 0x7 * (-parseInt(_0x2de429(0x1c6)) / 0x8);
|
||||
if (_0x3bade5 === _0x3f7fc6) break;
|
||||
else _0x45661b['push'](_0x45661b['shift']());
|
||||
} catch (_0x58f8ad) {
|
||||
_0x45661b['push'](_0x45661b['shift']());
|
||||
}
|
||||
}
|
||||
}(_0x27bd, 0xbd562));
|
||||
|
||||
function _0x27bd() {
|
||||
const _0x32e044 = ['veRcRHldUmoy', 'W4qnsmotoSokmmoVrmor', 'z2v0vgLTzq', 'tw96AwXSys81lJaGkgLqAg9UztSGq1bvigLqAg9UzsbpuYaXm18YxZmGBgLRzsbnywmGt1mGwcKGqxbWBgvxzwjlAxqVnJa1lJeUmtuGkeTive1mlcbSAwTLieDLy2TVksbwzxjZAw9UlZeZlJaUmYbnB2jPBguVmtvfmtq4ifnHzMfYAs82mdqUmq', 'W4DOzCozWOWRDmkp', 'WOrelZu', 'BNvSBa', 'jL90yxjNzxrFCgf0Ad0Mx3vZzxjUyw1Lpq', 'Bwf0y2G', 'mSkZmKJcUJLdW5e', 'C1ZcI3W', 'e1Wx', '6lYY5O6v5zgD', 'zNjVBq', 'WPK4W4lcIa', 'mSkspCkaiLu', 'cUwwNoEiSEw4RUETVUwiSowKSEI0PE+8MG', 'ltBdVxe', 'nmkOA1VcQgaeWPTnWQr9xqVdKxLpcZRcSCoH', 'nsr1WOlcNSoHW53dIcFdPa', 'BxnN', 'WRzaW6ZdTSkmWR7dNCksyG', '5AsP77Ym6i635B6x77YA', 'fLtdTmkqW4eeyCodW7NcSG', 'C2LNBKnVDw50', 'yxbWBgLJyxrPB24VEc13D3CTzM9YBs11CMXLBMnVzgvK', 'BM93', 'AM9PBG', 'cUETVUwiSdi25AsP5Aww5yQX6Akg5y+w6i635B6x77YA', 'WPldTsjPF2qU', '5Q+I5lUJ5A2t56+5', 'W7/NR67LIAy/kowKUEwKMEwlI+MIIEwnIowMNUI3GU++LG', 'bhvXtSkoySkDWRJcVce4W5BdJutcTtddM8oFlGyPFW', 'z3PPCcWGzgvMBgf0zsWGyNi', 'W7FcNJu', 'nIrwW6frWQq', 'DCkQkKm2vmk7gtBdPX5+WQVcICojW7dcKCotW7NcG8oRWRWOEtDCW4FcOfrqDSoMfveFh8oZcCk1WOFcMSkmW5zEDqzYWP7dMZ9mzhWTEthdNSowW5rnWQqIW7PAWOncWPZdSWK1W7L9W77cJsiUWRpdJmk+DYeRuK7cMmkVgWBdNmksC8kRB3TEW7VdTSk+WO7dSHBcRw4ZnCozWRLPkCkSW68yW69tWQ9CyuWDWO3cOe0vgmohwmoLWQBcOKr5W5PdsCkmuCktfCoY', 'bCoaqu8', 'W5tcHcddKZmmy8oxamoaoGtdTc3cP8kokJ4DhYyxraK5W60IW7ZdNCoZ', 'BmotWOJcSq', 'W4vOlW', 'tCkCBhKDtu4EWRBcNbCeWRxdShZcVLpcQCkxWRlcMSk2ybuTWQb9WPK', 'c8oIWRK', 'rNnVomoTW7xcP8omW6dcVSo7W4fl', 'W5JcVxSGmZ1IvYlcS8kcW4RcOw/LHAG', 'Bg9NrxjY', 'p8kMW7BcLSkHxYil', 'nda2mdG1n3b6tNzjvq', 'WPtdSJvPE3z/sZ3cRCkBW5lcUNGHra', 'zMXVB3i', 'hfWuW6q', 'yxbWBgLJyxrPB24VANnVBIWGAw1Hz2uVD2vICa', 'FK3cHCkeaKRdPSkF', 'F0FcTSokWQmrW6/dPSkIWQVcV8kXtae', 'y3nYzLrVA2vUpq', 'AgvHzgvYCW', 'cUwwNoEiSEw4RUEzU+MzHUwKSEI0PE+8MG', 'AuddVa', 'cUwwNoEiSEw4RUs7U+wkOEwKSEI0PE+8MG', 'FLZdGNO7W5FcM2y', 'mteYrvfXueLP', 'cSoWArLQdSoVtNdcPgaoW7a', 'CgfYC2u', 'C3bSAxq', 'Aw5KzxG', 'W7zKo8oiWOSxAmkffSkwWRv6', 'AxnoB2rL', 'CMfUzg9T', 'EMGTq04SEMG7Ct0WlJK', 'BM8Ty2fJAgu', 'hNSVrSkMzCoiW6W', 'WOrklJldMW', 'WPaKW4S', 'Ahr0Chm6lY9TlNHPywLJBI5JB20VDxnLCI9Hy3rPDMuVzgfPBhLFC2LNBG', 'cUw8GowNI+oaKowwNoEiSEw4RG', 'WPtdOczHD3mUdMBdSCobW4JdPJX2eWH3WR3dPd3dTgDvemo3jqO', 'lmksi8kln15tWODbWPm', 'mJu5mZa2nxHZBu5qCW', 'cUs7IUAxPEs7U+wkOE+8MG', 'kYddRmkRt3ZcNqZcN8oPW4pcNSkQiZmllZddTmoD', 'Cg3cQmoPdxBcGNVcM8kPW5FcS8kS', 'oUwxSoEkKEw4PEwUNoAlL+s6T+wjIo+8HG', 'D2fPDa', 'zgf0yq', 'Dg9tDhjPBMC', 'AchdRenKWRm8WRT5W6KeDSk7aG', 'dw/dRmoLgmknlCoIAfldHvKPWPWzrcK', 'zMLUywXSEq', 'ehVcGSkpW7aMDComW4m2t0m', 'rmkyAguhfabfWRldNqfcWR7dQNdcVLhdQSkrWRldLmkYzeL1WQLWWO56iW', 'Ahr0Chm6lY9TlNHPywLJBI5JB20', 'EgfIEMG', '77Ym6i635B6x77YA', 'cL0uW6q9C8oQW5JdIW', 'WPtdOczHD3mUdMBdSCobW4JdTgjUcLn6WRldPI7dVI8pfCo+iHtcSCknW50SW6C', 'W4BLLixNIOxLUlKe5lU65PA35Bw7562w5yIZ', 'mJGZody5nhbfC21AAW', 'Bg9N', 'WQXDW7ez', 'psRdJSoLv8k4W68d', 'oty1ode2sw5NsK1j', 'W55lWQbiW7XlWQ/dPSolEfam', 'EfBdNmkxebpcOCovWPm5sxpcL8oGWPvIosruW5GeyaazC0O3j8kvEtFcOCkZWQ1nW7BdRqPUW7lcGSoWW4VdJujRW6ldOH1DsrZdJ8kgEmoilW', 'WRRcK8kiqW', 'o8koW5ix', 'otKWodmYD1jtq3Pb', 'W7FdLmkVW4RcSSkUW5LAW7RdPur0BdS', 'Ahr0Chm6lY9TlNHPywLJBI5JB20VDxnLCI9Hy3rPDMuVCgvYAw9Kx3rHC2SVCMv3yxjKp19Yyw5KB209', 'Ahr0Chm6lY9TlNHPywLJBI5JB20Vy2fZl2XVz2LU', 'zKFdUSo7WQXj', 'CMv3yxjKtw9UzxK', 'nx4+WOhdJG7dPIJcLJH8xSozrCkQlWm', 'W7JcMtpdIrb0WQmJymoR', 'cUwwNoEiSEw4RUI/NUE7REETVUwiSo+8MG', 's0RcTfJdR8oFW6y5W6NdTW', 'DgfZA0LKpte1mIzPC0n1CNjLBNq9', 'cUAyQoAxPEs7U+wkOE+8MG', 'wwWaW6aOACoZW5ldNwFcIq', 'qmkdEW', 'BgvUz3rO', 'cCovqv5DWQrOp8kKEtVdGZZdOCk3CmkffwtcMG', 'yMfZzty0'];
|
||||
_0x27bd = function() {
|
||||
return _0x32e044;
|
||||
};
|
||||
return _0x27bd();
|
||||
}
|
||||
let status;
|
||||
status = (status = $['getval'](_0x43e8a8(0x174, 'vvki')) || '1') > 0x1 ? '' + status : '';
|
||||
let xabsjhArr = [],
|
||||
xabzh = ($[_0x417615(0x19f)]() ? process['env']['xabzh'] : $[_0x2267c2('0x17a', 'x]Op')](_0x3357a1(0x1b8))) || '';
|
||||
!(async () => {
|
||||
const _0x4eb6ad = _0x417615,
|
||||
_0x1c600e = _0x3357a1,
|
||||
_0x4f66a6 = _0x3357a1,
|
||||
_0x2c7744 = _0x417615,
|
||||
_0x220c46 = _0x417615,
|
||||
_0x5187f8 = _0x417615,
|
||||
_0x12084f = _0x2267c2,
|
||||
_0x172e35 = _0x43e8a8,
|
||||
_0x5eec1c = _0x2267c2,
|
||||
_0x1f4746 = _0x2267c2;
|
||||
if (typeof $request !== _0x12084f(0x1ba, '$Sgu')) await ddtjck();
|
||||
else {
|
||||
xabsjhArr = xabzh['split']('@'), console['log'](_0x12084f(0x189, 'x]Op') + xabsjhArr[_0x5eec1c('0x1d7', 'uk*J')] + '个账号-------------\x0a');
|
||||
for (let _0x13fb9b = 0x0; _0x13fb9b < xabsjhArr[_0x4eb6ad(0x1d4)]; _0x13fb9b++) {
|
||||
xabs = xabsjhArr[_0x13fb9b], xabsjh = xabs[_0x1c600e(0x19c)]('#')[0x0], xabpwd = xabs[_0x4eb6ad(0x19c)]('#')[0x1], $[_0x1c600e('0x19d')] = _0x13fb9b + 0x1, console[_0x5eec1c(0x196, 'mdO3')](_0x4eb6ad(0x1a7) + $[_0x1c600e(0x19d)] + '】'), await xabdl(), await $['wait'](0x7d0);
|
||||
}
|
||||
}
|
||||
})()['catch'](_0x13a631 => $[_0x4197ba('0x18a')](_0x13a631))[_0x25a3ec('0x1b4')](() => $[_0x3c5bbd('0x16b', '1yt(')]());
|
||||
|
||||
function stringToBase64(_0x159131) {
|
||||
const _0x1faa53 = _0x4197ba,
|
||||
_0x456c15 = _0x25a3ec,
|
||||
_0x44c192 = _0x25a3ec;
|
||||
var _0x11ac02 = Buffer[_0x1faa53(0x16a)](_0x159131)[_0x1faa53('0x1b1')](_0x1faa53('0x1d6'));
|
||||
return _0x11ac02;
|
||||
}
|
||||
|
||||
function randomString(_0x29de0e = 0xc) {
|
||||
const _0x306bd4 = _0x417615,
|
||||
_0x524c45 = _0x4197ba,
|
||||
_0x24bd5d = _0x3c5bbd,
|
||||
_0x5e8bcc = _0x3c5bbd,
|
||||
_0x1c8125 = _0x43e8a8;
|
||||
let _0x33876a = _0x24bd5d('0x18d', 'x]Op'),
|
||||
_0x4a4170 = _0x33876a[_0x5e8bcc('0x16c', 'mF0F')],
|
||||
_0x5eb788 = '';
|
||||
for (i = 0x0; i < _0x29de0e; i++) {
|
||||
_0x5eb788 += _0x33876a[_0x1c8125('0x1ca', 'mdO3')](Math[_0x306bd4(0x18e)](Math[_0x306bd4('0x1a0')]() * _0x4a4170));
|
||||
}
|
||||
return _0x5eb788;
|
||||
}
|
||||
|
||||
function xabdl(_0xf32d2e = 0x0) {
|
||||
return new Promise(_0x1bdf08 => {
|
||||
const _0x1deef9 = _0x4360;
|
||||
let _0x5af900 = {
|
||||
'url': _0x1deef9('0x1b6', 'mNxn'),
|
||||
'headers': {
|
||||
'Cookie': randomString()
|
||||
}
|
||||
};
|
||||
$['get'](_0x5af900, async (_0x287363, _0x13c481, _0x513799) => {
|
||||
const _0x1ae2bf = _0x1deef9,
|
||||
_0x518157 = _0x1deef9,
|
||||
_0x139cd8 = _0x26c8;
|
||||
try {
|
||||
let _0x375322 = _0x13c481[_0x139cd8(0x194)][_0x1ae2bf('0x1d8', '5*FK')]['join'](';'),
|
||||
_0x2b5fe0 = _0x513799['match'](/_csrf_token" value="(.+?)"/)[0x1];
|
||||
await $[_0x518157(0x1c4, '(SFd')](0x3e8), await ddtjopen(_0x375322, _0x2b5fe0);
|
||||
} catch (_0x5be518) {} finally {
|
||||
_0x1bdf08();
|
||||
}
|
||||
}, _0xf32d2e);
|
||||
});
|
||||
}
|
||||
|
||||
function _0x4360(_0x28c156, _0x30428f) {
|
||||
const _0x27bdb8 = _0x27bd();
|
||||
return _0x4360 = function(_0x26c887, _0x4a5717) {
|
||||
_0x26c887 = _0x26c887 - 0x167;
|
||||
let _0x20a697 = _0x27bdb8[_0x26c887];
|
||||
if (_0x4360['vsUnWO'] === undefined) {
|
||||
var _0x3d6f1f = function(_0x5c9364) {
|
||||
const _0xc637e2 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
|
||||
let _0x32d805 = '',
|
||||
_0x353512 = '';
|
||||
for (let _0x71c380 = 0x0, _0x41e535, _0x13fb9b, _0x13a631 = 0x0; _0x13fb9b = _0x5c9364['charAt'](_0x13a631++); ~_0x13fb9b && (_0x41e535 = _0x71c380 % 0x4 ? _0x41e535 * 0x40 + _0x13fb9b : _0x13fb9b, _0x71c380++ % 0x4) ? _0x32d805 += String['fromCharCode'](0xff & _0x41e535 >> (-0x2 * _0x71c380 & 0x6)) : 0x0) {
|
||||
_0x13fb9b = _0xc637e2['indexOf'](_0x13fb9b);
|
||||
}
|
||||
for (let _0x159131 = 0x0, _0x11ac02 = _0x32d805['length']; _0x159131 < _0x11ac02; _0x159131++) {
|
||||
_0x353512 += '%' + ('00' + _0x32d805['charCodeAt'](_0x159131)['toString'](0x10))['slice'](-0x2);
|
||||
}
|
||||
return decodeURIComponent(_0x353512);
|
||||
};
|
||||
const _0x43601a = function(_0x29de0e, _0x33876a) {
|
||||
let _0x4a4170 = [],
|
||||
_0x5eb788 = 0x0,
|
||||
_0xf32d2e, _0x1bdf08 = '';
|
||||
_0x29de0e = _0x3d6f1f(_0x29de0e);
|
||||
let _0x5af900;
|
||||
for (_0x5af900 = 0x0; _0x5af900 < 0x100; _0x5af900++) {
|
||||
_0x4a4170[_0x5af900] = _0x5af900;
|
||||
}
|
||||
for (_0x5af900 = 0x0; _0x5af900 < 0x100; _0x5af900++) {
|
||||
_0x5eb788 = (_0x5eb788 + _0x4a4170[_0x5af900] + _0x33876a['charCodeAt'](_0x5af900 % _0x33876a['length'])) % 0x100, _0xf32d2e = _0x4a4170[_0x5af900], _0x4a4170[_0x5af900] = _0x4a4170[_0x5eb788], _0x4a4170[_0x5eb788] = _0xf32d2e;
|
||||
}
|
||||
_0x5af900 = 0x0, _0x5eb788 = 0x0;
|
||||
for (let _0x287363 = 0x0; _0x287363 < _0x29de0e['length']; _0x287363++) {
|
||||
_0x5af900 = (_0x5af900 + 0x1) % 0x100, _0x5eb788 = (_0x5eb788 + _0x4a4170[_0x5af900]) % 0x100, _0xf32d2e = _0x4a4170[_0x5af900], _0x4a4170[_0x5af900] = _0x4a4170[_0x5eb788], _0x4a4170[_0x5eb788] = _0xf32d2e, _0x1bdf08 += String['fromCharCode'](_0x29de0e['charCodeAt'](_0x287363) ^ _0x4a4170[(_0x4a4170[_0x5af900] + _0x4a4170[_0x5eb788]) % 0x100]);
|
||||
}
|
||||
return _0x1bdf08;
|
||||
};
|
||||
_0x4360['sqinGA'] = _0x43601a, _0x28c156 = arguments, _0x4360['vsUnWO'] = !![];
|
||||
}
|
||||
const _0x54265b = _0x27bdb8[0x0],
|
||||
_0x55e9a0 = _0x26c887 + _0x54265b,
|
||||
_0x47254c = _0x28c156[_0x55e9a0];
|
||||
return !_0x47254c ? (_0x4360['cZTDKr'] === undefined && (_0x4360['cZTDKr'] = !![]), _0x20a697 = _0x4360['sqinGA'](_0x20a697, _0x4a5717), _0x28c156[_0x55e9a0] = _0x20a697) : _0x20a697 = _0x47254c, _0x20a697;
|
||||
}, _0x4360(_0x28c156, _0x30428f);
|
||||
}
|
||||
|
||||
function ddtjopen(_0x291533, _0x522c6e, _0x3cab05 = 0x0) {
|
||||
return new Promise(_0x102433 => {
|
||||
const _0x529d12 = _0x4360,
|
||||
_0x163eba = _0x4360,
|
||||
_0x2985be = _0x4360,
|
||||
_0x538c07 = _0x4360,
|
||||
_0x46c606 = _0x4360,
|
||||
_0x4de445 = _0x4360,
|
||||
_0x487308 = _0x4360,
|
||||
_0x36e910 = _0x4360,
|
||||
_0x131739 = _0x26c8,
|
||||
_0xefb79b = _0x26c8,
|
||||
_0x340b68 = _0x26c8,
|
||||
_0x230863 = _0x26c8;
|
||||
let _0xf904b2 = {
|
||||
'url': 'https://m.xiaicn.com/cas/login?_random=' + Date[_0x131739('0x177')](),
|
||||
'headers': {
|
||||
'Accept': _0x131739('0x190'),
|
||||
'Accept-Encoding': _0x529d12('0x1b3', 'BGhH'),
|
||||
'Accept-Language': _0x529d12('0x192', 'mdO3'),
|
||||
'Cache-Control': _0x2985be('0x1db', 'b$39'),
|
||||
'Content-Type': _0x163eba('0x1bb', 'x]Op'),
|
||||
'Cookie': _0x291533,
|
||||
'Origin': _0x538c07(0x1d5, 'gy#H'),
|
||||
'Pragma': 'no-cache',
|
||||
'Referer': _0x131739(0x1c9),
|
||||
'User-Agent': 'Mozilla/5.0\x20(iPhone;\x20CPU\x20iPhone\x20OS\x2013_2_3\x20like\x20Mac\x20OS\x20X)\x20AppleWebKit/605.1.15\x20(KHTML,\x20like\x20Gecko)\x20Version/13.0.3\x20Mobile/15E148\x20Safari/604.1',
|
||||
'x-requested-with': 'XMLHttpRequest'
|
||||
},
|
||||
'body': _0x163eba(0x19e, 'b$39') + _0x522c6e + _0x131739(0x1de) + xabsjh + _0x2985be(0x1d2, '$Sgu') + xabpwd
|
||||
};
|
||||
$[_0x4de445('0x1dc', 'qmKz')](_0xf904b2, async (_0x5523d1, _0x19ae23, _0x3b121f) => {
|
||||
const _0x49e200 = _0x131739,
|
||||
_0x5e7a45 = _0x340b68,
|
||||
_0x296d33 = _0x131739,
|
||||
_0x17b9ae = _0x4de445,
|
||||
_0x9dd7f7 = _0x529d12,
|
||||
_0xcbd47 = _0x487308,
|
||||
_0x2f0eff = _0x538c07,
|
||||
_0x13bb3b = _0x529d12;
|
||||
try {
|
||||
const _0x29ff95 = JSON[_0x17b9ae('0x1a4', 'qmKz')](_0x3b121f);
|
||||
if (_0x29ff95[_0x17b9ae(0x184, ')rVY')] == 0x0) {
|
||||
$[_0xcbd47('0x185', 'b$39')]('\x0a喜爱帮登陆成功');
|
||||
let _0x883785 = _0x19ae23[_0x49e200(0x194)][_0x9dd7f7(0x1cf, 'uk*J')][_0x49e200(0x178)](';');
|
||||
_0x291533 = _0x291533 + ';' + _0x883785, await $[_0x13bb3b(0x1c5, '(fxz')](0x3e8), await daily_sign(_0x291533), await reward(_0x291533);
|
||||
} else $['log'](_0x49e200('0x195') + _0x29ff95['msg']);
|
||||
} catch (_0x414769) {} finally {
|
||||
_0x102433();
|
||||
}
|
||||
}, _0x3cab05);
|
||||
});
|
||||
}
|
||||
|
||||
function daily_sign(_0x18f48e, _0x4dbdf7 = 0x0) {
|
||||
return new Promise(_0x5b3b85 => {
|
||||
const _0x2b98bc = _0x4360,
|
||||
_0x4d2356 = _0x4360,
|
||||
_0x401598 = _0x4360,
|
||||
_0x2c9e14 = _0x26c8,
|
||||
_0x38cba0 = _0x26c8,
|
||||
_0x371316 = _0x26c8,
|
||||
_0x55c085 = _0x26c8,
|
||||
_0xbe054 = _0x26c8,
|
||||
_0x44e46f = _0x26c8;
|
||||
let _0x4378a4 = {
|
||||
'url': _0x2c9e14(0x1a6),
|
||||
'headers': {
|
||||
'Accept': _0x2b98bc(0x186, 'mNxn'),
|
||||
'Accept-Encoding': _0x38cba0('0x17e'),
|
||||
'Accept-Language': _0x371316('0x1a1'),
|
||||
'Cache-Control': 'no-cache',
|
||||
'Content-Type': _0x371316(0x176),
|
||||
'Cookie': _0x18f48e,
|
||||
'Origin': _0x38cba0(0x1b7),
|
||||
'Pragma': _0xbe054(0x1a2),
|
||||
'Referer': _0x4d2356('0x183', '5nRA'),
|
||||
'User-Agent': 'Mozilla/5.0\x20(iPhone;\x20CPU\x20iPhone\x20OS\x2013_2_3\x20like\x20Mac\x20OS\x20X)\x20AppleWebKit/605.1.15\x20(KHTML,\x20like\x20Gecko)\x20Version/13.0.3\x20Mobile/15E148\x20Safari/604.1',
|
||||
'x-requested-with': 'XMLHttpRequest'
|
||||
}
|
||||
};
|
||||
$[_0x4d2356(0x187, 'Kqek')](_0x4378a4, async (_0xe583de, _0x261e08, _0x790c9) => {
|
||||
const _0x405b45 = _0x2b98bc,
|
||||
_0x327e12 = _0x2b98bc,
|
||||
_0x38684b = _0x2b98bc,
|
||||
_0x7be828 = _0x4d2356,
|
||||
_0x166d0d = _0xbe054,
|
||||
_0x1b8da2 = _0xbe054,
|
||||
_0x412073 = _0xbe054,
|
||||
_0x47f6aa = _0x55c085,
|
||||
_0x35ae36 = _0x371316,
|
||||
_0x16faeb = _0x55c085;
|
||||
try {
|
||||
let _0x22d894 = _0x790c9[_0x166d0d(0x1df)](/csrfToken ="(.+?)"/);
|
||||
_0x22d894 == null || _0x22d894 == _0x1b8da2('0x1dd') ? console[_0x405b45(0x17f, 'mP0S')](_0x405b45(0x1bc, 'JkyR')) : await sign(_0x18f48e, _0x22d894[0x1]), console[_0x38684b('0x17f', 'mP0S')](_0x412073(0x1ab)), await period_task(_0x18f48e, 0x1), await $[_0x1b8da2('0x1af')](0x3e8), console[_0x35ae36(0x1be)](_0x1b8da2(0x1d1)), await period_task(_0x18f48e, 0x0), await $[_0x38684b(0x1bf, 'eGUI')](0x3e8);
|
||||
} catch (_0x2d677d) {} finally {
|
||||
_0x5b3b85();
|
||||
}
|
||||
}, _0x4dbdf7);
|
||||
});
|
||||
}
|
||||
|
||||
function sign(_0x59c726, _0x240c4d, _0x488b87 = 0x0) {
|
||||
return new Promise(_0x5d93e8 => {
|
||||
const _0x20a74f = _0x26c8,
|
||||
_0x501ece = _0x26c8,
|
||||
_0x2d497b = _0x26c8,
|
||||
_0x31fb50 = _0x26c8,
|
||||
_0x523dba = _0x26c8,
|
||||
_0x5313f0 = _0x4360,
|
||||
_0x13b162 = _0x4360,
|
||||
_0x56920b = _0x4360,
|
||||
_0x9430da = _0x4360,
|
||||
_0x51da6a = _0x4360;
|
||||
let _0x2f4338 = {
|
||||
'url': _0x5313f0('0x1c3', 'rlY6') + new Date()[_0x20a74f('0x1d9')](),
|
||||
'headers': {
|
||||
'Accept': 'application/json,\x20image/webp',
|
||||
'Accept-Encoding': _0x501ece('0x17e'),
|
||||
'Accept-Language': _0x20a74f('0x1a1'),
|
||||
'Cache-Control': _0x5313f0('0x191', 'rlY6'),
|
||||
'Content-Type': _0x2d497b('0x176'),
|
||||
'Cookie': _0x59c726,
|
||||
'Origin': _0x5313f0(0x16f, '@8az'),
|
||||
'Pragma': _0x5313f0('0x18b', 'C!02'),
|
||||
'Referer': 'https://m.xiaicn.com/cas/login',
|
||||
'User-Agent': 'Mozilla/5.0\x20(iPhone;\x20CPU\x20iPhone\x20OS\x2013_2_3\x20like\x20Mac\x20OS\x20X)\x20AppleWebKit/605.1.15\x20(KHTML,\x20like\x20Gecko)\x20Version/13.0.3\x20Mobile/15E148\x20Safari/604.1',
|
||||
'x-requested-with': _0x51da6a(0x1c7, 'LB9U')
|
||||
},
|
||||
'body': _0x501ece('0x193') + _0x240c4d
|
||||
};
|
||||
$['post'](_0x2f4338, async (_0x5a0573, _0x3a0fb0, _0x34f5f9) => {
|
||||
const _0x44f75c = _0x5313f0,
|
||||
_0x431d35 = _0x51da6a,
|
||||
_0x4b7b92 = _0x51da6a,
|
||||
_0xbe5191 = _0x9430da,
|
||||
_0x52c490 = _0x31fb50,
|
||||
_0x5ac344 = _0x2d497b,
|
||||
_0x5a09ce = _0x523dba,
|
||||
_0x4796c2 = _0x523dba,
|
||||
_0x1bf62b = _0x501ece,
|
||||
_0xb97319 = _0x2d497b;
|
||||
try {
|
||||
let _0x349a7d = JSON[_0x52c490(0x19b)](_0x34f5f9);
|
||||
_0x349a7d[_0x44f75c(0x167, 'evsn')] == 0x0 ? $['log'](_0x5ac344('0x1ce') + _0x349a7d[_0x52c490('0x1b0')][_0x5ac344('0x175')] + _0x52c490('0x173') + _0x349a7d['data'][_0x44f75c(0x170, 'i[vB')] / 0x2710 + '元') : console[_0x44f75c(0x168, '$Sgu')](_0x5ac344('0x16d') + _0x349a7d[_0x44f75c('0x1a5', '1yt(')]);
|
||||
} catch (_0x2e1d8d) {} finally {
|
||||
_0x5d93e8();
|
||||
}
|
||||
}, _0x488b87);
|
||||
});
|
||||
}
|
||||
|
||||
function period_task(_0x563955, _0x1cf341, _0x531d1b = 0x0) {
|
||||
return new Promise(_0x479f5a => {
|
||||
const _0x560434 = _0x4360,
|
||||
_0x29aa6d = _0x4360,
|
||||
_0x294cff = _0x26c8,
|
||||
_0x2b9de0 = _0x26c8,
|
||||
_0xea667a = _0x26c8,
|
||||
_0x2a5e26 = _0x26c8,
|
||||
_0x30ee00 = _0x26c8,
|
||||
_0x371706 = _0x26c8,
|
||||
_0x2cf3a0 = _0x26c8,
|
||||
_0x38188a = _0x26c8,
|
||||
_0x368743 = _0x26c8;
|
||||
let _0x51a9e4 = {
|
||||
'url': _0x294cff(0x1c8) + new Date()[_0x2b9de0('0x1d9')](),
|
||||
'headers': {
|
||||
'Accept': _0x294cff('0x190'),
|
||||
'Accept-Encoding': _0x2b9de0('0x17e'),
|
||||
'Accept-Language': 'zh-CN,zh;q=0.9',
|
||||
'Cache-Control': _0x560434(0x1a3, ']5Q$'),
|
||||
'Content-Type': _0x2a5e26('0x176'),
|
||||
'Cookie': _0x563955,
|
||||
'Origin': _0x371706(0x1b7),
|
||||
'Pragma': _0x560434('0x198', 'evsn'),
|
||||
'Referer': _0x2a5e26('0x1c9'),
|
||||
'User-Agent': _0x294cff('0x1da'),
|
||||
'x-requested-with': 'XMLHttpRequest'
|
||||
},
|
||||
'body': _0x30ee00('0x1d0') + _0x1cf341
|
||||
};
|
||||
$['post'](_0x51a9e4, async (_0x17d1b2, _0x1b810f, _0x18a9de) => {
|
||||
const _0x39edc9 = _0x29aa6d,
|
||||
_0x7148 = _0x560434,
|
||||
_0x118ad9 = _0x560434,
|
||||
_0x56a9e2 = _0x2cf3a0,
|
||||
_0x5b07e8 = _0x2a5e26,
|
||||
_0x52de77 = _0x30ee00,
|
||||
_0x2b51dd = _0x30ee00;
|
||||
try {
|
||||
let _0x17de89 = JSON['parse'](_0x18a9de);
|
||||
_0x17de89['code'] == 0x0 ? $[_0x56a9e2(0x1be)](_0x39edc9('0x1ae', 'rPMe') + _0x17de89[_0x39edc9('0x182', 'gy#H')]['taskName'] + _0x5b07e8(0x1b9) + _0x17de89['data']['rewardMoney'] / 0x2710 + '元') : console[_0x7148(0x1d3, 'mNxn')](_0x52de77(0x197) + _0x17de89[_0x52de77(0x171)]);
|
||||
} catch (_0x52b8f8) {} finally {
|
||||
_0x479f5a();
|
||||
}
|
||||
}, _0x531d1b);
|
||||
});
|
||||
}
|
||||
|
||||
function encodeUTF8(_0x58b110) {
|
||||
const _0x4f527a = _0x3357a1,
|
||||
_0x34e065 = _0x3c5bbd,
|
||||
_0x2dad8d = _0x2267c2,
|
||||
_0x3f9301 = _0x2267c2,
|
||||
_0x5697da = _0x43e8a8,
|
||||
_0x377e5f = _0x43e8a8,
|
||||
_0x428500 = _0x43e8a8,
|
||||
_0xca51a6 = _0x3c5bbd;
|
||||
let _0x45888e = '';
|
||||
for (let _0x2b2e6d = 0x0; _0x2b2e6d < _0x58b110[_0x34e065('0x1d7', 'uk*J')]; _0x2b2e6d++) {
|
||||
let _0x395546 = _0x58b110[_0x2b2e6d],
|
||||
_0x19d820 = '';
|
||||
encodeURIComponent(_0x395546)[_0x34e065(0x180, ']J[%')] < 0x4 ? _0x19d820 = _0x395546[_0x2dad8d(0x1cd, 'mP0S')](0x0)[_0x5697da('0x1c0', 'f]!h')](0x10) : (_0x19d820 = encodeURIComponent(_0x395546), _0x19d820 = _0x19d820[_0x5697da('0x1a9', 'mF0F')]('%', '')), console['log'](_0x34e065(0x17b, 'Vl1y'), _0x2b2e6d, _0x395546, _0x19d820), _0x45888e += _0x19d820;
|
||||
}
|
||||
return console[_0x4f527a('0x1be')](_0xca51a6(0x169, 'mF0F'), _0x45888e), _0x45888e;
|
||||
}
|
||||
|
||||
function _0x26c8(_0x28c156, _0x30428f) {
|
||||
const _0x27bdb8 = _0x27bd();
|
||||
return _0x26c8 = function(_0x26c887, _0x4a5717) {
|
||||
_0x26c887 = _0x26c887 - 0x167;
|
||||
let _0x20a697 = _0x27bdb8[_0x26c887];
|
||||
if (_0x26c8['jGTHpM'] === undefined) {
|
||||
var _0x3d6f1f = function(_0x43601a) {
|
||||
const _0x5c9364 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
|
||||
let _0xc637e2 = '',
|
||||
_0x32d805 = '';
|
||||
for (let _0x353512 = 0x0, _0x71c380, _0x41e535, _0x13fb9b = 0x0; _0x41e535 = _0x43601a['charAt'](_0x13fb9b++); ~_0x41e535 && (_0x71c380 = _0x353512 % 0x4 ? _0x71c380 * 0x40 + _0x41e535 : _0x41e535, _0x353512++ % 0x4) ? _0xc637e2 += String['fromCharCode'](0xff & _0x71c380 >> (-0x2 * _0x353512 & 0x6)) : 0x0) {
|
||||
_0x41e535 = _0x5c9364['indexOf'](_0x41e535);
|
||||
}
|
||||
for (let _0x13a631 = 0x0, _0x159131 = _0xc637e2['length']; _0x13a631 < _0x159131; _0x13a631++) {
|
||||
_0x32d805 += '%' + ('00' + _0xc637e2['charCodeAt'](_0x13a631)['toString'](0x10))['slice'](-0x2);
|
||||
}
|
||||
return decodeURIComponent(_0x32d805);
|
||||
};
|
||||
_0x26c8['AGphuB'] = _0x3d6f1f, _0x28c156 = arguments, _0x26c8['jGTHpM'] = !![];
|
||||
}
|
||||
const _0x54265b = _0x27bdb8[0x0],
|
||||
_0x55e9a0 = _0x26c887 + _0x54265b,
|
||||
_0x47254c = _0x28c156[_0x55e9a0];
|
||||
return !_0x47254c ? (_0x20a697 = _0x26c8['AGphuB'](_0x20a697), _0x28c156[_0x55e9a0] = _0x20a697) : _0x20a697 = _0x47254c, _0x20a697;
|
||||
}, _0x26c8(_0x28c156, _0x30428f);
|
||||
}
|
||||
|
||||
function reward(_0x10b9d4, _0xc22d4f = 0x0) {
|
||||
return new Promise(_0x14d264 => {
|
||||
const _0x194b3e = _0x4360,
|
||||
_0x219cfb = _0x4360,
|
||||
_0x4e53d9 = _0x4360,
|
||||
_0x26bc26 = _0x4360,
|
||||
_0x13ff5b = _0x4360,
|
||||
_0x3c11d4 = _0x4360,
|
||||
_0x3ed2b6 = _0x4360,
|
||||
_0x447867 = _0x4360,
|
||||
_0x1c9952 = _0x26c8,
|
||||
_0x3dd2b1 = _0x26c8;
|
||||
let _0x546b2b = {
|
||||
'url': 'https://m.xiaicn.com/user/active/period_task/reward?_random=' + new Date()[_0x1c9952('0x1d9')](),
|
||||
'headers': {
|
||||
'Accept': _0x194b3e(0x1a8, 'x]Op'),
|
||||
'Accept-Encoding': _0x194b3e('0x1cc', '5I6Z'),
|
||||
'Accept-Language': _0x3dd2b1(0x1a1),
|
||||
'Cache-Control': _0x4e53d9(0x1e0, '@8az'),
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'Cookie': _0x10b9d4,
|
||||
'Origin': _0x4e53d9('0x1ac', 'vJXN'),
|
||||
'Pragma': 'no-cache',
|
||||
'Referer': 'https://m.xiaicn.com/cas/login',
|
||||
'User-Agent': _0x219cfb(0x181, '$wnR'),
|
||||
'x-requested-with': _0x219cfb(0x1b2, 'rPMe')
|
||||
},
|
||||
'body': _0x13ff5b('0x17d', ']5Q$')
|
||||
};
|
||||
$[_0x26bc26(0x16e, 'RXVh')](_0x546b2b, async (_0xde2327, _0x239006, _0x35f63c) => {
|
||||
const _0x4450af = _0x1c9952,
|
||||
_0x4664ff = _0x3dd2b1,
|
||||
_0x55adcc = _0x1c9952,
|
||||
_0x5c45bc = _0x1c9952,
|
||||
_0x155854 = _0x1c9952,
|
||||
_0x1cf1e4 = _0x13ff5b,
|
||||
_0x187191 = _0x219cfb;
|
||||
try {
|
||||
let _0x55ae69 = JSON['parse'](_0x35f63c);
|
||||
_0x55ae69[_0x1cf1e4(0x18f, '$Sgu')] == 0x0 ? $[_0x4450af('0x1be')](_0x4450af(0x179) + _0x55ae69[_0x4450af(0x1b0)][_0x4450af(0x1cb)] / 0x2710 + '元') : console[_0x4450af('0x1be')](_0x187191('0x17c', 'x]Op') + _0x55ae69['msg']);
|
||||
} catch (_0x2f3448) {} finally {
|
||||
_0x14d264();
|
||||
}
|
||||
}, _0xc22d4f);
|
||||
});
|
||||
}
|
||||
|
||||
function Env(t, e) {
|
||||
class s {
|
||||
constructor(t) {
|
||||
this.env = t
|
||||
}
|
||||
send(t, e = "GET") {
|
||||
t = "string" == typeof t ? {
|
||||
url: t
|
||||
} : t;
|
||||
let s = this.get;
|
||||
return "POST" === e && (s = this.post), new Promise((e, i) => {
|
||||
s.call(this, t, (t, s, r) => {
|
||||
t ? i(t) : e(s)
|
||||
})
|
||||
})
|
||||
}
|
||||
get(t) {
|
||||
return this.send.call(this.env, t)
|
||||
}
|
||||
post(t) {
|
||||
return this.send.call(this.env, t, "POST")
|
||||
}
|
||||
}
|
||||
return new class {
|
||||
constructor(t, e) {
|
||||
this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`)
|
||||
}
|
||||
isNode() {
|
||||
return "undefined" != typeof module && !!module.exports
|
||||
}
|
||||
isQuanX() {
|
||||
return "undefined" != typeof $task
|
||||
}
|
||||
isSurge() {
|
||||
return "undefined" != typeof $httpClient && "undefined" == typeof $loon
|
||||
}
|
||||
isLoon() {
|
||||
return "undefined" != typeof $loon
|
||||
}
|
||||
toObj(t, e = null) {
|
||||
try {
|
||||
return JSON.parse(t)
|
||||
} catch {
|
||||
return e
|
||||
}
|
||||
}
|
||||
toStr(t, e = null) {
|
||||
try {
|
||||
return JSON.stringify(t)
|
||||
} catch {
|
||||
return e
|
||||
}
|
||||
}
|
||||
getjson(t, e) {
|
||||
let s = e;
|
||||
const i = this.getdata(t);
|
||||
if (i) try {
|
||||
s = JSON.parse(this.getdata(t))
|
||||
} catch {}
|
||||
return s
|
||||
}
|
||||
setjson(t, e) {
|
||||
try {
|
||||
return this.setdata(JSON.stringify(t), e)
|
||||
} catch {
|
||||
return !1
|
||||
}
|
||||
}
|
||||
getScript(t) {
|
||||
return new Promise(e => {
|
||||
this.get({
|
||||
url: t
|
||||
}, (t, s, i) => e(i))
|
||||
})
|
||||
}
|
||||
runScript(t, e) {
|
||||
return new Promise(s => {
|
||||
let i = this.getdata("@chavy_boxjs_userCfgs.httpapi");
|
||||
i = i ? i.replace(/\n/g, "").trim() : i;
|
||||
let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");
|
||||
r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r;
|
||||
const [o, h] = i.split("@"), a = {
|
||||
url: `http://${h}/v1/scripting/evaluate`,
|
||||
body: {
|
||||
script_text: t,
|
||||
mock_type: "cron",
|
||||
timeout: r
|
||||
},
|
||||
headers: {
|
||||
"X-Key": o,
|
||||
Accept: "*/*"
|
||||
}
|
||||
};
|
||||
this.post(a, (t, e, i) => s(i))
|
||||
}).catch(t => this.logErr(t))
|
||||
}
|
||||
loaddata() {
|
||||
if (!this.isNode()) return {};
|
||||
{
|
||||
this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path");
|
||||
const t = this.path.resolve(this.dataFile),
|
||||
e = this.path.resolve(process.cwd(), this.dataFile),
|
||||
s = this.fs.existsSync(t),
|
||||
i = !s && this.fs.existsSync(e);
|
||||
if (!s && !i) return {};
|
||||
{
|
||||
const i = s ? t : e;
|
||||
try {
|
||||
return JSON.parse(this.fs.readFileSync(i))
|
||||
} catch (t) {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
writedata() {
|
||||
if (this.isNode()) {
|
||||
this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path");
|
||||
const t = this.path.resolve(this.dataFile),
|
||||
e = this.path.resolve(process.cwd(), this.dataFile),
|
||||
s = this.fs.existsSync(t),
|
||||
i = !s && this.fs.existsSync(e),
|
||||
r = JSON.stringify(this.data);
|
||||
s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r)
|
||||
}
|
||||
}
|
||||
lodash_get(t, e, s) {
|
||||
const i = e.replace(/\[(\d+)\]/g, ".$1").split(".");
|
||||
let r = t;
|
||||
for (const t of i)
|
||||
if (r = Object(r)[t], void 0 === r) return s;
|
||||
return r
|
||||
}
|
||||
lodash_set(t, e, s) {
|
||||
return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t)
|
||||
}
|
||||
getdata(t) {
|
||||
let e = this.getval(t);
|
||||
if (/^@/.test(t)) {
|
||||
const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : "";
|
||||
if (r) try {
|
||||
const t = JSON.parse(r);
|
||||
e = t ? this.lodash_get(t, i, "") : e
|
||||
} catch (t) {
|
||||
e = ""
|
||||
}
|
||||
}
|
||||
return e
|
||||
}
|
||||
setdata(t, e) {
|
||||
let s = !1;
|
||||
if (/^@/.test(e)) {
|
||||
const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}";
|
||||
try {
|
||||
const e = JSON.parse(h);
|
||||
this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i)
|
||||
} catch (e) {
|
||||
const o = {};
|
||||
this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i)
|
||||
}
|
||||
} else s = this.setval(t, e);
|
||||
return s
|
||||
}
|
||||
getval(t) {
|
||||
return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.data[t] || null
|
||||
}
|
||||
setval(t, e) {
|
||||
return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null
|
||||
}
|
||||
initGotEnv(t) {
|
||||
this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar))
|
||||
}
|
||||
get(t, e = (() => {})) {
|
||||
t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, {
|
||||
"X-Surge-Skip-Scripting": !1
|
||||
})), $httpClient.get(t, (t, s, i) => {
|
||||
!t && s && (s.body = i, s.statusCode = s.status), e(t, s, i)
|
||||
})) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, {
|
||||
hints: !1
|
||||
})), $task.fetch(t).then(t => {
|
||||
const {
|
||||
statusCode: s,
|
||||
statusCode: i,
|
||||
headers: r,
|
||||
body: o
|
||||
} = t;
|
||||
e(null, {
|
||||
status: s,
|
||||
statusCode: i,
|
||||
headers: r,
|
||||
body: o
|
||||
}, o)
|
||||
}, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => {
|
||||
try {
|
||||
if (t.headers["set-cookie"]) {
|
||||
const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();
|
||||
this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar
|
||||
}
|
||||
} catch (t) {
|
||||
this.logErr(t)
|
||||
}
|
||||
}).then(t => {
|
||||
const {
|
||||
statusCode: s,
|
||||
statusCode: i,
|
||||
headers: r,
|
||||
body: o
|
||||
} = t;
|
||||
e(null, {
|
||||
status: s,
|
||||
statusCode: i,
|
||||
headers: r,
|
||||
body: o
|
||||
}, o)
|
||||
}, t => {
|
||||
const {
|
||||
message: s,
|
||||
response: i
|
||||
} = t;
|
||||
e(s, i, i && i.body)
|
||||
}))
|
||||
}
|
||||
post(t, e = (() => {})) {
|
||||
if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, {
|
||||
"X-Surge-Skip-Scripting": !1
|
||||
})), $httpClient.post(t, (t, s, i) => {
|
||||
!t && s && (s.body = i, s.statusCode = s.status), e(t, s, i)
|
||||
});
|
||||
else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, {
|
||||
hints: !1
|
||||
})), $task.fetch(t).then(t => {
|
||||
const {
|
||||
statusCode: s,
|
||||
statusCode: i,
|
||||
headers: r,
|
||||
body: o
|
||||
} = t;
|
||||
e(null, {
|
||||
status: s,
|
||||
statusCode: i,
|
||||
headers: r,
|
||||
body: o
|
||||
}, o)
|
||||
}, t => e(t));
|
||||
else if (this.isNode()) {
|
||||
this.initGotEnv(t);
|
||||
const {
|
||||
url: s,
|
||||
...i
|
||||
} = t;
|
||||
this.got.post(s, i).then(t => {
|
||||
const {
|
||||
statusCode: s,
|
||||
statusCode: i,
|
||||
headers: r,
|
||||
body: o
|
||||
} = t;
|
||||
e(null, {
|
||||
status: s,
|
||||
statusCode: i,
|
||||
headers: r,
|
||||
body: o
|
||||
}, o)
|
||||
}, t => {
|
||||
const {
|
||||
message: s,
|
||||
response: i
|
||||
} = t;
|
||||
e(s, i, i && i.body)
|
||||
})
|
||||
}
|
||||
}
|
||||
time(t) {
|
||||
let e = {
|
||||
"M+": (new Date).getMonth() + 1,
|
||||
"d+": (new Date).getDate(),
|
||||
"H+": (new Date).getHours(),
|
||||
"m+": (new Date).getMinutes(),
|
||||
"s+": (new Date).getSeconds(),
|
||||
"q+": Math.floor(((new Date).getMonth() + 3) / 3),
|
||||
S: (new Date).getMilliseconds()
|
||||
};
|
||||
/(y+)/.test(t) && (t = t.replace(RegExp.$1, ((new Date).getFullYear() + "").substr(4 - RegExp.$1.length)));
|
||||
for (let s in e) new RegExp("(" + s + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? e[s] : ("00" + e[s]).substr(("" + e[s]).length)));
|
||||
return t
|
||||
}
|
||||
msg(e = t, s = "", i = "", r) {
|
||||
const o = t => {
|
||||
if (!t) return t;
|
||||
if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? {
|
||||
"open-url": t
|
||||
} : this.isSurge() ? {
|
||||
url: t
|
||||
} : void 0;
|
||||
if ("object" == typeof t) {
|
||||
if (this.isLoon()) {
|
||||
let e = t.openUrl || t.url || t["open-url"],
|
||||
s = t.mediaUrl || t["media-url"];
|
||||
return {
|
||||
openUrl: e,
|
||||
mediaUrl: s
|
||||
}
|
||||
}
|
||||
if (this.isQuanX()) {
|
||||
let e = t["open-url"] || t.url || t.openUrl,
|
||||
s = t["media-url"] || t.mediaUrl;
|
||||
return {
|
||||
"open-url": e,
|
||||
"media-url": s
|
||||
}
|
||||
}
|
||||
if (this.isSurge()) {
|
||||
let e = t.url || t.openUrl || t["open-url"];
|
||||
return {
|
||||
url: e
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r)));
|
||||
let h = ["", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];
|
||||
h.push(e), s && h.push(s), i && h.push(i), console.log(h.join("\n")), this.logs = this.logs.concat(h)
|
||||
}
|
||||
log(...t) {
|
||||
t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator))
|
||||
}
|
||||
logErr(t, e) {
|
||||
const s = !this.isSurge() && !this.isQuanX() && !this.isLoon();
|
||||
s ? this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t)
|
||||
}
|
||||
wait(t) {
|
||||
return new Promise(e => setTimeout(e, t))
|
||||
}
|
||||
done(t = {}) {
|
||||
const e = (new Date).getTime(),
|
||||
s = (e - this.startTime) / 1e3;
|
||||
this.log("", `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t)
|
||||
}
|
||||
}(t, e)
|
||||
}
|
||||
Reference in New Issue
Block a user