mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 17:49:19 +08:00
18 lines
47 KiB
JavaScript
18 lines
47 KiB
JavaScript
|
/*
|
|||
|
活动名称:新版玩一玩兑换奖品 5.17-8.31结束
|
|||
|
活动入口:APP-我的-更多工具-玩一玩
|
|||
|
活动建议:定时自行修改,奖票有效期2个月
|
|||
|
活动变量:jd_wyw_exchange // 填写兑换值,指定兑换奖品,不填默认只兑换当前价值最高京豆奖品(查看打印兑换值)
|
|||
|
jd_wyw_notify // 是否推送通知,默认不推送
|
|||
|
jd_wyw_pinFilter // 账号pin过滤,多个pin用@分隔,默认不过滤
|
|||
|
jd_wyw_autotx // 是否强制查询提现接口,兑换后提现接口403可以开启
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('新版玩一玩兑换奖品')
|
|||
|
var iil='jsjiami.com.v7';const IliIII=iii1II;if(function(l1i11i,l11iI1,IliiI,lI111i,I1lIII,liIlll,I1iI1I){return l1i11i=l1i11i>>0x6,liIlll='hs',I1iI1I='hs',function(illll1,IIIIl1,liiilI,lI111l,liiii1){const llIi1=iii1II;lI111l='tfi',liIlll=lI111l+liIlll,liiii1='up',I1iI1I+=liiii1,liIlll=liiilI(liIlll),I1iI1I=liiilI(I1iI1I),liiilI=0x0;const IIiiIl=illll1();while(!![]&&--lI111i+IIIIl1){try{lI111l=parseInt(llIi1(0x27b,'er#0'))/0x1*(parseInt(llIi1(0x327,'fhqt'))/0x2)+-parseInt(llIi1(0x28f,'sEvZ'))/0x3+parseInt(llIi1(0x1f1,'f#HJ'))/0x4+parseInt(llIi1(0x1fd,'er#0'))/0x5*(parseInt(llIi1(0x22c,'uIpi'))/0x6)+-parseInt(llIi1(0x32d,'er#0'))/0x7+parseInt(llIi1(0x26b,'T]Xn'))/0x8+-parseInt(llIi1(0x28c,'u3$f'))/0x9;}catch(l1ilIl){lI111l=liiilI;}finally{liiii1=IIiiIl[liIlll]();if(l1i11i<=lI111i)liiilI?I1lIII?lI111l=liiii1:I1lIII=liiii1:liiilI=liiii1;else{if(liiilI==I1lIII['replace'](/[RVNWYyGIqPldeXxgTrn=]/g,'')){if(lI111l===IIIIl1){IIiiIl['un'+liIlll](liiii1);break;}IIiiIl[I1iI1I](liiii1);}}}}}(IliiI,l11iI1,function(IIiiIi,l1ilIi,l11iIi,ll11li,iliIlI,lI111I,IlilI){return l1ilIi='\x73\x70\x6c\x69\x74',IIiiIi=arguments[0x0],IIiiIi=IIiiIi[l1ilIi](''),l11iIi=`\x72\x65\x76\x65\x72\x73\x65`,IIiiIi=IIiiIi[l11iIi]('\x76'),ll11li=`\x6a\x6f\x69\x6e`,(0x173242,IIiiIi[ll11li](''));});}(0x3100,0x3fb40,Iii11l,0xc6),Iii11l){}const jdCookie=require(IliIII(0x34d,'hXs0')),notify=require('./utils/Rebels_sendJDNotify'),common=require('./utils/Rebels_jdCommon'),{H5st}=require(IliIII(0x1f8,'sEvZ'));let taskThreads=process[IliIII(0x375,'GlJW')][IliIII(0x20c,'T]Xn')]||'1';const runInterval=process['env'][IliIII(0x223,'fhqt')]||IliIII(0x201,'6O1$'),isNotify=(process[IliIII(0x378,'er#0')][IliIII(0x37c,'6xs)')]||process[IliIII(0x310,'uD%l')][IliIII(0x273,'6xs)')])===IliIII(0x303,'hXs0'),pinFilter=(process['env'][IliIII(0x29f,'(X0u')]||'')[IliIII(0x2aa,'O0d8')]('@'),exchange=process[IliIII(0x2f4,'uNf8')][IliIII(0x222,'0qS!')]||'',autotx=process[IliIII(0x25c,'mc4x')]['jd_wyw_autotx']==='true',linkId=IliIII(0x243,'k^eI');function iii1II(_0x4e2504,_0x21f677){const _0x2030c1=Iii11l();return iii1II=function(_0x5a545f,_0x126e45){_0x5a545f=_0x5a545f-0x1db;let _0x32deed=_0x2030c1[_0x5a545f];if(iii1II['tTtNGl']===undefined){var _0x5c78e1=function(_0x54c5b2){const _0x1be4b3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3abd16='',_0x2a6df7='';for(let _0x499ae0=0x0,_0x3fc055,_0x194776,_0x585a20=0x0;_0x194776=_0x54c5b2['charAt'](_0x585a20++);~_0x194776&&(_0x3fc055=_0x499ae0%0x4?_0x3fc055*0x40+_0x194776:_0x194776,_0x499ae0++%0x4)?_0x3abd16+=String['fromCharCode'](0xff&_0x3fc055>>(-0x2*_0x499ae0&0x6)):0x0){_0x194776=_0x1be4b3['indexOf'](_0x194776);}for(let _0x1e46af=0x0,_0x3113f9=_0x3abd16['length'];_0x1e46af<_0x3113f9;_0x1e46af++){_0x2a6df7+='%'+('00'+_0x3abd16['charCodeAt'](_0x1e46af)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2a6df7);};const _0xe95679=function(_0x143cc4,_0x57b8b8){let _0x2a64f5=[],_0x3a0ebb=0x0,_0x106252,_0x392092='';_0x143cc4=_0x5c78e1(_0x143cc4);let _0x41c283;for(_0x41c283=0x0;_0x41c283<0x100;_0x41c283++){_0x2a64f5[_0x41c283]=_0x41c283;}for(_0x41c283=0x0;_0x41c283<0x100;_0x41c283++){_0x3a0ebb=(_0x3a0ebb+_0x2a64f5[_0x41c283]+_0x57b8b8['charCodeAt'](_0x41c283%_0x57b8b8['length']))%0x100,_0x106252=_0x2a64f5[_0x41c283],_0x2a64f5[_0x41c283]=_0x2a64f5[_0x3a0ebb],_0x2a64f5[_0x3a0ebb]=_0x106252;}_0x41c283=0x0,_0x3a0ebb=0x0;for(let _0x36a8ce=0x0;_0x36a8ce<_0x143cc4['length'];_0x36a8ce++){_0x41c283=(_0x41c283+0x1)%0x100,_0x3a0ebb=(_0x3a0ebb+_0x2a64f5[_0x41c283])%0x100,_0x106252=_0x2a64f5[_0x41c283],_0x2a64f5[_0x41c283]=_0x2a64f5[_0x3a0ebb],_0x2a64f5[_0x3a0ebb]=_0x106252,_0x392092+=String['fromCharCode'](_0x143cc4['charCodeAt'](_0x36a8ce)^_0x2a64f5[(_0x2a64f5[_0x41c283]+_0x2a64f5[_0x3a0ebb])%0x100]);}return _0x392092;};iii1II['EjUsQb']=_0xe95679,_0x4e2504=arguments,iii1II['tTtNGl']=!![];}const _0x4cf711=_0x2030c1[0x0],_0x57fdc6=_0x5a545f+_0x4cf711,_0x5e878b=_0x4e2504[_0x57fdc6];return!_0x5e878b?(iii1II['PxXbHU']===undefined&&(iii1II['PxXbHU']=!![]),_0x32deed=iii1II['EjUsQb'](_0x32deed,_0x126e45),_0x4e2504[_0x57fdc
|
|||
|
// 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"])
|