faker2/jd_dplh0820.js

21 lines
123 KiB
JavaScript
Raw Normal View History

2024-08-20 07:15:45 +00: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
实物奖品需要填写地址变量才行具体请查看 WIki
cron "1 1 1 1 *" script-path=jd_dplh.js
*/
const $ = new Env('大牌联合0820')
function Y4aPtxh(){}var tKuXJL=Object['defineProperty'],cb6x9Zk,ZjEc9R,AFZAq9B,K6IkJ2,bOjIpb,PIUMVt,gYa1wf6,v2AxKi,QdQrVg,xn6c2h,vBS2EON,XOrzNA,hsXWBY,elr7gi,gheJHC,tQYmFq,EY5l5fk,hNOaPH,qM6VEz,auyB9ak,rbBvBhW,OR7lMzs;function BKfYm0(Y4aPtxh){return cb6x9Zk[Y4aPtxh>0x125?Y4aPtxh-0x29:Y4aPtxh>0x125?Y4aPtxh-0x47:Y4aPtxh>-0x31?Y4aPtxh+0x30:Y4aPtxh-0x1c]}cb6x9Zk=hzfdhR.call(this);function m4bg6a(Y4aPtxh,tKuXJL){return ZjEc9R(Y4aPtxh,'length',{value:tKuXJL,configurable:BKfYm0(0x59)})}Y4aPtxh(ZjEc9R=Object.defineProperty,AFZAq9B=R8Y00p((Y4aPtxh,tKuXJL)=>{return tKuXJL(Y4aPtxh())},0x2)(uIxvcJ,DbEFzML));var S4fLgRm=[],PrvMx1=[L_f04d(0x0),L_f04d(0x1),L_f04d(0x2),L_f04d(0x3),L_f04d(BKfYm0(-0x3)),L_f04d(BKfYm0(-0x6)),L_f04d(0x6),L_f04d(0x7),L_f04d(0x8),L_f04d(BKfYm0(0xd)),L_f04d(BKfYm0(0x71)),L_f04d(0xb),L_f04d(0xc),L_f04d(0xd),L_f04d(BKfYm0(-0x2b)),L_f04d(BKfYm0(-0xc)),L_f04d(0x10),L_f04d(BKfYm0(0x1c)),L_f04d(BKfYm0(-0xd)),L_f04d(BKfYm0(0x1d)),L_f04d(BKfYm0(0xb6)),L_f04d(BKfYm0(-0xe)),L_f04d(0x16),L_f04d(0x17),L_f04d(BKfYm0(-0xb)),L_f04d(0x19),L_f04d(0x1a),L_f04d(0x1b),L_f04d(BKfYm0(-0xf)),L_f04d(BKfYm0(-0xa)),L_f04d(BKfYm0(0x21)),L_f04d(0x1f),L_f04d(0x20),L_f04d(0x21),L_f04d(0x22),L_f04d(0x23),L_f04d(BKfYm0(0x37)),'P>I@>"D*|',L_f04d(BKfYm0(0x24)),L_f04d(0x26),L_f04d(0x27),L_f04d(BKfYm0(-0x10)),L_f04d(0x29),L_f04d(BKfYm0(0x25)),L_f04d(0x2b),L_f04d(BKfYm0(0xa6)),L_f04d(0x2d),L_f04d(BKfYm0(0x26)),L_f04d(0x2f),L_f04d(0x30),L_f04d(BKfYm0(-0x17)),'5$|5a:}O3MN',L_f04d(BKfYm0(0x69)),L_f04d(BKfYm0(0x28)),L_f04d(BKfYm0(0x14)),L_f04d(BKfYm0(0x29)),L_f04d(BKfYm0(-0x2f)),L_f04d(0x2f),L_f04d(0x37),L_f04d(0xe),L_f04d(0x38),L_f04d(0x39),L_f04d(BKfYm0(0x1b)),L_f04d(0x3b),L_f04d(BKfYm0(0x2f)),L_f04d(0x3d),L_f04d(0x3e),L_f04d(BKfYm0(-0x12)),L_f04d(BKfYm0(-0x4)),L_f04d(BKfYm0(-0x2)),L_f04d(BKfYm0(0x0)),L_f04d(BKfYm0(-0x30)),L_f04d(BKfYm0(0x1)),L_f04d(0x44),L_f04d(BKfYm0(0x8)),L_f04d(0x46),L_f04d(0x47),L_f04d(BKfYm0(0x7)),L_f04d(0x49),L_f04d(0x4a),L_f04d(0x4b),L_f04d(0x4c),L_f04d(0x4d),L_f04d(0x4e),L_f04d(0x4f),L_f04d(0x50),L_f04d(BKfYm0(0x34)),L_f04d(0x52),L_f04d(0x53),L_f04d(BKfYm0(-0x2e)),L_f04d(0x54),L_f04d(0x55),L_f04d(BKfYm0(0x36)),L_f04d(BKfYm0(-0x22)),L_f04d(0x58),L_f04d(0x59),L_f04d(0x5a),L_f04d(0x44),'KS=|_7^M',L_f04d(BKfYm0(0x4)),L_f04d(0x5c),L_f04d(BKfYm0(0x4b)),L_f04d(0x5e),L_f04d(BKfYm0(0x39)),L_f04d(BKfYm0(0x3a)),'YxAh:1QV7vvG5As,lz{W[YPKj!*3n$g(<j#r#4#Nk"I>@$<^*oP<qQUso.C#U0}y2OG(e[Ju`NGk8Yz+oIfE7Q.29qO!#kk5.NpG~F6uNAgZ71y=oZ#r{tEBM|`;f9@~GLQodT.EX.vf._',L_f04d(BKfYm0(0x109)),L_f04d(BKfYm0(0x3b)),'{[13|T_',L_f04d(0x63),L_f04d(BKfYm0(0x3e)),L_f04d(BKfYm0(0x3f)),'6&5O(1uo|',L_f04d(BKfYm0(-0x30)),'8v|J<x_',L_f04d(BKfYm0(0x42)),L_f04d(0x67),'tLSD"N|y8~^Ju8umXM',L_f04d(0x68),L_f04d(BKfYm0(0x10c)),'PL]D7S`|Y',L_f04d(0x6a),L_f04d(BKfYm0(0xfd)),L_f04d(0x6c),L_f04d(0x6d),L_f04d(0x6e),L_f04d(BKfYm0(-0x23)),L_f04d(BKfYm0(0x40)),L_f04d(BKfYm0(0x49)),L_f04d(BKfYm0(-0x1b)),L_f04d(0x72),L_f04d(0x73),'|kp^N!|o>oSZ~17R',L_f04d(0x74),L_f04d(BKfYm0(0x43)),L_f04d(BKfYm0(0x44)),'R3o^M5}O|',L_f04d(BKfYm0(0x45)),L_f04d(BKfYm0(0x46)),L_f04d(0x79),L_f04d(0x7a),L_f04d(0x6f),L_f04d(0x7b),L_f04d(0x7c),L_f04d(BKfYm0(-0x2f)),L_f04d(BKfYm0(0xd8)),L_f04d(BKfYm0(-0x2d)),L_f04d(0x7f),L_f04d(0x80),L_f04d(0x81),L_f04d(0x82),L_f04d(BKfYm0(-0x1f)),L_f04d(0x36),'7AN+Wb[s4RnLf^*CsnMC2}z!6R:0el*NxYP$WbPQ[Sgfg7w"m%qEvH|hj3G}&Dn/7wn$??.u,',L_f04d(0x84),L_f04d(BKfYm0(0x4a)),L_f04d(0x86),L_f04d(0x87),L_f04d(BKfYm0(0x114)),L_f04d(0x89),L_f04d(BKfYm0(0x4d)),L_f04d(BKfYm0(0x4f)),L_f04d(0x8c),'=1W#n(5_E|`>+}+Gou<@','4R:,|_Q2v',L_f04d(BKfYm0(-0x2f)),L_f04d(BKfYm0(-0x2e)),'|kp^N![)',L_f04d(0x8d),L_f04d(0x46),L_f04d(0x50),L_f04d(BKfYm0(0x100)),L_f04d(BKfYm0(0x111)),L_f04d(0x90),L_f04d(0x7e),L_f04d(BKfYm0(-0x2a)),L_f04d(BKfYm0(-0x2d)),L_f04d(BKfYm0(0x11b)),L_f04d(0x36),L_f04d(0x93),L_f04d(0x94),L_f04d(0x95),L_f04d(0x96),L_f04d(0x94),L_f04d(0x97),L_f04d(BKfYm0(-0x30)),L_f04d(0x97),L_f04d(BKfYm0(-0x2c)),L_f04d(BKfYm0(0x57)),'ekJO|=)?v',L_f04d(BKfYm0(0xa0)),'?UI@pC_*|yh',L_f04d(0x9b),L_f04d(0x9c),L_f04d(0x9d),L_f04d(0x57),L_f04d(0x9e),L_f04d(BKfYm0(0x5a)),L_f04d(BKfYm0(0x5b)),L_f04d(0xa1)
// 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"])