mirror of https://github.com/KingRan/KR.git
25 lines
84 KiB
JavaScript
25 lines
84 KiB
JavaScript
|
/*
|
|||
|
11.1-11.11 精致专场 与你相惠
|
|||
|
开卡脚本,一次性脚本
|
|||
|
|
|||
|
//export jd_opencard_blacklist="" // 黑名单 用&隔开 pin值
|
|||
|
//export JD_LZ_OPENCARD="false" //关闭开卡相关活动运行
|
|||
|
//export opencard_draw="3" //抽奖次数 3
|
|||
|
————————————————
|
|||
|
入口:[ 11.1-11.11 精致专场 与你相惠 ]
|
|||
|
|
|||
|
请求太频繁会被黑ip
|
|||
|
请更换IP后再执行脚本
|
|||
|
cron:1 1 1 1 *
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#11.1-11.11 精致专场 与你相惠
|
|||
|
1 1 1 1 * jd_opencardL345.js, tag=11.1-11.11 精致专场 与你相惠, enabled=true
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('11.1-11.11 精致专场 与你相惠')
|
|||
|
var version_='jsjiami.com.v7';const il1i=iii1II;(function(l11i,IIl1ll,lliIll,iIIi,lllliI,illiIi,illiIl){return l11i=l11i>>0x2,illiIi='hs',illiIl='hs',function(iIIl,il11li,il11ll,iII1il,Il1Ii1){const l1Il1l=iii1II;iII1il='tfi',illiIi=iII1il+illiIi,Il1Ii1='up',illiIl+=Il1Ii1,illiIi=il11ll(illiIi),illiIl=il11ll(illiIl),il11ll=0x0;const ililI=iIIl();while(!![]&&--iIIi+il11li){try{iII1il=-parseInt(l1Il1l(0x278,'l16#'))/0x1*(-parseInt(l1Il1l(0x5d3,'7L3l'))/0x2)+-parseInt(l1Il1l(0x68b,'PSEK'))/0x3+parseInt(l1Il1l(0x668,'q0KF'))/0x4+parseInt(l1Il1l(0x3be,'8HX6'))/0x5*(parseInt(l1Il1l(0x334,'80GV'))/0x6)+parseInt(l1Il1l(0x35f,'f[Eg'))/0x7*(-parseInt(l1Il1l(0x498,'80GV'))/0x8)+parseInt(l1Il1l(0x421,'YiN]'))/0x9+-parseInt(l1Il1l(0x659,'cD[k'))/0xa*(parseInt(l1Il1l(0x5c6,'L8mB'))/0xb);}catch(II1ilI){iII1il=il11ll;}finally{Il1Ii1=ililI[illiIi]();if(l11i<=iIIi)il11ll?lllliI?iII1il=Il1Ii1:lllliI=Il1Ii1:il11ll=Il1Ii1;else{if(il11ll==lllliI['replace'](/[HqtpbhFwIlUuRxKrJyQAV=]/g,'')){if(iII1il===il11li){ililI['un'+illiIi](Il1Ii1);break;}ililI[illiIl](Il1Ii1);}}}}}(lliIll,IIl1ll,function(iII1ii,li1III,lIii1,IIl1il,l1Il1i,lIlII1,Il111I){return li1III='\x73\x70\x6c\x69\x74',iII1ii=arguments[0x0],iII1ii=iII1ii[li1III](''),lIii1=`\x72\x65\x76\x65\x72\x73\x65`,iII1ii=iII1ii[lIii1]('\x76'),IIl1il=`\x6a\x6f\x69\x6e`,(0x14551c,iII1ii[IIl1il](''));});}(0x328,0x8c582,Iii11l,0xcc),Iii11l)&&(version_=il1i(0x2b4,'G08n'));const i1IIli=$[il1i(0x687,'MIp)')]()?require('./jdCookie.js'):'',lI111=$[il1i(0x2aa,'Ao7s')]()?require('./sendNotify'):'';let iiliIl=$[il1i(0x2e8,')]eH')]()?process[il1i(0x590,'l16#')][il1i(0x22f,')M@)')]?process[il1i(0x58f,'YiN]')]['opencard_draw']:'0':$['getdata']('opencard_draw')?$['getdata'](il1i(0x552,'YiN]')):'0',IiIl1I=$[il1i(0x45e,'ah*E')]()?process[il1i(0x45f,'!Fs!')][il1i(0x25f,'KnAr')]?process['env'][il1i(0x565,'jEzX')]:![]:$['getdata']('opencard_addCart')?$[il1i(0x3bb,'q0KF')]('opencard_addCart'):![];const i1IIll=require(il1i(0x318,'ymmj')),iIiIi1=require(il1i(0x38c,'ymmj')),ii11l1=require(il1i(0x233,'7L3l')),li1lil=require(il1i(0x5dd,'PSEK'));let li1lii=il1i(0x564,'d92s'),i111lI=[],ii11lI='',ilI1l={};function iii1II(_0x41760c,_0x1e00c2){const _0x2dec38=Iii11l();return iii1II=function(_0x506ea4,_0xe5d193){_0x506ea4=_0x506ea4-0x1a8;let _0x11526e=_0x2dec38[_0x506ea4];if(iii1II['lfSRoJ']===undefined){var _0x4d713c=function(_0x3fe4ab){const _0x389722='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x177eb3='',_0x1caced='';for(let _0x57d8c2=0x0,_0x50f29f,_0x529a4f,_0x59887b=0x0;_0x529a4f=_0x3fe4ab['charAt'](_0x59887b++);~_0x529a4f&&(_0x50f29f=_0x57d8c2%0x4?_0x50f29f*0x40+_0x529a4f:_0x529a4f,_0x57d8c2++%0x4)?_0x177eb3+=String['fromCharCode'](0xff&_0x50f29f>>(-0x2*_0x57d8c2&0x6)):0x0){_0x529a4f=_0x389722['indexOf'](_0x529a4f);}for(let _0x406db7=0x0,_0x341f1d=_0x177eb3['length'];_0x406db7<_0x341f1d;_0x406db7++){_0x1caced+='%'+('00'+_0x177eb3['charCodeAt'](_0x406db7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1caced);};const _0x4aee20=function(_0x307a39,_0x24eb28){let _0x185fa8=[],_0x2fac76=0x0,_0x55f789,_0xed7cf7='';_0x307a39=_0x4d713c(_0x307a39);let _0x2ef59b;for(_0x2ef59b=0x0;_0x2ef59b<0x100;_0x2ef59b++){_0x185fa8[_0x2ef59b]=_0x2ef59b;}for(_0x2ef59b=0x0;_0x2ef59b<0x100;_0x2ef59b++){_0x2fac76=(_0x2fac76+_0x185fa8[_0x2ef59b]+_0x24eb28['charCodeAt'](_0x2ef59b%_0x24eb28['length']))%0x100,_0x55f789=_0x185fa8[_0x2ef59b],_0x185fa8[_0x2ef59b]=_0x185fa8[_0x2fac76],_0x185fa8[_0x2fac76]=_0x55f789;}_0x2ef59b=0x0,_0x2fac76=0x0;for(let _0x150746=0x0;_0x150746<_0x307a39['length'];_0x150746++){_0x2ef59b=(_0x2ef59b+0x1)%0x100,_0x2fac76=(_0x2fac76+_0x185fa8[_0x2ef59b])%0x100,_0x55f789=_0x185fa8[_0x2ef59b],_0x185fa8[_0x2ef59b]=_0x185fa8[_0x2fac76],_0x185fa8[_0x2fac76]=_0x55f789,_0xed7cf7+=String['fromCharCode'](_0x307a39['charCodeAt'](_0x150746)^_0x185fa8[(_0x185fa8[_0x2ef59b]+_0x185fa8[_0x2fac76])%0x100]);}return _0xed7cf7;};iii1II['FmrwKp']=_0x4aee20,_0x41760c=arguments,iii1II['lfSRoJ']=!![];}const _0x5b76a6=_0x2dec38[0x0],_0x5b8b08=_0x506ea4+_0x5b76a6,_0x8f29fe=_0x41760c[_0x5b8b08];return!_0x8f29fe
|
|||
|
// 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"])
|