jdpro/jd_code2url.js

10 lines
26 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
口令转链接
10 10 10 10 * jd_code2url.js
nolan服务接口
*/
const $ = new Env('口令转链接');
2024-06-28 09:48:25 +00:00
var _0xod9='jsjiami.com.v7';const _0x525db6=_0x5f43;function _0x5f43(_0xfd7a9d,_0x4518a4){const _0xeb2435=_0x411d();return _0x5f43=function(_0x573fd8,_0x2382f2){_0x573fd8=_0x573fd8-0x1da;let _0x411d94=_0xeb2435[_0x573fd8];if(_0x5f43['xeQFQv']===undefined){var _0x5f430f=function(_0x10e92a){const _0x18229e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5b113e='',_0x4fa97d='',_0x58716c=_0x5b113e+_0x5f430f;for(let _0x30c392=0x0,_0xafbf68,_0x40f4ca,_0x2578dd=0x0;_0x40f4ca=_0x10e92a['charAt'](_0x2578dd++);~_0x40f4ca&&(_0xafbf68=_0x30c392%0x4?_0xafbf68*0x40+_0x40f4ca:_0x40f4ca,_0x30c392++%0x4)?_0x5b113e+=_0x58716c['charCodeAt'](_0x2578dd+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0xafbf68>>(-0x2*_0x30c392&0x6)):_0x30c392:0x0){_0x40f4ca=_0x18229e['indexOf'](_0x40f4ca);}for(let _0x2742d0=0x0,_0x53683a=_0x5b113e['length'];_0x2742d0<_0x53683a;_0x2742d0++){_0x4fa97d+='%'+('00'+_0x5b113e['charCodeAt'](_0x2742d0)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4fa97d);};const _0x273c5e=function(_0x13455d,_0x6eda5){let _0x57c475=[],_0x5ea107=0x0,_0x49c345,_0x190527='';_0x13455d=_0x5f430f(_0x13455d);let _0x277a88;for(_0x277a88=0x0;_0x277a88<0x100;_0x277a88++){_0x57c475[_0x277a88]=_0x277a88;}for(_0x277a88=0x0;_0x277a88<0x100;_0x277a88++){_0x5ea107=(_0x5ea107+_0x57c475[_0x277a88]+_0x6eda5['charCodeAt'](_0x277a88%_0x6eda5['length']))%0x100,_0x49c345=_0x57c475[_0x277a88],_0x57c475[_0x277a88]=_0x57c475[_0x5ea107],_0x57c475[_0x5ea107]=_0x49c345;}_0x277a88=0x0,_0x5ea107=0x0;for(let _0x4d9a07=0x0;_0x4d9a07<_0x13455d['length'];_0x4d9a07++){_0x277a88=(_0x277a88+0x1)%0x100,_0x5ea107=(_0x5ea107+_0x57c475[_0x277a88])%0x100,_0x49c345=_0x57c475[_0x277a88],_0x57c475[_0x277a88]=_0x57c475[_0x5ea107],_0x57c475[_0x5ea107]=_0x49c345,_0x190527+=String['fromCharCode'](_0x13455d['charCodeAt'](_0x4d9a07)^_0x57c475[(_0x57c475[_0x277a88]+_0x57c475[_0x5ea107])%0x100]);}return _0x190527;};_0x5f43['CcQWoB']=_0x273c5e,_0xfd7a9d=arguments,_0x5f43['xeQFQv']=!![];}const _0x8ce639=_0xeb2435[0x0],_0x52c2d5=_0x573fd8+_0x8ce639,_0x40ee07=_0xfd7a9d[_0x52c2d5];if(!_0x40ee07){if(_0x5f43['fgxWzQ']===undefined){const _0x1c0baa=function(_0x1b16f5){this['laIEfr']=_0x1b16f5,this['AAVLNw']=[0x1,0x0,0x0],this['SfpkAK']=function(){return'newState';},this['AyXCSs']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['zxZxjw']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x1c0baa['prototype']['GYZoCO']=function(){const _0x292121=new RegExp(this['AyXCSs']+this['zxZxjw']),_0x11ef02=_0x292121['test'](this['SfpkAK']['toString']())?--this['AAVLNw'][0x1]:--this['AAVLNw'][0x0];return this['tQKCXU'](_0x11ef02);},_0x1c0baa['prototype']['tQKCXU']=function(_0x3e02bf){if(!Boolean(~_0x3e02bf))return _0x3e02bf;return this['cUzZYJ'](this['laIEfr']);},_0x1c0baa['prototype']['cUzZYJ']=function(_0x34c4e1){for(let _0x550d13=0x0,_0x54d269=this['AAVLNw']['length'];_0x550d13<_0x54d269;_0x550d13++){this['AAVLNw']['push'](Math['round'](Math['random']())),_0x54d269=this['AAVLNw']['length'];}return _0x34c4e1(this['AAVLNw'][0x0]);},new _0x1c0baa(_0x5f43)['GYZoCO'](),_0x5f43['fgxWzQ']=!![];}_0x411d94=_0x5f43['CcQWoB'](_0x411d94,_0x2382f2),_0xfd7a9d[_0x52c2d5]=_0x411d94;}else _0x411d94=_0x40ee07;return _0x411d94;},_0x5f43(_0xfd7a9d,_0x4518a4);}function _0x411d(){const _0x3e70e7=(function(){return[...[_0xod9,'uIjLNspwjPgiyUaJkmCiw.FcNWoJmTQ.xPDvRqB7==','WO3cTL/dPc7cIqXs','W6KZpmoepG','WQBdNmoiCCkfW5VcJG3dTCob','kCkYBmod','WRP7W7LXWOS','qHtLPQFOT51pW4xLJ4/LMiOQWQa','xahcO8k3kCkshSkSwG','W67cHCoUWPaJ','phBdISo8','CSkUDSkRwW','W6NdSmkHW7OJlmkEWQu8cfZdVa','WOPBs8kHCG','iqSUxCoS','p8o0u3JcJ8o4kCoY','cmk2xrddGa','yCkQBWRdOa','W6j3ywXb','wSkKWQBcImoX','e8knEfa','oCkYuCosWQT6W6OL','vYiOdNeQlCkFArvXWPS','WQRdM8ksW77dImksW68W','cIm7uge','W6z9qfS','W7v/W74','v3hcLwfFW6X4WOldIbT4b8kCWQ3dICoIWQ4tus8skmoFnSobgmosWPFcOmkEWRKYoW','xqK6mmksWPT6WORcGW','WR7cUmoKWQz7F8ksWOGHf1tcOur9a27cUCoNlelcMCoLWQ83nqD3W7VdV8ktoCkuW7u','xcKv','WORcVmoYW7i','W5FdImoPWR5V','WOfMxSkW','WP8zW4RcOmoiAf1hWOqUW4i3nMiSo8orfsSbWQZdRdVdKSoOvCkVyHdcMNm4WQ0MDXHZWOtcHHHrqNOLWQJcJmkOoHb4W7xdQgukW4FdQbqMAW','s8kXWRVcKCoC','w03dNCk
2024-06-28 07:47:44 +00:00
function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); 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("", `🔔${this.name}, 开始!`) } 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("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (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.d