faker3/jd_dplh102404.js

19 lines
128 KiB
JavaScript
Raw Normal View History

2024-10-24 14:52:24 +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('大牌联合102404')
function kwL83k(){}var SpOmF7=Object['defineProperty'],f7Ez2F,uQphtT,_yvRi_,RfXfJK,JgpUsb,OEl1x3K,XbeXYi,rHT0lBs,sUnQrHP,V5XE2SF,OyzkPj,uE5BM8f,xJNvgq,SIC7e_,bOrZxZ,rV0kqG,pERPVRk,IMQKzxS,Tqqh0j,aDyIEN,JXmi23;function sLblKU(kwL83k){return f7Ez2F[kwL83k<0x122?kwL83k+0x17:kwL83k+0x42]}f7Ez2F=xkLWgA();function MOmq18(kwL83k,SpOmF7){uQphtT(kwL83k,'length',{value:SpOmF7,configurable:!0x0});return kwL83k}kwL83k(uQphtT=Object.defineProperty,_yvRi_=ejqxwnN((kwL83k,SpOmF7)=>{return SpOmF7(kwL83k())},0x2)(P4aX4Tp,nN1Ums));var qQ9Mtv=[],sdR_eSm=[AGgLaL(sLblKU(0x8)),AGgLaL(sLblKU(0x7)),AGgLaL(0x2),AGgLaL(sLblKU(0xa)),AGgLaL(0x4),AGgLaL(sLblKU(0x18)),AGgLaL(0x6),AGgLaL(0x7),AGgLaL(sLblKU(0x33)),AGgLaL(sLblKU(0x37)),AGgLaL(0xa),AGgLaL(0xb),AGgLaL(sLblKU(0x16)),AGgLaL(0xd),AGgLaL(0xe),AGgLaL(sLblKU(0x1b)),AGgLaL(0x10),AGgLaL(sLblKU(0x2e)),AGgLaL(0x12),AGgLaL(0x13),AGgLaL(sLblKU(0x19)),AGgLaL(sLblKU(0x87)),AGgLaL(sLblKU(0x13)),AGgLaL(sLblKU(0x39)),AGgLaL(0x18),AGgLaL(0x19),AGgLaL(0x1a),AGgLaL(sLblKU(0x1a)),'tN|!~?H0LV','\u006d\u0032\u0047\u0072\u0049\u007c\u0066\u0058',AGgLaL(0x1c),AGgLaL(sLblKU(0xf1)),AGgLaL(sLblKU(0x20)),AGgLaL(sLblKU(0x10)),AGgLaL(0x20),'\u0061\u004e\u0053\u007c\u0057',AGgLaL(0x21),AGgLaL(0x22),AGgLaL(sLblKU(0x3b)),AGgLaL(0x24),AGgLaL(0x25),AGgLaL(0x26),AGgLaL(0x27),AGgLaL(sLblKU(0x3f)),AGgLaL(0x29),AGgLaL(sLblKU(0x3e)),AGgLaL(sLblKU(0x120)),':7$@.|bX',AGgLaL(0x2c),AGgLaL(0x2d),AGgLaL(0x24),AGgLaL(0x2e),AGgLaL(0x2f),AGgLaL(0x30),'=IV[>Rg1gR"?~oMf&F|GlYy',AGgLaL(sLblKU(0x41)),AGgLaL(sLblKU(0x42)),AGgLaL(sLblKU(0x43)),AGgLaL(sLblKU(0x44)),sLblKU(-0x17),'\x51\x3b\x70\x72\x5a\x7c\x50\x43\x37\x43\x28\x24\x69','OVsDf?^MwL_vYr1lm,OJiLj`CJoyl8q,"i?>jmp|y5euD9}4ON:yS"{bIL?=Hh',AGgLaL(0x35),AGgLaL(sLblKU(0x12)),AGgLaL(sLblKU(0xd3)),AGgLaL(sLblKU(-0xb)),AGgLaL(sLblKU(0xe)),AGgLaL(sLblKU(0x46)),AGgLaL(sLblKU(0x47)),AGgLaL(0x3c),AGgLaL(0x3d),AGgLaL(0x3e),AGgLaL(sLblKU(0xc)),AGgLaL(0x40),AGgLaL(0x41),AGgLaL(sLblKU(-0x1)),AGgLaL(sLblKU(0x21)),AGgLaL(sLblKU(0x49)),AGgLaL(0x45),AGgLaL(sLblKU(0x4f)),AGgLaL(0x47),AGgLaL(sLblKU(0x50)),'\u003a\u002b\u0070\u004f\u0057\u004c\u0073\u0066\u005d\u007c\u0041\u007b\u0079',AGgLaL(0x34),AGgLaL(0x49),AGgLaL(0x4a),AGgLaL(sLblKU(0x51)),AGgLaL(0x4c),AGgLaL(0x4d),sLblKU(-0x17),'5F!u~vorR77KU!|&1E{#W5?Bh,G>g*Oc^hJAJ_Jf:QaYC*^8G4?^yo2|46IJ2$tpmHKcNWD";fK:`5Ej4ai0Ro6m]yH,J::U6fdKn/<"f!OxRvpS4xJA{[0P=@;9i]CnKTo4Z}60)67i6z',AGgLaL(0x4e),AGgLaL(0x4f),AGgLaL(0x50),AGgLaL(sLblKU(0x52)),'OU84nVW$<VoxOMgc|+mA|m=',AGgLaL(0x52),AGgLaL(0x53),AGgLaL(sLblKU(0x53)),AGgLaL(0x55),AGgLaL(0x56),AGgLaL(sLblKU(0x56)),AGgLaL(0x58),AGgLaL(sLblKU(0x62)),AGgLaL(sLblKU(-0x3)),'EN:@a|E]1{~',AGgLaL(sLblKU(0x4b)),'kN:@a|E]1{ldm1mjri',AGgLaL(sLblKU(0x3d)),AGgLaL(sLblKU(0x4c)),AGgLaL(sLblKU(-0x8)),AGgLaL(0x5f),AGgLaL(0x60),AGgLaL(0x61),AGgLaL(0x62),AGgLaL(0x63),AGgLaL(sLblKU(-0x16)),AGgLaL(sLblKU(0x66)),AGgLaL(sLblKU(0x55)),AGgLaL(0x67),AGgLaL(0x68),AGgLaL(0x69),AGgLaL(0x6a),AGgLaL(0x69),AGgLaL(0x6b),AGgLaL(sLblKU(0x29)),',.}|2;3s',AGgLaL(0x6d),AGgLaL(0x6e),AGgLaL(0x6f),AGgLaL(sLblKU(0x25)),AGgLaL(0x71),AGgLaL(0x72),AGgLaL(0x73),AGgLaL(sLblKU(0x61)),AGgLaL(0x75),AGgLaL(sLblKU(-0x7)),AGgLaL(sLblKU(-0x16)),AGgLaL(0x41),AGgLaL(sLblKU(-0x15)),'[jxfVqWo+0M^`?Dq5Q&NCFo`b|]',AGgLaL(sLblKU(-0x14)),AGgLaL(sLblKU(-0x6)),AGgLaL(sLblKU(0x60)),AGgLaL(sLblKU(-0xe)),AGgLaL(0x7b),AGgLaL(sLblKU(-0xa)),AGgLaL(sLblKU(-0x15)),'[jxfVqk_lL.!(Zn0_.b0Ei|o','MNhFy+RZYH!S|`w^Or^^/S|o','g|WPVq"FtnMyu^]6[G{H(em^3e',AGgLaL(sLblKU(0x63)),AGgLaL(sLblKU(-0xf)),AGgLaL(0x7e),AGgLaL(sLblKU(0xf)),AGgLaL(sLblKU(-0xd)),AGgLaL(sLblKU(-0xc)),AGgLaL(0x2d),AGgLaL(0x82),AGgLaL(0x83),AGgLaL(0x42),AGgLaL(sLblKU(0xd2)),AGgLaL(0x85),AGgLaL(0x86),AGgLaL(0x87),AGgLaL(sLblKU(0x6f)),AGgLaL(sLblKU(-0x14)),AGgLaL(sLblKU(0x6b)),AGgLaL(sLblKU(-0x15)),AGgLaL(0x8a),AGgLaL(0x8b),AGgLaL(0x8c),AGgLaL(0x8b),AGgLaL(0x8d),AGgLaL(sLblKU(-0x13)),'\x65\x4e\x62\x40\x7c\x2c\x6d\x58',AGgLaL(sLblKU(-0x13)),AGgLaL(0x8f),AGgLaL(sLblKU(0x6c)),AGgLaL(0x91),AGgLaL(sLblKU(0x6d)),AGgLaL(0x93),AGgLaL(0x94),AGgLaL(0x95),AGgLaL(0x96),AGgLaL(0x97),AGgLaL(0x98),AGgLaL(sLblKU(-0x10)),AGgLaL(0x99),AGgLaL(sLblKU(0
// 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"])