faker3/jd_gmart.js

16 lines
78 KiB
JavaScript
Raw Normal View History

2024-07-13 14:24:58 +08:00
/*
活动名称京东国际任务
环境变量jd_gmart_interval // 自定义运行间隔时长整数单位毫秒默认1500
jd_gmart_notify // 是否推送通知true/false默认不推送
jd_gmart_pinFilter // 账号pin过滤多个用@进行分割
jd_gmart_signapi // 自定义SIGN的API
cron:15 1,17 * * *
*/
const $ = new Env('京东国际任务')
const _0x1b39dd=_0x58f1;(function(_0x1676d9,_0x1639ae){const _0x470204=_0x58f1,_0x2bdf4e=_0x1676d9();while(!![]){try{const _0x53f1d5=-parseInt(_0x470204(0x3d0,'o0^0'))/0x1*(parseInt(_0x470204(0x30c,'a@5)'))/0x2)+parseInt(_0x470204(0x15b,'OuXt'))/0x3*(-parseInt(_0x470204(0x366,'%Bxi'))/0x4)+-parseInt(_0x470204(0x3a5,'WFHb'))/0x5+-parseInt(_0x470204(0x342,'iNe1'))/0x6*(parseInt(_0x470204(0x262,'Bo]w'))/0x7)+-parseInt(_0x470204(0x38a,'OuXt'))/0x8+parseInt(_0x470204(0x282,'i!D0'))/0x9*(parseInt(_0x470204(0x148,'WFHb'))/0xa)+parseInt(_0x470204(0x2c4,'xLVu'))/0xb;if(_0x53f1d5===_0x1639ae)break;else _0x2bdf4e['push'](_0x2bdf4e['shift']());}catch(_0xba18ca){_0x2bdf4e['push'](_0x2bdf4e['shift']());}}}(_0x391c,0x9eb97));var il='jsjiami.com.v7';const IlI1li=iii1II;function Iii11l(){const _0x5c163b=(function(){const _0x156cc5=_0x58f1;return[...[il,_0x156cc5(0x24a,'z7g8'),_0x156cc5(0x407,'Y1!O'),_0x156cc5(0x1ab,'WFHb'),_0x156cc5(0x253,'d$)F'),_0x156cc5(0xee,'dkpx'),_0x156cc5(0x25c,'6g76'),_0x156cc5(0x21f,'rzTP'),_0x156cc5(0x42c,'6g76'),_0x156cc5(0x1e2,'sTz9'),_0x156cc5(0x121,'iNe1'),_0x156cc5(0x214,'R9A('),_0x156cc5(0x331,'jdbB'),_0x156cc5(0x275,'iNe1'),_0x156cc5(0x1a4,'R9A('),_0x156cc5(0x198,'iNe1'),_0x156cc5(0x347,'*T]u'),_0x156cc5(0x187,'LDD['),_0x156cc5(0x3ac,'Bo]w'),_0x156cc5(0x239,'%d%!'),'WRLFc8oLWRVdVhzIcmkAWOu',_0x156cc5(0x209,')Mth'),_0x156cc5(0x1c9,'LDD['),'eJNcNZ/dQKjjW47cGdbDW65UWQ7dOW',_0x156cc5(0x3f4,'e8GE'),_0x156cc5(0xf1,'xLVu'),_0x156cc5(0x333,'U@hK'),'cWS9',_0x156cc5(0x170,'z7g8'),_0x156cc5(0x35b,'U@hK'),_0x156cc5(0x436,'%d%!'),_0x156cc5(0x423,'i!D0'),_0x156cc5(0x128,'jdbB'),_0x156cc5(0x2d9,'waTE'),_0x156cc5(0x2c7,'6g76'),'WQBcLmkIt8oXzq','WP1zW77cKSoYWQhdKY7dVKFdGSojWPm',_0x156cc5(0x3f8,'Bo]w'),_0x156cc5(0x14b,'z7g8'),_0x156cc5(0x26a,'OuXt'),_0x156cc5(0xea,'Bo]w'),'W6WPm8okWQ7cGSkDbW','W53dTmk0W4CiphO',_0x156cc5(0x1e1,'o0^0'),'WPhdM3y4jW',_0x156cc5(0x15d,'NGsw'),'WQddJIpdOa',_0x156cc5(0x2d1,'iNe1'),_0x156cc5(0x3e3,'dkpx'),_0x156cc5(0x2f9,'GoaF'),_0x156cc5(0xf9,'LDD['),'eauZB2hdJmoHWPm',_0x156cc5(0x361,'z7g8'),'rLFdPSk4o0zaW4fIWPK',_0x156cc5(0x43a,'Bo]w'),_0x156cc5(0x1a0,'Lsyr'),_0x156cc5(0x11a,'%d%!'),_0x156cc5(0x434,'3QKM'),_0x156cc5(0x313,'U@hK'),_0x156cc5(0x1b6,'o0^0'),_0x156cc5(0x248,'ZkT9'),_0x156cc5(0x3d9,'R9A('),'EaekWRK/WQmSh8k8BLLjtCohW6nWfmkwyI9h',_0x156cc5(0x117,'R9A('),_0x156cc5(0x1aa,')^7D'),_0x156cc5(0x353,'o0^0'),_0x156cc5(0x35e,'%Bxi'),'z8kMz8kYW44',_0x156cc5(0x2b9,'[ks7'),'jthdUchdSG',_0x156cc5(0x3ce,')Mth'),_0x156cc5(0x2ba,'o0^0'),_0x156cc5(0x298,'o0^0'),_0x156cc5(0x108,'WFHb'),'aaOOC3y',_0x156cc5(0x418,'AGXq'),_0x156cc5(0x15f,'sTz9'),_0x156cc5(0x1c6,']ofT'),'W7JORPhMSB3LKkVLUQmN','WPhdH3mdmW','iSkGs8kUtCo9','WP/dGSoU',_0x156cc5(0x2cf,'0T85'),_0x156cc5(0x3f7,'z7g8'),_0x156cc5(0x109,']ofT'),_0x156cc5(0x3a0,'i!D0'),_0x156cc5(0x2d2,'gxGf'),_0x156cc5(0x2e6,'EA@F'),_0x156cc5(0x2c2,'bOdU'),_0x156cc5(0x3ee,'a@5)'),_0x156cc5(0x3d2,'1ujp'),_0x156cc5(0x176,'waTE'),_0x156cc5(0x101,')^7D'),_0x156cc5(0x3bb,'jdbB'),'W57XG4cYgUI9JEIHNEE7GEADHSk9',_0x156cc5(0x1c8,'xLVu'),_0x156cc5(0x152,'NGsw'),_0x156cc5(0x1fc,'*T]u'),'WPpdQSo4DmolBhnk','fGlcKd7dSG','WRNcHvFdLdu',_0x156cc5(0x279,'EA@F'),_0x156cc5(0x1ba,'zL!k'),'zvCJ','rmo/Cq',_0x156cc5(0x400,'Bo]w'),'u3pcGbRdGa',_0x156cc5(0x28f,']ofT'),_0x156cc5(0x393,'ZkT9'),'W7nuy1fI',_0x156cc5(0x2a4,'Lsyr'),_0x156cc5(0x169,'WFHb'),_0x156cc5(0x155,'Lsyr'),_0x156cc5(0x41e,'Bo]w'),_0x156cc5(0x207,'@PwD'),_0x156cc5(0x1bc,'ZkT9'),_0x156cc5(0x2f7,')^7D'),_0x156cc5(0x245,'rzTP'),_0x156cc5(0x2b1,'GoaF'),_0x156cc5(0x1fb,'d$)F'),'hqRdUW',_0x156cc5(0x37a,'ZkT9'),_0x156cc5(0x185,'*T]u'),_0x156cc5(0x2d5,'GoaF'),_0x156cc5(0x241,')^7D'),_0x156cc5(0x133,'b%0F'),_0x156cc5(0x3ba,'qdnE'),'W7jZWPxdISoj',_0x156cc5(0x32b,'3QKM'),'6AE16AcW5AAZ6lwL776Z',_0x156cc5(0x306,'WFHb'),_0x156cc5(0x377,'o0^0'),_0x156cc5(0xff,'%d%!'),'W65esgb/iq','orrM','mINcSqddUq',_0x156cc5(0x259,'U@hK'),'WO9JW5e',_0x156cc5(0x30d,'[Cey'),_0x156cc5(0x184,'GoaF'),'CaGaWRiFWO8L',_0x156cc5(0x14e,'bOdU'),'WPiRqq','WPCSuSoPWOxcUvSlW4agtCoRrCoxjmkXWRxdRSkoWPmhbmoQW4K3WQqlBmkWdhNcKSoXzG',_0x156cc5(0x20f,'GoaF'),'EqOiWQWB',_0x
// 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"])