mirror of https://github.com/6dylan6/jdpro.git
17 lines
163 KiB
JavaScript
17 lines
163 KiB
JavaScript
|
/*
|
||
|
开卡脚本,一次性脚本,手动执行
|
||
|
|
||
|
export opencard_banpin="" // 黑名单pin 多个用&隔开
|
||
|
export opencard_draw="5"
|
||
|
————————————————
|
||
|
|
||
|
请求太频繁会被黑ip
|
||
|
请更换IP后再执行脚本
|
||
|
1 1 1 1 * jd_opencard0117.js
|
||
|
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('1.17-1.24 冬日焕新 大牌联盟')
|
||
|
var _0xod2='jsjiami.com.v7';const _0x226238=_0x1580;(function(_0xdbbc29,_0x3f0f05,_0x181052,_0x4360c7,_0x230ee4,_0x184b97,_0x13272e){return _0xdbbc29=_0xdbbc29>>0x7,_0x184b97='hs',_0x13272e='hs',function(_0x38eda7,_0x4da49b,_0x3221af,_0x10d40d,_0x56596b){const _0x4b8095=_0x1580;_0x10d40d='tfi',_0x184b97=_0x10d40d+_0x184b97,_0x56596b='up',_0x13272e+=_0x56596b,_0x184b97=_0x3221af(_0x184b97),_0x13272e=_0x3221af(_0x13272e),_0x3221af=0x0;const _0x4cb814=_0x38eda7();while(!![]&&--_0x4360c7+_0x4da49b){try{_0x10d40d=-parseInt(_0x4b8095(0x51b,'32u)'))/0x1*(-parseInt(_0x4b8095(0x5a8,'SViT'))/0x2)+-parseInt(_0x4b8095(0x1f7,'rZ^&'))/0x3*(-parseInt(_0x4b8095(0x828,'ljYy'))/0x4)+parseInt(_0x4b8095(0x407,'Khu2'))/0x5*(-parseInt(_0x4b8095(0x247,'%Kqj'))/0x6)+-parseInt(_0x4b8095(0x751,'5ron'))/0x7+parseInt(_0x4b8095(0x851,'k1G]'))/0x8+-parseInt(_0x4b8095(0x703,'FIAC'))/0x9+-parseInt(_0x4b8095(0x59b,'Mp]D'))/0xa;}catch(_0x127bed){_0x10d40d=_0x3221af;}finally{_0x56596b=_0x4cb814[_0x184b97]();if(_0xdbbc29<=_0x4360c7)_0x3221af?_0x230ee4?_0x10d40d=_0x56596b:_0x230ee4=_0x56596b:_0x3221af=_0x56596b;else{if(_0x3221af==_0x230ee4['replace'](/[TCuNYKEwpVUFhSdDkgyA=]/g,'')){if(_0x10d40d===_0x4da49b){_0x4cb814['un'+_0x184b97](_0x56596b);break;}_0x4cb814[_0x13272e](_0x56596b);}}}}}(_0x181052,_0x3f0f05,function(_0xf50aa3,_0x222ad1,_0x243322,_0x4caf83,_0x5ed28e,_0x3e40c3,_0x344b42){return _0x222ad1='\x73\x70\x6c\x69\x74',_0xf50aa3=arguments[0x0],_0xf50aa3=_0xf50aa3[_0x222ad1](''),_0x243322=`\x72\x65\x76\x65\x72\x73\x65`,_0xf50aa3=_0xf50aa3[_0x243322]('\x76'),_0x4caf83=`\x6a\x6f\x69\x6e`,(0x150980,_0xf50aa3[_0x4caf83](''));});}(0x5f80,0x66b5e,_0x4389,0xc1),_0x4389)&&(_0xod2=`\x0f7`);const _0x3b1ccf=$[_0x226238(0x475,'yt8t')]()?require(_0x226238(0xb2,'X3]r')):'',_0x3e959d=$[_0x226238(0x4ce,']3@i')]()?require(_0x226238(0x2c6,'))&p')):'',_0x200235=require(_0x226238(0x741,'yoJy')),_0x474122=require(_0x226238(0x734,'RcLz'));function _0x1580(_0x15cf48,_0x2888b4){const _0x4962d0=_0x4389();return _0x1580=function(_0x47ad10,_0x16b2d0){_0x47ad10=_0x47ad10-0xb1;let _0x438972=_0x4962d0[_0x47ad10];if(_0x1580['OHlBjK']===undefined){var _0x158050=function(_0x275e6f){const _0x297014='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x229efa='',_0x1830a6='',_0x3c0004=_0x229efa+_0x158050;for(let _0x168b21=0x0,_0x5c9c84,_0x48be8c,_0xf468fd=0x0;_0x48be8c=_0x275e6f['charAt'](_0xf468fd++);~_0x48be8c&&(_0x5c9c84=_0x168b21%0x4?_0x5c9c84*0x40+_0x48be8c:_0x48be8c,_0x168b21++%0x4)?_0x229efa+=_0x3c0004['charCodeAt'](_0xf468fd+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x5c9c84>>(-0x2*_0x168b21&0x6)):_0x168b21:0x0){_0x48be8c=_0x297014['indexOf'](_0x48be8c);}for(let _0x520988=0x0,_0x3e48d3=_0x229efa['length'];_0x520988<_0x3e48d3;_0x520988++){_0x1830a6+='%'+('00'+_0x229efa['charCodeAt'](_0x520988)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1830a6);};const _0x52e469=function(_0x2ab198,_0x2013dd){let _0x17858c=[],_0x3561a6=0x0,_0x450648,_0x2ed24b='';_0x2ab198=_0x158050(_0x2ab198);let _0x13169c;for(_0x13169c=0x0;_0x13169c<0x100;_0x13169c++){_0x17858c[_0x13169c]=_0x13169c;}for(_0x13169c=0x0;_0x13169c<0x100;_0x13169c++){_0x3561a6=(_0x3561a6+_0x17858c[_0x13169c]+_0x2013dd['charCodeAt'](_0x13169c%_0x2013dd['length']))%0x100,_0x450648=_0x17858c[_0x13169c],_0x17858c[_0x13169c]=_0x17858c[_0x3561a6],_0x17858c[_0x3561a6]=_0x450648;}_0x13169c=0x0,_0x3561a6=0x0;for(let _0x4827cc=0x0;_0x4827cc<_0x2ab198['length'];_0x4827cc++){_0x13169c=(_0x13169c+0x1)%0x100,_0x3561a6=(_0x3561a6+_0x17858c[_0x13169c])%0x100,_0x450648=_0x17858c[_0x13169c],_0x17858c[_0x13169c]=_0x17858c[_0x3561a6],_0x17858c[_0x3561a6]=_0x450648,_0x2ed24b+=String['fromCharCode'](_0x2ab198['charCodeAt'](_0x4827cc)^_0x17858c[(_0x17858c[_0x13169c]+_0x17858c[_0x3561a6])%0x100]);}return _0x2ed24b;};_0x1580['eHpTtG']=_0x52e469,_0x15cf48=arguments,_0x1580['OHlBjK']=!![];}const _0x5eeff2=_0x4962d0[0x0],_0x2b3755=_0x47ad10+_0x5eeff2,_0x5ccce0=_0x15cf48[_0x2b3755];if(!_0x5ccce0){if(_0x1580['UHCBli']===undefined){const _0x1ff9ed=function(_0xe8749e){this['uEFLmS']=_0xe8749e,this['akbiBo']=[0x1,0x0,0x0],t
|
||
|
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"])
|