faker3/jd_dplh1108.js

19 lines
128 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +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('大牌联合1108')
function pzlrFG(){}var aJYuYy=Object['defineProperty'],hR6hIsH,aMsfAeh,AfhGXr,gxYUzc4,xIYVUWH,iEewVz,LF5fEb_,kFmSVA,egX9K1,uY38TQE,R5YSpl,FJxmYO,ij8QXmm,XrkMuZ,ytGonc,iwoVeH,VQWl_dQ,IEXuLI,TJmWOPE,DTJGTtR;function R4ElTh(pzlrFG){return hR6hIsH[pzlrFG<0x132?pzlrFG+0x1a:pzlrFG+0x3]}hR6hIsH=MWNADA();function GOwhLDV(pzlrFG,aJYuYy){return aMsfAeh(pzlrFG,'\x6c\x65\x6e\x67\x74\x68',{value:aJYuYy,configurable:!0x0})}pzlrFG(aMsfAeh=Object.defineProperty,AfhGXr=z27VOgw((pzlrFG,aJYuYy)=>{return aJYuYy(pzlrFG())},0x2)(HQIFGVW,pljs5Vc));var B46pYo=[],uPrU1O=['\x63\x7c\x35\x74\x3b\x24\x5d\x6c','|E~nV95l',GAGq2g_(R4ElTh(0xa)),GAGq2g_(0x1),GAGq2g_(0x2),GAGq2g_(0x3),GAGq2g_(0x4),GAGq2g_(R4ElTh(0x8)),GAGq2g_(0x6),GAGq2g_(0x7),GAGq2g_(0x8),GAGq2g_(0x9),GAGq2g_(0xa),GAGq2g_(R4ElTh(0x2c)),GAGq2g_(R4ElTh(0xc)),GAGq2g_(R4ElTh(0x22)),GAGq2g_(R4ElTh(0x23)),'R_CDj^Cv"!z|G!OT9O',GAGq2g_(0xf),GAGq2g_(0x10),GAGq2g_(R4ElTh(0x35)),GAGq2g_(0x12),GAGq2g_(0x13),GAGq2g_(0x14),GAGq2g_(0x15),GAGq2g_(0x16),GAGq2g_(R4ElTh(0x38)),GAGq2g_(R4ElTh(0x8b)),GAGq2g_(0x19),GAGq2g_(R4ElTh(0x60)),GAGq2g_(R4ElTh(0x39)),GAGq2g_(R4ElTh(0x1f)),GAGq2g_(0x1d),GAGq2g_(0x1e),GAGq2g_(0x1f),GAGq2g_(R4ElTh(0x10)),GAGq2g_(0x21),GAGq2g_(0x22),GAGq2g_(R4ElTh(0x3a)),GAGq2g_(R4ElTh(0x11)),GAGq2g_(R4ElTh(0x3b)),GAGq2g_(0x26),GAGq2g_(0x27),'eoP3!Z#:LI?&Q!Ef3|d:LAO',GAGq2g_(0x28),GAGq2g_(0x29),GAGq2g_(0x2a),GAGq2g_(0x2b),GAGq2g_(R4ElTh(0x3e)),GAGq2g_(R4ElTh(0x3f)),GAGq2g_(R4ElTh(0x20)),GAGq2g_(0x2f),GAGq2g_(0x30),GAGq2g_(R4ElTh(-0x18)),GAGq2g_(0x27),GAGq2g_(R4ElTh(0x19)),',F<%T+wvG|U$}z8wlO',GAGq2g_(0x33),GAGq2g_(0x34),'h3<%Mw=)/m;#KE>`}PB8;/okn<E|]zzG%kBM>nssUsx',GAGq2g_(R4ElTh(0x42)),GAGq2g_(0x36),GAGq2g_(0x37),GAGq2g_(R4ElTh(0x41)),GAGq2g_(R4ElTh(0x46)),GAGq2g_(R4ElTh(0xb5)),GAGq2g_(0x3b),GAGq2g_(R4ElTh(0x4c)),GAGq2g_(0x3d),GAGq2g_(R4ElTh(0x4d)),'kM6npQ(lG|Y#O',GAGq2g_(0x3f),GAGq2g_(R4ElTh(0xf8)),R4ElTh(-0x1a),GAGq2g_(R4ElTh(0xa2)),'\u0061\u007d\u0056\u0053\u0050\u0032\u004c\u002b\u0021\u002c\u0028\u007a\u003b\u005d\u0034\u0054\u0058\u0064\u004a\u007d\u0046\u0066\u0074\u003e\u0063\u0060\u0035\u007c\u0046\u0026\u0049\u0021\u007d\u0063\u0031\u004d',GAGq2g_(0x42),GAGq2g_(R4ElTh(0x4f)),R4ElTh(-0x1a),GAGq2g_(R4ElTh(0x51)),GAGq2g_(R4ElTh(0x52)),GAGq2g_(R4ElTh(0x11d)),GAGq2g_(0x47),GAGq2g_(0x48),GAGq2g_(R4ElTh(-0x17)),GAGq2g_(R4ElTh(0x55)),GAGq2g_(0x4b),GAGq2g_(0x4c),GAGq2g_(R4ElTh(0x1e)),GAGq2g_(R4ElTh(0x69)),GAGq2g_(0x4f),GAGq2g_(R4ElTh(-0xc)),GAGq2g_(0x51),GAGq2g_(0x52),GAGq2g_(R4ElTh(0x12c)),'JR1FswY,_$$ev16.[a=5tJB`2!u8hU0Nj2K"K*K<{()74Uj@ukBjlY}6k~/K}zy%dfeN:tXOi<e{^JaEk)bQ_Y~dolf!K{{v~<Ae]TxO<10c_w%rkcK"=HQ|C?iDbo4]eLYkSW~Qp~$b~G',GAGq2g_(0x54),GAGq2g_(0x55),GAGq2g_(0x56),GAGq2g_(R4ElTh(0x56)),'}pguC$a`)DF=|x%Q',GAGq2g_(R4ElTh(0x4e)),GAGq2g_(R4ElTh(-0x4)),GAGq2g_(R4ElTh(0x53)),GAGq2g_(R4ElTh(0x21)),GAGq2g_(0x5c),GAGq2g_(R4ElTh(0x57)),GAGq2g_(R4ElTh(0x125)),GAGq2g_(0x5f),'?LMq(<?%^]|',GAGq2g_(R4ElTh(0x47)),GAGq2g_(R4ElTh(0x4b)),GAGq2g_(0x62),GAGq2g_(R4ElTh(0x49)),GAGq2g_(0x64),'|#RuSfVo',GAGq2g_(R4ElTh(0x5a)),GAGq2g_(R4ElTh(0x82)),GAGq2g_(0x67),GAGq2g_(R4ElTh(0x2e)),'cQTJ|^mA',GAGq2g_(R4ElTh(-0x19)),GAGq2g_(R4ElTh(0x61)),GAGq2g_(R4ElTh(-0x19)),GAGq2g_(0x6b),GAGq2g_(R4ElTh(0x5d)),GAGq2g_(0x6d),GAGq2g_(R4ElTh(0x27)),GAGq2g_(0x6f),GAGq2g_(0x70),GAGq2g_(0x71),GAGq2g_(R4ElTh(0x3)),GAGq2g_(0x73),GAGq2g_(0x74),GAGq2g_(0x75),GAGq2g_(0x76),GAGq2g_(0x77),GAGq2g_(R4ElTh(0x83)),GAGq2g_(R4ElTh(0x1b)),GAGq2g_(R4ElTh(0x14)),GAGq2g_(R4ElTh(0x17)),GAGq2g_(0x7b),GAGq2g_(0x7c),'kM6npQ(ln<5|}z_','\x6b\x4d\x36\x6e\x70\x51\x28\x6c\x47\x7c\x68\x6d\x57\x21\x38\x43',GAGq2g_(0x7d),GAGq2g_(0x31),GAGq2g_(0x7e),GAGq2g_(R4ElTh(0x2b)),GAGq2g_(0x80),GAGq2g_(0x81),GAGq2g_(R4ElTh(0x6a)),GAGq2g_(R4ElTh(0x6b)),GAGq2g_(0x84),'|hQD',GAGq2g_(0x85),GAGq2g_(0x86),GAGq2g_(R4ElTh(-0x18)),GAGq2g_(0x6d),GAGq2g_(R4ElTh(0x6d)),GAGq2g_(R4ElTh(0x6e)),GAGq2g_(R4ElTh(0x6f)),GAGq2g_(0x8a),GAGq2g_(0x64),GAGq2g_(R4ElTh(-0x12)),GAGq2g_(R4ElTh(-0xb)),GAGq2g_(0x7b),GAGq2g_(0x31),GAGq2g_(R4ElTh(-0x17)),GAGq2g_(R4ElTh(-0x16)),GAGq2g_(0x8c),GAGq2g_(0x8d),GAGq2g_(R4ElTh(-0x16)),GAGq2g_(0x8e),GAGq2g_(0x53),GAGq2g_(R4ElTh(0x72)),GAGq2g_(0x8f),GAG
// 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"])