faker3/jd_jrsign.js

15 lines
28 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
2024-08-02 11:37:33 +08:00
活动名称京东金融双签
环境变量jd_jrsign_interval // 自定义运行间隔时长整数单位毫秒默认1500
jd_jrsign_notify // 是否推送通知true/false默认不推送
jd_jrsign_pinFilter // 账号pin过滤多个用@进行分割
2024-06-28 15:38:28 +08:00
2024-08-02 11:37:33 +08:00
cron:55 17 * * *
*/
const $ = new Env('京东金融双签')
const _0x203553=_0x5d95;(function(_0x343207,_0x414fbb){const _0x215506=_0x5d95,_0x33b280=_0x343207();while(!![]){try{const _0x496280=parseInt(_0x215506(0x223,'z[&p'))/0x1+-parseInt(_0x215506(0x205,'qW#r'))/0x2+-parseInt(_0x215506(0x22b,'*Wvj'))/0x3*(parseInt(_0x215506(0x201,'0&5a'))/0x4)+-parseInt(_0x215506(0x220,'z[&p'))/0x5*(-parseInt(_0x215506(0x282,'Xe!q'))/0x6)+-parseInt(_0x215506(0x253,'DS8K'))/0x7+-parseInt(_0x215506(0x207,'z[&p'))/0x8+parseInt(_0x215506(0x263,'kqz4'))/0x9*(parseInt(_0x215506(0x1fb,'VxH['))/0xa);if(_0x496280===_0x414fbb)break;else _0x33b280['push'](_0x33b280['shift']());}catch(_0x1d929c){_0x33b280['push'](_0x33b280['shift']());}}}(_0x2dc4,0x8d853));const jdCookie=require(_0x203553(0x259,'[DBU')),notify=require(_0x203553(0x2a5,'lQKO')),common=require(_0x203553(0x26c,'$al1')),jsdom=require(_0x203553(0x269,'Wd5p'));let taskThreads=process[_0x203553(0x1ed,'0&5a')][_0x203553(0x216,'VxH[')]||'1';function _0x5d95(_0x357e98,_0x1f605f){const _0x2dc475=_0x2dc4();return _0x5d95=function(_0x5d95e0,_0x39b3d4){_0x5d95e0=_0x5d95e0-0x1d6;let _0x38b61a=_0x2dc475[_0x5d95e0];if(_0x5d95['jyqVSN']===undefined){var _0x149740=function(_0x198e96){const _0x1fcd4f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2ede91='',_0x8ce4d1='';for(let _0x5f536c=0x0,_0x24706d,_0x4d6938,_0x3a3134=0x0;_0x4d6938=_0x198e96['charAt'](_0x3a3134++);~_0x4d6938&&(_0x24706d=_0x5f536c%0x4?_0x24706d*0x40+_0x4d6938:_0x4d6938,_0x5f536c++%0x4)?_0x2ede91+=String['fromCharCode'](0xff&_0x24706d>>(-0x2*_0x5f536c&0x6)):0x0){_0x4d6938=_0x1fcd4f['indexOf'](_0x4d6938);}for(let _0x12f03d=0x0,_0x3fc0d6=_0x2ede91['length'];_0x12f03d<_0x3fc0d6;_0x12f03d++){_0x8ce4d1+='%'+('00'+_0x2ede91['charCodeAt'](_0x12f03d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x8ce4d1);};const _0x17d372=function(_0x5762c8,_0x47f9ba){let _0x314469=[],_0xafb5b5=0x0,_0x2a3bb3,_0x524849='';_0x5762c8=_0x149740(_0x5762c8);let _0x19f83e;for(_0x19f83e=0x0;_0x19f83e<0x100;_0x19f83e++){_0x314469[_0x19f83e]=_0x19f83e;}for(_0x19f83e=0x0;_0x19f83e<0x100;_0x19f83e++){_0xafb5b5=(_0xafb5b5+_0x314469[_0x19f83e]+_0x47f9ba['charCodeAt'](_0x19f83e%_0x47f9ba['length']))%0x100,_0x2a3bb3=_0x314469[_0x19f83e],_0x314469[_0x19f83e]=_0x314469[_0xafb5b5],_0x314469[_0xafb5b5]=_0x2a3bb3;}_0x19f83e=0x0,_0xafb5b5=0x0;for(let _0x213d7d=0x0;_0x213d7d<_0x5762c8['length'];_0x213d7d++){_0x19f83e=(_0x19f83e+0x1)%0x100,_0xafb5b5=(_0xafb5b5+_0x314469[_0x19f83e])%0x100,_0x2a3bb3=_0x314469[_0x19f83e],_0x314469[_0x19f83e]=_0x314469[_0xafb5b5],_0x314469[_0xafb5b5]=_0x2a3bb3,_0x524849+=String['fromCharCode'](_0x5762c8['charCodeAt'](_0x213d7d)^_0x314469[(_0x314469[_0x19f83e]+_0x314469[_0xafb5b5])%0x100]);}return _0x524849;};_0x5d95['nGJpJE']=_0x17d372,_0x357e98=arguments,_0x5d95['jyqVSN']=!![];}const _0x379624=_0x2dc475[0x0],_0x5bef84=_0x5d95e0+_0x379624,_0x33b4be=_0x357e98[_0x5bef84];return!_0x33b4be?(_0x5d95['lMaMAh']===undefined&&(_0x5d95['lMaMAh']=!![]),_0x38b61a=_0x5d95['nGJpJE'](_0x38b61a,_0x39b3d4),_0x357e98[_0x5bef84]=_0x38b61a):_0x38b61a=_0x33b4be,_0x38b61a;},_0x5d95(_0x357e98,_0x1f605f);}const runInterval=process['env']['jd_jrsign_interval']||_0x203553(0x213,'2E6o'),isNotify=(process[_0x203553(0x200,'ba2O')]['jd_jrsign_notify']||process[_0x203553(0x217,'zuIx')]['jd_jrsign_Notify'])===_0x203553(0x27e,'*0wO'),pinFilter=(process[_0x203553(0x26d,'uG@T')]['jd_jrsign_pinFilter']||'')[_0x203553(0x237,'38ga')]('@'),maxThreads=0x1;let cookiesArr=Object[_0x203553(0x1e2,'3VM^')](jdCookie)['map'](_0x17d372=>jdCookie[_0x17d372])[_0x203553(0x28b,'xhDN')](_0x198e96=>_0x198e96);!cookiesArr[0x0]&&($[_0x203553(0x1d7,'S624')]($[_0x203553(0x1f9,']Jj[')],_0x203553(0x215,'Wd5p')),process[_0x203553(0x1df,'CD8*')](0x1));!(async()=>{const _0x17260c=_0x203553;notify[_0x17260c(0x251,'MR50')]({'title':$[_0x17260c(0x22d,'2E6o')]}),await Main(),isNotify&&notify[_0x17260c(0x227,'$al1')]()&&await notify['push']();})()['catch'](_0x1fcd4f=>$[_0x203553(0x28f,'[Xq*')](_0x1fcd4f))[_0x203553(0x289,'S624')](()=>$[_0x203553(0x23f,'VxH[')]());async function Main(){const _0x3f68fd=_0x203553;try{try{const _0x8ce4d
// prettier-ignore
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.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"])