faker3/jd_dplh0624.js

21 lines
71 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +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
实物奖品需要填写地址变量才行具体请查看 WIki
cron "1 1 1 1 *" script-path=jd_dplh.js
*/
const $ = new Env('大牌联合0624')
var il='jsjiami.com.v7';const i11111=iii1II;(function(i1111I,IliIl1,lIl1lI,iiI1ll,lIiliI,iIiill,Ii1IIi){return i1111I=i1111I>>0x6,iIiill='hs',Ii1IIi='hs',function(Ii1IIl,l111I,ll1lli,ll1lll,Illlil){const i1lli=iii1II;ll1lll='tfi',iIiill=ll1lll+iIiill,Illlil='up',Ii1IIi+=Illlil,iIiill=ll1lli(iIiill),Ii1IIi=ll1lli(Ii1IIi),ll1lli=0x0;const I1iili=Ii1IIl();while(!![]&&--iiI1ll+l111I){try{ll1lll=-parseInt(i1lli(0x4b3,'jSMW'))/0x1*(parseInt(i1lli(0x38e,'Sq(8'))/0x2)+parseInt(i1lli(0x504,'KEg9'))/0x3+-parseInt(i1lli(0x37f,'$SuS'))/0x4+-parseInt(i1lli(0x321,'lbmB'))/0x5*(-parseInt(i1lli(0x305,'Q235'))/0x6)+-parseInt(i1lli(0x450,'mCrh'))/0x7+-parseInt(i1lli(0x3b8,'aW&%'))/0x8*(-parseInt(i1lli(0x3ad,'LpEg'))/0x9)+parseInt(i1lli(0x349,'xxBU'))/0xa*(-parseInt(i1lli(0x223,'tX6J'))/0xb);}catch(lililI){ll1lll=ll1lli;}finally{Illlil=I1iili[iIiill]();if(i1111I<=iiI1ll)ll1lli?lIiliI?ll1lll=Illlil:lIiliI=Illlil:ll1lli=Illlil;else{if(ll1lli==lIiliI['replace'](/[PGXxyDknArtQRLSVdNlFC=]/g,'')){if(ll1lll===l111I){I1iili['un'+iIiill](Illlil);break;}I1iili[Ii1IIi](Illlil);}}}}}(lIl1lI,IliIl1,function(lI1ill,Illlii,lI1ili,Il1II,i1lll,Ii11I,I1iill){return Illlii='\x73\x70\x6c\x69\x74',lI1ill=arguments[0x0],lI1ill=lI1ill[Illlii](''),lI1ili=`\x72\x65\x76\x65\x72\x73\x65`,lI1ill=lI1ill[lI1ili]('\x76'),Il1II=`\x6a\x6f\x69\x6e`,(0x173c10,lI1ill[Il1II](''));});}(0x3080,0x8207c,Iii11l,0xc4),Iii11l)&&(il=0x2012);const jdCookie=require(i11111(0x4c7,'anx!')),common=require(i11111(0x52f,'LpEg')),notify=require(i11111(0x2ff,'sto*')),getToken=require(i11111(0x534,'eAi[')),CryptoJS=require('crypto-js');console['log'](''),console[i11111(0x3aa,'Q235')]('=========='+$[i11111(0x519,'LoZM')]+i11111(0x428,'aW&%')),console['log'](i11111(0x386,'9#Cz')),console[i11111(0x388,'Mp&v')](i11111(0x256,'[k8!')),console[i11111(0x4d8,'UzOP')](i11111(0x2e3,'aW&%')),console['log'](i11111(0x525,'iFUL')),console[i11111(0x4d7,'LoZM')](i11111(0x3c0,'aW&%')),console['log']('jd_dplh_Notify\x20//\x20是否通知true/false默认不通知'),console['log']('jd_dplh_break\x20//\x20IP限制后继续执行true/false'),console[i11111(0x3fe,'LpEg')](i11111(0x343,'yys&')+$[i11111(0x37b,'^rHA')]+i11111(0x2e1,'yys&')),console[i11111(0x4cd,'8NcE')]('');const activityUrl=process[i11111(0x4be,'9#Cz')][i11111(0x3dc,'iFUL')]||i11111(0x23d,'eAi['),joinMember=process[i11111(0x49c,'QQwc')][i11111(0x32f,'8NcE')]===i11111(0x36e,'oO[o'),dplh_viewShop=process[i11111(0x41d,'oO[o')]['jd_dplh_viewShop']===i11111(0x47f,'aW&%'),dplh_AddCart=process[i11111(0x3d4,'z!WP')][i11111(0x4d2,'E759')]===i11111(0x3f4,'wdj)'),dplh_draw=process['env']['jd_dplh_draw']||0x5,dplh_wait=process['env'][i11111(0x492,'yys&')]||0x1,isNotify=process['env'][i11111(0x427,'m#R#')]===i11111(0x246,'tX6J'),hotbreak=process['env'][i11111(0x392,'NfBz')]==='true';let waitTimes=parseInt(dplh_wait)*0x3e8;const prize_type={'jdMarket':i11111(0x414,'z!WP'),'coin':'[金币]','point':i11111(0x3c9,'Mp&v'),'integral':i11111(0x4ae,'yys&'),'goods':i11111(0x48a,'tX6J'),'product':'[广告]','coupon':i11111(0x207,'Dsk*'),'chance':i11111(0x27a,'UvEL'),'card':i11111(0x24c,'Ku^w')};let cookie='',originCookie='',cookiesArr=Object[i11111(0x2d2,'UzOP')](jdCookie)[i11111(0x470,'jSMW')](i1lIll=>jdCookie[i1lIll])[i11111(0x490,'Sq(8')](ll11ii=>ll11ii);function iii1II(_0x169c66,_0x250fd4){const _0x17072f=Iii11l();return iii1II=function(_0x30da22,_0x4c4585){_0x30da22=_0x30da22-0x1ee;let _0xbb2b59=_0x17072f[_0x30da22];if(iii1II['jOlEAV']===undefined){var _0x45f86a=function(_0x2c892b){const _0x448571='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4c3eaf='',_0x1b0e4b='';for(let _0x1f40b8=0x0,_0x3c2a41,_0x1112cd,_0x521085=0x0;_0x1112cd=_0x2c892b['charAt'](_0x521085++);~_0x1112cd&&(_0x3c2a41=_0x1f40b8%0x4?_0x3c2a41*0x40+_0x1112cd:_0x1112cd,_0x1f40b8++%0x4)?_0x4c3eaf+=String['fromCharCode'](0xff&_0x3c2a41>>(-0x2*_0x1f40b8&0x6)):0x0){_0x1112cd=_0x448571['indexOf'](_0x1112cd);}for(let _0x4dff46=0x0,_0x2f8bc2=_0x4c3eaf['length'];_0x4dff46<_0x2f8bc2;_0x4dff46++){_0x1b0e4b+='%'+('00'+_0x4c3eaf['charCodeAt'](_0x4dff46)['toString'](0x1
// 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"])