mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-15 00:09:20 +08:00
19 lines
130 KiB
JavaScript
19 lines
130 KiB
JavaScript
|
/*
|
|||
|
活动名称:大牌联合(开卡)
|
|||
|
环境变量:
|
|||
|
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('大牌联合0920')
|
|||
|
function q1KAjMu(){}var wwjls0=Object['defineProperty'],lMyLjRv,o8ZKvAr,h8eCFQ,xp0QMn,j9og7_,etq3tdL,towS4w,wBOzyqH,XzWtlE,bpq9x8,Lu2zGP3,vwWkOwg,iaIY50,UvQiMHr,BznvywU,lS3e3i,END2Ye1,H5DCmw,ICa7Ot8,W0WXLr,c78v7Vz,o2F5oIB,dS5Q2q,r9umoZ;function BhevUXn(q1KAjMu){return lMyLjRv[q1KAjMu>0x47?q1KAjMu>0x18e?q1KAjMu-0x42:q1KAjMu-0x48:q1KAjMu-0x16]}lMyLjRv=HwrYn9();function N56OCV(q1KAjMu,wwjls0){var h8eCFQ=BIjsui(q1KAjMu=>{return lMyLjRv[q1KAjMu>0x191?q1KAjMu-0x1f:q1KAjMu>0x191?q1KAjMu+0x2f:q1KAjMu<0x191?q1KAjMu>0x4a?q1KAjMu-0x4b:q1KAjMu-0x2f:q1KAjMu+0x47]},0x1);o8ZKvAr(q1KAjMu,'length',{value:wwjls0,configurable:h8eCFQ(0x8f)});return q1KAjMu}q1KAjMu(o8ZKvAr=Object.defineProperty,h8eCFQ=BIjsui((q1KAjMu,wwjls0)=>{return wwjls0(q1KAjMu())},0x2)(vDLjuip,JXa2AI));var jRk_BX=[],AZkXW7=[vDBLzmk(0x0),vDBLzmk(BhevUXn(0x67)),vDBLzmk(0x2),vDBLzmk(BhevUXn(0x66)),vDBLzmk(BhevUXn(0x65)),'\u002f\u0043\u006d\u007c\u0021\u003e\u0068\u0071',vDBLzmk(0x5),vDBLzmk(0x6),vDBLzmk(0x7),vDBLzmk(BhevUXn(0x82)),vDBLzmk(0x9),vDBLzmk(0xa),'o<!rM,lGaSg$Kd=ebYQk|USR_S33`byuQI9h_9fY4sG',vDBLzmk(BhevUXn(0xe6)),vDBLzmk(0xc),vDBLzmk(BhevUXn(0x89)),vDBLzmk(BhevUXn(0x75)),vDBLzmk(0xf),vDBLzmk(0x10),vDBLzmk(0x11),vDBLzmk(0x12),vDBLzmk(BhevUXn(0x92)),vDBLzmk(0x14),vDBLzmk(BhevUXn(0x74)),vDBLzmk(0x16),vDBLzmk(BhevUXn(0x94)),vDBLzmk(0x18),vDBLzmk(0x19),vDBLzmk(0x1a),vDBLzmk(BhevUXn(0x11b)),vDBLzmk(BhevUXn(0x76)),vDBLzmk(0x1d),vDBLzmk(0x1e),vDBLzmk(BhevUXn(0x95)),vDBLzmk(0x20),vDBLzmk(0x21),vDBLzmk(0x22),vDBLzmk(0x23),vDBLzmk(0x24),vDBLzmk(0x25),'|b<"E',vDBLzmk(0x26),vDBLzmk(0x27),vDBLzmk(0x28),'\x7b\x5e\x3d\x3e\x7c','}{k9W=cI<P1[KWSC9o$I<,%K|8>p:T=2#>_l|',vDBLzmk(BhevUXn(0x98)),vDBLzmk(0x2a),vDBLzmk(0x2b),vDBLzmk(0x2c),vDBLzmk(BhevUXn(0x9d)),vDBLzmk(0x2e),vDBLzmk(0x2f),vDBLzmk(0x30),vDBLzmk(0x31),vDBLzmk(0x32),'rw3=,S]&r.:Z_tc(dGSu`Sk+e@NN!f.p?G$ykiFcj&%<W}h_||WHv/v9W.dAWfJw$:<uN@h+<Gc5]J',vDBLzmk(0x33),'A4jHVi|:9][N>vnZ.+>z]M8O?3Y>3Yqw!:eL0d*[4cNN)180Ab=zpiTm;]!<V>QZ@wbb','qAVjSt6]*1|Y}c{<rLp@|*dK?Vclxkk=jKpS{?TTZT>',vDBLzmk(0x34),vDBLzmk(BhevUXn(0x48)),vDBLzmk(0x36),vDBLzmk(0x37),vDBLzmk(BhevUXn(0x48)),vDBLzmk(BhevUXn(0x185)),vDBLzmk(0x39),vDBLzmk(0x3a),vDBLzmk(0x3b),vDBLzmk(0x3c),vDBLzmk(BhevUXn(0xae)),vDBLzmk(0x3e),vDBLzmk(0x3f),vDBLzmk(0x40),vDBLzmk(0x41),vDBLzmk(BhevUXn(0xaf)),vDBLzmk(0x43),vDBLzmk(BhevUXn(0xb1)),'MruvL+W(ye3k|x[9Hfhrbw"{:<_lb0Eyr:XS',vDBLzmk(0x45),vDBLzmk(0x43),'A4jHVi|:9]=x>v[hpds64&%9h45>A3&w8If7G<OMV~',vDBLzmk(BhevUXn(0xb2)),vDBLzmk(0x47),vDBLzmk(BhevUXn(0x58)),'0o%r|*JR',vDBLzmk(0x49),vDBLzmk(0x35),vDBLzmk(0x4a),vDBLzmk(0x4b),vDBLzmk(0x4c),vDBLzmk(0x4d),vDBLzmk(0x4e),vDBLzmk(BhevUXn(0x4c)),'F^?I]i+7p**;{?`lLM2n/FG:V@yZg34wxV<u<z<">|$[X3xoyCGx8+W`C&%<W}h_S6;w./Pr9";>kFMNC$dDp+&Ss86@<>>{&"J;fHTr"?4)pi_(C)<u2eD0RQ9BdsXf;b+COc&Dj&*d&a',vDBLzmk(0x4f),vDBLzmk(BhevUXn(0xa8)),vDBLzmk(0x51),vDBLzmk(0x52),'\u0042\u0062\u007c\u0050\u004e\u0033\u006c\u0051\u006a\u0075',vDBLzmk(0x53),vDBLzmk(BhevUXn(0x78)),vDBLzmk(BhevUXn(0x60)),vDBLzmk(BhevUXn(0xb4)),vDBLzmk(BhevUXn(0x61)),vDBLzmk(0x36),vDBLzmk(0x58),'Qb5v|"*d',vDBLzmk(0x59),vDBLzmk(0x5a),'eb5v|"Q_kfoPrkrtjR',vDBLzmk(BhevUXn(0x7d)),vDBLzmk(0x5c),'8/=i|?I%^',vDBLzmk(0x5d),'|CdwnQ{,,P',vDBLzmk(0x5e),'@#|>C.OtF',vDBLzmk(0x5f),vDBLzmk(BhevUXn(0x64)),vDBLzmk(0x60),'eb2?|cqTC1>)R',vDBLzmk(0x61),vDBLzmk(BhevUXn(0x4a)),vDBLzmk(0x62),vDBLzmk(BhevUXn(0x7b)),vDBLzmk(BhevUXn(0xe4)),vDBLzmk(0x65),vDBLzmk(BhevUXn(0xb6)),vDBLzmk(0x67),vDBLzmk(BhevUXn(0x7c)),vDBLzmk(0x69),vDBLzmk(0x5f),'@#|>C.OtF',vDBLzmk(0x45),vDBLzmk(0x31),vDBLzmk(0x6a),vDBLzmk(0x6b),vDBLzmk(0x6c),vDBLzmk(BhevUXn(0xbc)),vDBLzmk(0x6e),vDBLzmk(0x6f),vDBLzmk(BhevUXn(0x5a)),vDBLzmk(0x70),vDBLzmk(BhevUXn(0x51)),vDBLzmk(BhevUXn(0x49)),vDBLzmk(0x72),vDBLzmk(0x73),vDBLzmk(0x74),vDBLzmk(BhevUXn(0xbd)),BhevUXn(0x4f),vDBLzmk(BhevUXn(0x50)),vDBLzmk(BhevUXn(0x49)),vDBLzmk(BhevUXn(0x4a)),vDBLzmk(0x77),vDBLzmk(0x78),vDBLzmk(BhevUXn(0xe5)),vDBLzmk(0x7a),vDBLzmk(0x7b),vDBLzmk(0x6b),vDBLzmk(0x6c),vDBLzmk(0x6b),vDBLzmk(0x6c),vDBLzmk(0x31),vDBLzmk(BhevUXn(0x5b)),vDBLzmk(0x7d),vDBLzmk(BhevUXn(0x4b)),vDBLzmk(BhevUXn(0x5f)),vDBLzmk(0x80),vDBLzmk(0x81),vDBLzmk(BhevUXn(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"])
|