faker3/jd_dplh1221.js

20 lines
128 KiB
JavaScript
Raw Normal View History

2024-12-21 17:53:13 +08:00
/*
活动名称大牌联合开卡
环境变量
jd_dplh_viewShop // 是否true/false做浏览任务默认不做
jd_dplh_addCart // 是否true/false做加购任务默认不做
jd_dplh_draw // 抽奖次数,变量暂时无效
jd_dplh_blacklist // 黑名单 用&隔开 pin值
jd_dplh_Notify // 是否通知true/false默认不通知
jd_dplh_break // IP限制后继续执行true/false
cron "1 1 1 1 *" script-path=jd_dplh.js
*/
const $ = new Env('大牌联合1221')
function gP8mSGu(){}var ZGcoI_8=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],WX_kr_2,nr1Y70u,XItqej7,CqDQaqo,nBWMU5Y,oobJaOy,AakxV13,h7WVWDm,jh7sS2,SOympj,VlIbIK2,pDMRvH,gd1s7tZ,BMdAsR,_qMoe3H,dawQPUx,nEsv1s,mMmkCs8;function PZMdJv(gP8mSGu){return WX_kr_2[gP8mSGu>-0x33?gP8mSGu<0x71?gP8mSGu>-0x33?gP8mSGu+0x32:gP8mSGu-0x2c:gP8mSGu-0x39:gP8mSGu-0x62]}gP8mSGu(WX_kr_2=Bvg3ovj(),nr1Y70u=_NPgs4((gP8mSGu,ZGcoI_8)=>{return ZGcoI_8(gP8mSGu())},0x2)(ypC8QUD,xr3wsHq));var mQQzee=[],JtQ2S6=['\x39\x61\x29\x6f\x2a\x7e\x66\x44','\u0057\u0068\u0069\u0051\u0036','\u004c\u002c\u003d\u0051','\x35\x50\x5b\x4b\x58\x57\x5b\x66\x21\x74\x75\x34\x7a\x58',fQ6pKIh(PZMdJv(-0x19)),fQ6pKIh(PZMdJv(-0xf)),'vrc}E',fQ6pKIh(0x2),'\u0035\u0050\u005b\u004b\u0058\u0057\u005b\u0066\u0021\u0074\u005a\u0072\u005a\u0035\u004f\u0026\u0066\u002e\u004a','\x35\x50\x5b\x4b\x58\x57\x5b\x66\x34\x42\x33\x34\x58\x76\x67',fQ6pKIh(0x3),fQ6pKIh(0x4),'\x35\x50\x5b\x4b\x58\x57\x5b\x66\x34\x42\x57\x34\x2a\x5a\x7a\x3d','5P$6,3@1|l',fQ6pKIh(0x5),'\u0060\u0052\u0045\u003e\u0079',fQ6pKIh(0x6),fQ6pKIh(PZMdJv(-0x14)),'SlE9"!zo,B',fQ6pKIh(PZMdJv(-0xe)),'1R%CgAq','\u0056\u005a\u005b\u006e\u0057\u0025\u006e\u0038\u007c\u0042',fQ6pKIh(0x9),'\u0056\u005a\u007b\u0076\u002f\u0021\u007c\u0068\u002c\u0042','\u0060\u0052\u0036\u0051\u0026\u007b\u0035\u0048','?P+Bg%AH&,fWQX','>?#8^zlH',fQ6pKIh(PZMdJv(-0x9)),'9JFQE','\x56\x5a\x49\x26\x33\x25\x3d\x7c\x2c\x42','\x73\x5a\x4d\x7b\x24','\u0037\u0058\u0033\u0043','\x2c\x60\x28\x43\x7d\x21\x22\x48','\u0068\u003e\u004b\u0043',fQ6pKIh(PZMdJv(-0x8)),'\x4c\x48\x5d\x2e\x42\x69\x72\x7c\x5f\x24\x3f\x2f\x76\x42\x21\x41\x2e\x44\x53\x7c\x5f\x46\x33\x76\x45\x6a\x7d\x73\x26\x2c\x69\x78\x5a\x7d\x34\x6b\x45',fQ6pKIh(PZMdJv(-0x16)),'\x32\x26\x4e\x32\x66\x63\x37\x38\x60\x6c\x3b',fQ6pKIh(PZMdJv(-0xb)),fQ6pKIh(0xe),fQ6pKIh(0xf),PZMdJv(-0x31),'\u0048\u0058\u0069\u007d\u0045','\x60\x41\x3c\x6d\x34\x43\x29\x7c\x60\x32\x52\x3e\x2a\x70\x21\x33\x48\x3a\x43\x6c\x68\x43\x64\x25\x4f\x79\x69\x69\x7a\x53\x32\x28\x7d\x3a\x57\x42\x64\x30\x56\x21\x51\x7c\x76\x4d\x5f\x75\x38\x2a\x73\x73\x5f\x67\x6a\x3f\x6a\x6f\x5f\x32\x48\x2e\x5f\x53\x4e\x41\x57\x52\x4d\x6c\x69\x79\x38\x25\x4d\x3a\x21\x7e\x29\x4e','\x4f\x5a\x47\x51\x6f\x33\x70\x66\x6d\x44\x3e\x30\x60\x64\x79\x70\x3a\x37','\x2e\x63\x51\x67\x47\x30\x73\x52\x6f\x29\x49\x69\x2b\x6a\x5b\x3e\x32\x25\x2b\x26\x29\x40\x55\x66\x7d\x3c\x72\x2b\x3c\x72\x3d\x41\x7a\x52\x4f\x5d\x2f\x48\x2c\x49\x63\x21\x69\x69\x23\x59\x55\x2f\x2e\x5a\x6d\x26\x28\x30\x65\x58\x39\x29\x7a\x4d\x47\x2b\x31\x3e\x79\x41\x5a\x5a',fQ6pKIh(PZMdJv(-0x4)),'\u005f\u0042\u0079\u006f\u0035\u0021\u0074\u004b\u0044\u002c\u005d\u0032\u0050\u0051\u0064\u004c\u0043\u0078\u0041\u006f\u0037\u002c\u0070\u0075\u0065\u006d\u006c\u003e\u002a\u0070\u0021\u0033\u0048\u003a\u007c\u005d\u0056\u0078\u002c\u0049\u007c\u0060\u0066\u0050\u0062\u0059\u0032\u0028\u007e\u0037',PZMdJv(-0x32),PZMdJv(-0x1b),PZMdJv(-0x32),'\x5f\x42\x79\x6f\x35\x21\x74\x4b\x44\x2c\x5d\x32\x50\x51\x64\x4c\x60\x41\x5f\x6d\x37\x2c\x70\x75\x65\x6d\x4a\x2e\x4c\x55\x69\x41\x25\x37\x21\x61\x70\x60\x47\x7b\x2e\x34\x3f\x5e\x6f\x3c\x7a\x38\x5f\x5a\x7e\x2e\x4d\x25\x53\x6c\x26\x2c\x21\x57\x7c\x71','\x22\x43\x77\x7d\x45\x76\x3c\x3a\x6d\x44\x25\x34\x7a\x58',fQ6pKIh(PZMdJv(0x57)),fQ6pKIh(0x12),fQ6pKIh(0x13),'\x4f\x5a\x77\x7d\x3d\x33\x26\x48\x51\x4d\x58\x66\x56\x74\x5e\x2c\x7e\x72\x4a',fQ6pKIh(0x14),fQ6pKIh(PZMdJv(-0x1f)),fQ6pKIh(0x15),'\x7b\x73\x57\x21\x7c\x5e\x3b\x5f\x6e\x67\x60\x2f\x6d\x3e\x25\x48\x69\x2e\x45\x73\x66\x32\x33\x4f\x24\x51\x3f\x22\x66\x30\x6a\x6e\x73\x24\x2c\x54','\x41\x4a\x68\x7d\x46\x6e\x48\x34\x56','\u0064\u0054\u0078\u0056\u004d\u0037\u0060\u004e\u0071\u0022\u0052\u0043\u0041','[vKia=m$H&q><!%EkXBbv:7HEv)<[`:2+G.@NQ1{aM',fQ6pKIh(0x16),'\x3e\x60\x47\x51\x31\x21\x71',fQ6pKIh(PZMdJv(-0x1e)),'\x2f\x4c\x76\x60\x73\x2c\x7c\x2c\x68\x4b','\u002f\u005d\u0037\u0056\u0079\u0032\u003b\u005f\u0031\u002e\u0058\u003e\u0041',fQ6pKIh(PZMdJv(-0x1)),PZMdJv(-0x23),fQ6pKIh(0x19),'\u0055\u0063\u003f\u0054\u0047\u003c\u007c\u0076\u0055','\u0033\u0026\u0024\u006a\u0052\u0033\u0071','VX*Ck{oH'
// 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"])