faker3/jd_wechat_signRedpacket.js

14 lines
33 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
京东微信签到红包
红包仅可在微信小程序使用
cron:29 4 * * *
*/
const $ = new Env('京东微信签到红包')
var il='jsjiami.com.v7';const i1ilIi=iii1II;function iii1II(_0x1dc3bd,_0x4ff881){const _0x5bd1ec=Iii11l();return iii1II=function(_0x22f136,_0x3eccba){_0x22f136=_0x22f136-0x73;let _0x231ea0=_0x5bd1ec[_0x22f136];if(iii1II['hLPdBo']===undefined){var _0x5b4ece=function(_0x43448f){const _0x57c350='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xdfae59='',_0xafe673='';for(let _0x184370=0x0,_0x363194,_0xbb0dc9,_0x295609=0x0;_0xbb0dc9=_0x43448f['charAt'](_0x295609++);~_0xbb0dc9&&(_0x363194=_0x184370%0x4?_0x363194*0x40+_0xbb0dc9:_0xbb0dc9,_0x184370++%0x4)?_0xdfae59+=String['fromCharCode'](0xff&_0x363194>>(-0x2*_0x184370&0x6)):0x0){_0xbb0dc9=_0x57c350['indexOf'](_0xbb0dc9);}for(let _0xe0e462=0x0,_0x353fc6=_0xdfae59['length'];_0xe0e462<_0x353fc6;_0xe0e462++){_0xafe673+='%'+('00'+_0xdfae59['charCodeAt'](_0xe0e462)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xafe673);};const _0x425410=function(_0x3e8c45,_0x44f862){let _0x4c712e=[],_0x1e2e7b=0x0,_0x135345,_0x1e6573='';_0x3e8c45=_0x5b4ece(_0x3e8c45);let _0x509e94;for(_0x509e94=0x0;_0x509e94<0x100;_0x509e94++){_0x4c712e[_0x509e94]=_0x509e94;}for(_0x509e94=0x0;_0x509e94<0x100;_0x509e94++){_0x1e2e7b=(_0x1e2e7b+_0x4c712e[_0x509e94]+_0x44f862['charCodeAt'](_0x509e94%_0x44f862['length']))%0x100,_0x135345=_0x4c712e[_0x509e94],_0x4c712e[_0x509e94]=_0x4c712e[_0x1e2e7b],_0x4c712e[_0x1e2e7b]=_0x135345;}_0x509e94=0x0,_0x1e2e7b=0x0;for(let _0xf39a74=0x0;_0xf39a74<_0x3e8c45['length'];_0xf39a74++){_0x509e94=(_0x509e94+0x1)%0x100,_0x1e2e7b=(_0x1e2e7b+_0x4c712e[_0x509e94])%0x100,_0x135345=_0x4c712e[_0x509e94],_0x4c712e[_0x509e94]=_0x4c712e[_0x1e2e7b],_0x4c712e[_0x1e2e7b]=_0x135345,_0x1e6573+=String['fromCharCode'](_0x3e8c45['charCodeAt'](_0xf39a74)^_0x4c712e[(_0x4c712e[_0x509e94]+_0x4c712e[_0x1e2e7b])%0x100]);}return _0x1e6573;};iii1II['zJdIJu']=_0x425410,_0x1dc3bd=arguments,iii1II['hLPdBo']=!![];}const _0x4a052f=_0x5bd1ec[0x0],_0x599bfc=_0x22f136+_0x4a052f,_0x3b74a6=_0x1dc3bd[_0x599bfc];return!_0x3b74a6?(iii1II['ryaFtk']===undefined&&(iii1II['ryaFtk']=!![]),_0x231ea0=iii1II['zJdIJu'](_0x231ea0,_0x3eccba),_0x1dc3bd[_0x599bfc]=_0x231ea0):_0x231ea0=_0x3b74a6,_0x231ea0;},iii1II(_0x1dc3bd,_0x4ff881);}(function(iii1l1,IIliIl,II11ll,liiI1I,ililII,lI1II1,i1ilII){return iii1l1=iii1l1>>0x5,lI1II1='hs',i1ilII='hs',function(iIIii1,IllIi1,lilIII,Ii1ilI,II11i1){const il1ll=iii1II;Ii1ilI='tfi',lI1II1=Ii1ilI+lI1II1,II11i1='up',i1ilII+=II11i1,lI1II1=lilIII(lI1II1),i1ilII=lilIII(i1ilII),lilIII=0x0;const iliIil=iIIii1();while(!![]&&--liiI1I+IllIi1){try{Ii1ilI=parseInt(il1ll(0xfa,'uvl3'))/0x1*(parseInt(il1ll(0x94,'^w*0'))/0x2)+-parseInt(il1ll(0x19f,'Y*%w'))/0x3+-parseInt(il1ll(0x11c,'qte3'))/0x4+parseInt(il1ll(0x9f,'rwuD'))/0x5*(-parseInt(il1ll(0xe1,'uvl3'))/0x6)+-parseInt(il1ll(0x16a,'Rtkt'))/0x7*(-parseInt(il1ll(0x132,'wlVB'))/0x8)+-parseInt(il1ll(0x10f,'E[Op'))/0x9+parseInt(il1ll(0x145,'sMqA'))/0xa;}catch(iliIii){Ii1ilI=lilIII;}finally{II11i1=iliIil[lI1II1]();if(iii1l1<=liiI1I)lilIII?ililII?Ii1ilI=II11i1:ililII=II11i1:lilIII=II11i1;else{if(lilIII==ililII['replace'](/[RMbEVyKBerlqtPSQIADCN=]/g,'')){if(Ii1ilI===IllIi1){iliIil['un'+lI1II1](II11i1);break;}iliIil[i1ilII](II11i1);}}}}}(II11ll,IIliIl,function(lill1i,il1li,iIIill,iilii,Ill11i,iilil,Ill11l){return il1li='\x73\x70\x6c\x69\x74',lill1i=arguments[0x0],lill1i=lill1i[il1li](''),iIIill=`\x72\x65\x76\x65\x72\x73\x65`,lill1i=lill1i[iIIill]('\x76'),iilii=`\x6a\x6f\x69\x6e`,(0x16bda1,lill1i[iilii](''));});}(0x19a0,0x18e26,Iii11l,0xcf),Iii11l)&&(il=i1ilIi(0x102,'fpGe'));const notify=$[i1ilIi(0xc2,'2JBc')]()?require(i1ilIi(0x14d,'1Hi0')):'',jdCookieNode=$['isNode']()?require(i1ilIi(0x8c,'s7vA')):'',{H5st}=require('./utils/Rebels_H'),common=require(i1ilIi(0xd8,'Rtkt'));let cookiesArr=[],cookie='',message;if($[i1ilIi(0x191,'0mJC')]()){Object[i1ilIi(0x148,'sp@D')](jdCookieNode)['forEach'](li1i1i=>{cookiesArr['push'](jdCookieNode[li1i1i]);});if(process[i1ilIi(0xd5,'fpGe')][i1ilIi(0x11d,'^w*0')]&&process[i1ilIi(0x1a4,'bdHJ')]['JD_DEBUG']===i1ilIi(0x18c,'jb4X'))console[i1ilIi(0xf4,'VGjr')]=()=>{};}else cookiesArr=[$[i1ilIi(0x12
// 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"])