faker3/jd_pcSign.js

16 lines
65 KiB
JavaScript
Raw Normal View History

2024-11-20 10:14:21 +08:00
/*
活动名称京东网页签到
环境变量jd_pcSign_interval // 自定义运行间隔时长整数单位毫秒默认1500
jd_pcSign_notify // 是否推送通知true/false默认不推送
jd_pcSign_pinFilter // 账号pin过滤多个用@进行分割
cron:15 2,17 * * *
*/
const $ = new Env('京东网页签到')
function Oq8yPAh(){}var _E5pEv8=Object['defineProperty'],uNEW_T,G_mmqpA,I3_6Kb,KOg7Ris,RCQRHoY,BJwjWZI,rOPy7cn,yETbm7Z,wvHuwH,ta8l_d,BsgrBy,Wor9Su,E81neNy,CDfgBm,yyMVGQ1,_pYgBV5,DSIIrv,WmiEEna,w44C9e,x9Ued7,jyFmDuP;function AxoSVXZ(Oq8yPAh){return uNEW_T[Oq8yPAh<-0x26?Oq8yPAh+0xe:Oq8yPAh>-0x26?Oq8yPAh<-0x26?Oq8yPAh+0x26:Oq8yPAh+0x25:Oq8yPAh+0x20]}uNEW_T=zsQ6Af();function NYrEEeM(Oq8yPAh,_E5pEv8){G_mmqpA(Oq8yPAh,'length',{value:_E5pEv8,configurable:AxoSVXZ(0x42)});return Oq8yPAh}Oq8yPAh(G_mmqpA=Object.defineProperty,I3_6Kb=i_l4Bf((Oq8yPAh,_E5pEv8)=>{return _E5pEv8(Oq8yPAh())},0x2)(JofqHp,A7MPb6Y));var ixaDOjQ=[],LH0Z9A=[XfY65r(0x0),XfY65r(0x1),XfY65r(0x2),XfY65r(0x3),XfY65r(0x4),XfY65r(AxoSVXZ(-0x1c)),XfY65r(0x6),'WR_dcFD%"&v^&V;5{|0dq]u',XfY65r(0x7),XfY65r(0x8),XfY65r(AxoSVXZ(-0x4)),XfY65r(AxoSVXZ(0x28)),XfY65r(0xb),XfY65r(0xc),XfY65r(0xd),'\u006e\u007c\u003d\u0034\u0079',XfY65r(AxoSVXZ(0x0)),XfY65r(0xf),XfY65r(AxoSVXZ(-0x1b)),XfY65r(AxoSVXZ(-0x25)),'\u0058\u0041\u0070\u0031\u0022\u0062\u0030\u0044\u0047\u0079\u0077\u0038\u003f\u0022\u004f\u005d\u0031\u003b\u002e\u0044\u0047\u0074\u007e\u003f\u0039\u006b\u007a\u006e\u0060\u0073\u0062\u0021\u007c\u007a\u0053\u003e\u0039',XfY65r(0x12),XfY65r(AxoSVXZ(0xe)),XfY65r(AxoSVXZ(0xf)),XfY65r(AxoSVXZ(-0x25)),'\x26\x7c\x54\x7a\x6e\x4f\x23\x76\x43\x2b\x59\x25\x69',XfY65r(0x15),XfY65r(AxoSVXZ(0x10)),XfY65r(AxoSVXZ(0x11)),XfY65r(0x18),XfY65r(0x19),XfY65r(0x1a),XfY65r(AxoSVXZ(0x13)),XfY65r(AxoSVXZ(-0x23)),XfY65r(0x1d),'9|?d$1PZHv.%;]"!X*W>0k<<|N',XfY65r(0x1c),XfY65r(AxoSVXZ(-0x25)),XfY65r(AxoSVXZ(0x5e)),'&|Na5~7)P;:f*Vx7Ki',XfY65r(AxoSVXZ(-0x22)),XfY65r(0x20),XfY65r(AxoSVXZ(-0x24)),'w|lk4]*A',XfY65r(0x22),'\x78\x6e\x26\x3b\x60\x46\x7c\x7c\x5f\x3f',XfY65r(AxoSVXZ(-0x1a)),'{|~U)2y<M',XfY65r(AxoSVXZ(0x25)),XfY65r(0x1c),XfY65r(AxoSVXZ(0x4e)),XfY65r(AxoSVXZ(-0x24)),'&|2kn4<rV.X>*V*7ai',XfY65r(0x26),XfY65r(0x27),XfY65r(0x28),XfY65r(0x29),'w|lk4]*A',XfY65r(AxoSVXZ(0x26)),XfY65r(0x2b),XfY65r(0x2c),'lTr|Gz%Q_Pl1m7Z],NJJSbi',XfY65r(AxoSVXZ(0x3b)),XfY65r(0x1c),XfY65r(0x2e),XfY65r(AxoSVXZ(0x2e)),XfY65r(AxoSVXZ(0x2c)),'\x39\x7c\x3f\x64\x24\x31\x50\x5a\x4d',XfY65r(0x31),'\x6c\x7c\x44\x30\x31\x53\x4e\x29\x49','\u0034\u007c\u007b\u002f\u004f','&|Na94g%Wr:f*Vx7Ki',XfY65r(0x32),XfY65r(AxoSVXZ(-0x23)),XfY65r(AxoSVXZ(0x7)),XfY65r(0x33),'9|?d$1PZHv.%;]"!X*W>0k<<|N',XfY65r(AxoSVXZ(-0x1)),XfY65r(0x34),XfY65r(0x35),'&|vz$Xu','\x26\x7c\x76\x7a\x29\x67\x68\x4b\x4d',XfY65r(0x36),XfY65r(0x37),XfY65r(0x38),XfY65r(0x1e),XfY65r(0x39),XfY65r(0x3a),XfY65r(0x3b),XfY65r(0x1c),XfY65r(0x3c),'\u0026\u007c\u0054\u007a\u0050\u007e\u0067\u0024\u0062\u0070\u0071\u002c\u0056\u004c',XfY65r(AxoSVXZ(-0x23)),XfY65r(AxoSVXZ(-0x23)),'\u004b\u007c\u0045\u006b\u0028\u0032\u0035\u003c\u004d',XfY65r(0x3d),XfY65r(0x3e),XfY65r(0x3f),XfY65r(AxoSVXZ(0x15)),XfY65r(AxoSVXZ(0x17)),XfY65r(AxoSVXZ(0x35)),XfY65r(0x43),XfY65r(0x44),XfY65r(AxoSVXZ(0xc)),XfY65r(AxoSVXZ(0x22)),XfY65r(0x47),XfY65r(0x48),'&|NaQ#B9I',XfY65r(AxoSVXZ(0x3c)),XfY65r(0x4a),XfY65r(AxoSVXZ(0x1e)),XfY65r(0x4c),XfY65r(AxoSVXZ(-0x23)),XfY65r(AxoSVXZ(0x3e)),XfY65r(AxoSVXZ(0x3f)),XfY65r(0x4f),XfY65r(AxoSVXZ(0x2d)),XfY65r(AxoSVXZ(0x40)),'K|Naz4&A','v|0dyO_vI',XfY65r(0x51),XfY65r(0x52),XfY65r(AxoSVXZ(0x41)),XfY65r(0x54),XfY65r(0x55),XfY65r(0x56),'\u0026\u007c\u0072\u0055\u007b','qUn>Le.Z5oNpfEK`&|B',XfY65r(0x57),XfY65r(AxoSVXZ(-0xc)),XfY65r(0x59),XfY65r(AxoSVXZ(0x18)),XfY65r(0x5b),XfY65r(0x5c),XfY65r(AxoSVXZ(0x33)),XfY65r(AxoSVXZ(0x61)),XfY65r(AxoSVXZ(0x45)),XfY65r(AxoSVXZ(0x4)),'\x7b\x7c\x51\x7a\x7a\x4f\x42\x39\x49',XfY65r(0x60),XfY65r(AxoSVXZ(0x47)),XfY65r(AxoSVXZ(0x27)),XfY65r(AxoSVXZ(0x4a)),XfY65r(AxoSVXZ(0x29)),XfY65r(0x65),XfY65r(0x66),XfY65r(AxoSVXZ(0x4b)),XfY65r(0x68),XfY65r(AxoSVXZ(0x4c)),XfY65r(0x6a),XfY65r(AxoSVXZ(0xd)),XfY65r(AxoSVXZ(0x4d)),XfY65r(AxoSVXZ(0x46)),XfY65r(AxoSVXZ(-0x5)),XfY65r(0x6f),XfY65r(AxoSVXZ(0x2)),XfY65r(0x71),XfY65r(0x72),XfY65r(0x73),XfY65r(AxoSVXZ(0x4f)),'[`n%)SU9"|l`5OU!Z/GtP4Q_VEq2>gx{}62k0g)vZ+IUbA',XfY65r(0x75),XfY65r(0x76),XfY65r(0x77),XfY65r(AxoSVXZ(0x50)),XfY65r(AxoSVXZ(0x51)),XfY65r(0x7a),XfY65r(0x7b),XfY65r(AxoSVXZ(-0x17)),XfY65r(0x7d),'\x38\
// 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"])