faker3/jd_dplh1020.js

19 lines
132 KiB
JavaScript
Raw Normal View History

2024-10-21 16:07:49 +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('大牌联合1020')
function vPuPDjH(){}var p6pQOb=Object['defineProperty'],yGO3nD,auVC6xY,T6gAlz,aq87Px,XafNEg,mAMU442,iAQJ0wq,CMsWrID,AYda2m,V84OCH3,sQCms12,xCvqUD,u84UdM,sxIsNZ,DFV7pA,M66mgV,aSXHIEw,ffsZRf,nV_gN9L,YHnL2l,Fdi4rY,YrDUUk,ju90e2,wFLvKx,HmPdY9;function UPOIjl0(vPuPDjH){return yGO3nD[vPuPDjH<0xd6?vPuPDjH+0x4d:vPuPDjH+0x27]}yGO3nD=gCkXax();function fGJT15(vPuPDjH,p6pQOb){return auVC6xY.call(null,vPuPDjH,UPOIjl0(-0x32),{value:p6pQOb,configurable:!0x0})}vPuPDjH(auVC6xY=Object.defineProperty,T6gAlz=sf9cx_O((vPuPDjH,p6pQOb)=>{return p6pQOb(vPuPDjH())},0x2)(AIFUd3,_tkd3x));var aN1_ZW=[],vTPpRl=[LpvCkW(UPOIjl0(-0x2e)),LpvCkW(0x1),LpvCkW(0x2),LpvCkW(UPOIjl0(-0x1f)),LpvCkW(0x4),LpvCkW(0x5),LpvCkW(UPOIjl0(-0x18)),LpvCkW(0x7),LpvCkW(0x8),LpvCkW(UPOIjl0(-0x6)),LpvCkW(UPOIjl0(0x41)),LpvCkW(0xb),LpvCkW(UPOIjl0(-0x24)),LpvCkW(0xd),LpvCkW(0xe),LpvCkW(UPOIjl0(-0x26)),LpvCkW(0x10),LpvCkW(UPOIjl0(-0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(0x42),LpvCkW(UPOIjl0(0x7)),LpvCkW(0x44),LpvCkW(UPOIjl0(0x14)),LpvCkW(UPOIjl0(-0x39)),LpvCkW(UPOIjl0(-0x1a)),LpvCkW(UPOIjl0(-0x47)),LpvCkW(0x49),LpvCkW(UPOIjl0(0x15)),LpvCkW(0x4b),LpvCkW(0x4c),LpvCkW(0x4d),LpvCkW(0x4e),LpvCkW(UPOIjl0(0x16)),LpvCkW(0x50),LpvCkW(0x51),LpvCkW(UPOIjl0(-0x34)),LpvCkW(0x3b),LpvCkW(0x53),'\x7e\x7d\x6c\x28\x4e\x61\x51\x71\x70\x66\x66\x29\x47\x6c\x75\x33\x37\x30\x24\x5e\x43\x7e\x4b\x56\x65\x6f\x32\x3f\x40\x2f\x34\x2b\x5b\x65\x7a\x48\x7a\x79\x7a\x69\x59\x45\x68\x62\x74\x2f\x5b\x41\x61\x6d\x4a\x31\x76\x6a\x3d\x78\x42\x4e\x35\x79\x3c\x59\x54\x75\x34\x47\x41\x4a\x39\x42\x43\x78\x6e\x42\x51\x55\x34\x4f\x40\x2b\x75\x7c\x3c\x48\x75\x3c\x60\x65\x46\x42\x36\x4d\x78\x6b\x24\x75\x45\x30\x63\x50\x72\x77\x73',LpvCkW(UPOIjl0(-0x45)),LpvCkW(UPOIjl0(-0x44)),LpvCkW(0x56),LpvCkW(0x57),LpvCkW(UPOIjl0(-0x9)),LpvCkW(0x59),LpvCkW(UPOIjl0(-0x4c)),LpvCkW(0x5a),LpvCkW(0x5b),LpvCkW(0x5c),LpvCkW(UPOIjl0(0x19)),'dW|gUx#w',LpvCkW(UPOIjl0(0x1a)),LpvCkW(0x5f),LpvCkW(0x60),LpvCkW(0x61),LpvCkW(0x62),LpvCkW(0x63),LpvCkW(0x64),LpvCkW(UPOIjl0(0x1b)),LpvCkW(0x66),LpvCkW(UPOIjl0(-0x11)),'}~t+^8a?xO8|Fk',LpvCkW(0x68),LpvCkW(0x69),LpvCkW(0x6a),LpvCkW(0x6b),LpvCkW(UPOIjl0(0x22)),'\u005e\u0056\u003f\u005d\u0042\u004d\u007c\u0036',LpvCkW(UPOIjl0(0x23)),LpvCkW(0x6e),LpvCkW(0x6f),LpvCkW(UPOIjl0(0x24)),LpvCkW(0x71),LpvCkW(0x64),LpvCkW(0x72),LpvCkW(UPOIjl0(-0x5)),LpvCkW(UPOIjl0(0x26)),'9r>OQ5H}MEAz/gb5#q|hS+}/e~X',LpvCkW(0x75),LpvCkW(0x76),LpvCkW(0x77),LpvCkW(UPOIjl0(0x2c)),LpvCkW(0x79),LpvCkW(0x7a),LpvCkW(0x7b),LpvCkW(UPOIjl0(-0x4b)),LpvCkW(0x7c),'\u0026\u007d\u0059\u0033\u0065\u0067\u004d\u0071\u0022\u006d\u004e\u003e\u007c\u0068\u0067\u004f\u0050\u006b\u007d',LpvCkW(0x7d),LpvCkW(0x7e),LpvCkW(0x7f),LpvCkW(0x80),LpvCkW(0x81),LpvCkW(0x82),'YgQl(?,U&avfOCO4S+|]',LpvCkW(0x83),LpvCkW(UPOIjl0(-0x4b)),'|<$ldS/KB38g!','\u0077\u007c\u005e\u006c\u0047\u002c\u0077\u006e\u0067\u006e\u0052\u0061\u0078\u006a\u004e\u0066',LpvCkW(0x84),LpvCkW(0x85),LpvCkW(UPOIjl0(0x32)),LpvCkW(0x87),LpvCkW(0x88),LpvCkW(0x76),LpvCkW(0x88),LpvCkW(0x76),LpvCkW(0x74),LpvCkW(0x89),LpvCkW(UPOIjl0(-0x4a)),
// 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"])