jdpro/jd_opencard1229.js

17 lines
169 KiB
JavaScript
Raw Normal View History

2024-01-02 12:59:48 +00:00
/*
开卡脚本,一次性脚本,手动执行
export opencard_banpin="" // 黑名单pin 多个用&隔开
export opencard_draw="5"
请求太频繁会被黑ip
请更换IP后再执行脚本
1 1 11 1 * jd_opencard1229.js
*/
const $ = new Env('12.29-1.5 大牌相约 跨年钜惠')
var _0xodb='jsjiami.com.v7';const _0x1d16d4=_0x4b73;(function(_0x31a213,_0x2f56b0,_0x205660,_0x1fa1e1,_0xa99fed,_0x228462,_0x37831e){return _0x31a213=_0x31a213>>0x3,_0x228462='hs',_0x37831e='hs',function(_0x4c4c17,_0xf8f9cd,_0x220c26,_0x569c4f,_0x4c2c0f){const _0x548316=_0x4b73;_0x569c4f='tfi',_0x228462=_0x569c4f+_0x228462,_0x4c2c0f='up',_0x37831e+=_0x4c2c0f,_0x228462=_0x220c26(_0x228462),_0x37831e=_0x220c26(_0x37831e),_0x220c26=0x0;const _0x586fdf=_0x4c4c17();while(!![]&&--_0x1fa1e1+_0xf8f9cd){try{_0x569c4f=-parseInt(_0x548316(0x21d,'oWAH'))/0x1*(-parseInt(_0x548316(0x19b,'whs7'))/0x2)+-parseInt(_0x548316(0x3af,'D3ZH'))/0x3*(-parseInt(_0x548316(0x494,'h*iQ'))/0x4)+parseInt(_0x548316(0x488,'LCuI'))/0x5*(parseInt(_0x548316(0x169,'N0AR'))/0x6)+-parseInt(_0x548316(0x4ff,'08g3'))/0x7*(parseInt(_0x548316(0x7d1,'LCuI'))/0x8)+-parseInt(_0x548316(0x686,'KINs'))/0x9+parseInt(_0x548316(0x6ee,'N0AR'))/0xa+-parseInt(_0x548316(0x99f,'Zd(x'))/0xb*(-parseInt(_0x548316(0x744,'mhRK'))/0xc);}catch(_0x50b97d){_0x569c4f=_0x220c26;}finally{_0x4c2c0f=_0x586fdf[_0x228462]();if(_0x31a213<=_0x1fa1e1)_0x220c26?_0xa99fed?_0x569c4f=_0x4c2c0f:_0xa99fed=_0x4c2c0f:_0x220c26=_0x4c2c0f;else{if(_0x220c26==_0xa99fed['replace'](/[DAXKOUHBeTqbNunIwSM=]/g,'')){if(_0x569c4f===_0xf8f9cd){_0x586fdf['un'+_0x228462](_0x4c2c0f);break;}_0x586fdf[_0x37831e](_0x4c2c0f);}}}}}(_0x205660,_0x2f56b0,function(_0x18eb50,_0x115c6d,_0x4a1079,_0x4d0f6f,_0x32044f,_0x4e01c5,_0x43319e){return _0x115c6d='\x73\x70\x6c\x69\x74',_0x18eb50=arguments[0x0],_0x18eb50=_0x18eb50[_0x115c6d](''),_0x4a1079=`\x72\x65\x76\x65\x72\x73\x65`,_0x18eb50=_0x18eb50[_0x4a1079]('\x76'),_0x4d0f6f=`\x6a\x6f\x69\x6e`,(0x14dced,_0x18eb50[_0x4d0f6f](''));});}(0x668,0xd3a9c,_0x465d,0xcf),_0x465d)&&(_0xodb=0xcf);const _0x1cd21f=$[_0x1d16d4(0x6f2,'f8(C')]()?require(_0x1d16d4(0x6a9,'MDU[')):'',_0x13573e=$[_0x1d16d4(0x431,'hxol')]()?require(_0x1d16d4(0x4f2,'oWAH')):'',_0x26ad3b=require(_0x1d16d4(0x5be,'WJ3A')),_0x50e3f2=require(_0x1d16d4(0x2f2,'5#$l'));if(process[_0x1d16d4(0x627,'%$58')][_0x1d16d4(0x2f5,'30Ds')])try{require(_0x1d16d4(0x75c,'LCuI')),ccc=require(_0x1d16d4(0x98a,'gL]P')),$[_0x1d16d4(0x59b,'gL]P')]=ccc[_0x1d16d4(0x514,'YZXp')]($[_0x1d16d4(0x789,'85E@')][_0x1d16d4(0x131,'N0AR')]($)),$[_0x1d16d4(0x6b8,'KINs')]=ccc[_0x1d16d4(0x416,'08g3')]($[_0x1d16d4(0x52b,'UKKz')][_0x1d16d4(0x8ec,'WJ3A')]($));}catch{$[_0x1d16d4(0x6cb,'kiSS')](_0x1d16d4(0x17c,'0ve@')),$[_0x1d16d4(0x42f,'u]M1')]=$[_0x1d16d4(0x3c8,'kiSS')],$[_0x1d16d4(0x50c,'u]M1')]=$[_0x1d16d4(0x6b6,'LpPj')];}else $[_0x1d16d4(0x69e,'MDU[')]=$[_0x1d16d4(0x797,'zeb]')],$[_0x1d16d4(0x738,'aawu')]=$[_0x1d16d4(0x8b3,'Zd(x')];let _0x604ddd=[],_0x359dae='',_0x10f049='',_0x52f431='',_0x1fcd84={},_0x3b15d3=0x0,_0x430687=process[_0x1d16d4(0x990,'0ve@')][_0x1d16d4(0x71e,'HLlA')]||![],_0x4d02d7=process[_0x1d16d4(0x1af,'FTRz')][_0x1d16d4(0x273,'MDU[')]||'',_0x1a5082=process[_0x1d16d4(0x222,'kiSS')][_0x1d16d4(0x713,'oWAH')+(__filename[_0x1d16d4(0x485,'5#$l')](/(\d+\w?).js/)?__filename[_0x1d16d4(0x2de,'85E@')](/(\d+\w?).js/)[0x1]:'')+_0x1d16d4(0x15e,'WJ3A')]||'',_0x42b47f=process[_0x1d16d4(0x3c7,'T71G')][_0x1d16d4(0x45c,'whs7')]?process[_0x1d16d4(0x40b,'KINs')][_0x1d16d4(0x40f,'nra3')]:'',_0x2d5fd2=_0x1d16d4(0x18e,'f8(C'),_0x38b668=0x64,_0xa64655=_0x1d16d4(0x91c,'0ve@');$[_0x1d16d4(0x1cc,'zeb]')]=_0xa64655[_0x1d16d4(0x9d2,'KINs')](/activityId=(.*)&/)[0x1],$[_0x1d16d4(0x95f,'KINs')]=_0xa64655[_0x1d16d4(0x1f0,'!up&')](_0x1d16d4(0x535,'mhRK'))[0x1],$[_0x1d16d4(0x281,'nra3')]=![],$[_0x1d16d4(0x6f9,'0ve@')]=![],$[_0x1d16d4(0x445,'UKKz')]=![],$[_0x1d16d4(0x380,'D3ZH')]=0x0,$[_0x1d16d4(0x53a,'GRxP')]=0x0;if($[_0x1d16d4(0x3d2,'MDU[')]()){Object[_0x1d16d4(0x410,'6ppD')](_0x1cd21f)[_0x1d16d4(0x667,'GRxP')](_0x5adff9=>{const _0x7de34=_0x1d16d4;_0x604ddd[_0x7de34(0x77c,'N0AR')](_0x1cd21f[_0x5adff9]);});if(process[_0x1d16d4(0x1fc,'!gJj')][_0x1d16d4(0x3f7,'N^Ax')]&&process[_0x1d16d4(0x222,'kiSS')][_0x1d16d4(0x529,'N0AR')]===_0x1d16d4(0x1bb,'GRxP'))console[_0x1d16d4(0x757,'7Ni3')]=()=>{};}else _0x604ddd=[$[_0x1d16d4(0x929,'PIEA')](_0x1d16d4(0x5ea,'u]M1')),$[_0x1d16d4(0x92f,'9A0R')]
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"])