2023-07-27 16:14:01 +08:00
|
|
|
|
/*
|
|
|
|
|
店铺左侧刮刮乐
|
|
|
|
|
|
|
|
|
|
店铺抽奖 左侧
|
|
|
|
|
|
|
|
|
|
也可点击顶部【精选】后面的【活动】选项,找到抽奖活动
|
|
|
|
|
|
|
|
|
|
必须有venderId= 参数
|
2023-07-28 21:29:02 +08:00
|
|
|
|
//export jd_shopDraw_venderId="" //店铺ID,多个@链接
|
2023-07-27 16:14:01 +08:00
|
|
|
|
|
2023-07-28 21:29:02 +08:00
|
|
|
|
cron:1 1 1 1 *
|
2023-07-27 16:14:01 +08:00
|
|
|
|
============Quantumultx===============
|
|
|
|
|
[task_local]
|
|
|
|
|
#店铺左侧刮刮乐
|
2023-07-28 21:29:02 +08:00
|
|
|
|
1 1 1 1 * jd_shopDraw.js, tag=店铺刮刮乐, enabled=true
|
2023-07-27 16:14:01 +08:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
const $ = new Env('店铺左侧刮刮乐');
|
2023-07-28 21:29:02 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const liI1ll=iii1II;(function(ll1Ii,ll1Il,iiIi11,ill1II,i1llil,i1llii,l1i1I1){return ll1Ii=ll1Ii>>0x5,i1llii='hs',l1i1I1='hs',function(llIIil,llIIii,Ii1I1i,llIIlI,Ii1I1l){const iiIi1i=iii1II;llIIlI='tfi',i1llii=llIIlI+i1llii,Ii1I1l='up',l1i1I1+=Ii1I1l,i1llii=Ii1I1i(i1llii),l1i1I1=Ii1I1i(l1i1I1),Ii1I1i=0x0;const IIlIl=llIIil();while(!![]&&--ill1II+llIIii){try{llIIlI=parseInt(iiIi1i(0x168,')WZG'))/0x1*(parseInt(iiIi1i(0x1c7,'xC77'))/0x2)+parseInt(iiIi1i(0x12d,'ts%a'))/0x3*(-parseInt(iiIi1i(0x19c,'Qq)y'))/0x4)+-parseInt(iiIi1i(0x192,'o&R]'))/0x5+parseInt(iiIi1i(0xeb,'Qq)y'))/0x6*(-parseInt(iiIi1i(0x1ef,'vw*&'))/0x7)+-parseInt(iiIi1i(0xf1,'BGLS'))/0x8+-parseInt(iiIi1i(0x1a9,'ts%a'))/0x9+parseInt(iiIi1i(0x1d6,'r)39'))/0xa*(parseInt(iiIi1i(0x211,'LYb@'))/0xb);}catch(ili11l){llIIlI=Ii1I1i;}finally{Ii1I1l=IIlIl[i1llii]();if(ll1Ii<=ill1II)Ii1I1i?i1llil?llIIlI=Ii1I1l:i1llil=Ii1I1l:Ii1I1i=Ii1I1l;else{if(Ii1I1i==i1llil['replace'](/[weHqfEXnyJILrMVPhTxY=]/g,'')){if(llIIlI===llIIii){IIlIl['un'+i1llii](Ii1I1l);break;}IIlIl[l1i1I1](Ii1I1l);}}}}}(iiIi11,ll1Il,function(Iiilll,Iiilli,IIlIi,ili11i,iiIi1l,li11I,lliiII){return Iiilli='\x73\x70\x6c\x69\x74',Iiilll=arguments[0x0],Iiilll=Iiilll[Iiilli](''),IIlIi='\x72\x65\x76\x65\x72\x73\x65',Iiilll=Iiilll[IIlIi]('\x76'),ili11i='\x6a\x6f\x69\x6e',(0x136a46,Iiilll[ili11i](''));});}(0x1920,0x1b110,Iii11l,0xcb),Iii11l)&&(version_=Iii11l);const IiiliI=$['isNode']()?require('./sendNotify'):'',iii1iI=$[liI1ll(0x136,'Qq)y')]()?require(liI1ll(0x19a,'!MFh')):'',llIll=require(liI1ll(0xb9,'#Ih%')),il1iII=require(liI1ll(0x175,'0L#L')),iilli=require(liI1ll(0x137,'0L#L'));let IlllIl=[],II11lI='';if($[liI1ll(0x1fc,'%@V7')]()){Object[liI1ll(0x1ab,'LYb@')](iii1iI)['forEach'](I1iIIl=>{const ll1II=liI1ll;IlllIl[ll1II(0xe2,'SzUx')](iii1iI[I1iIIl]);});if(process[liI1ll(0x12c,'UuXl')][liI1ll(0x104,'R8bZ')]&&process[liI1ll(0x1e3,'x9Qa')][liI1ll(0x184,'0sW[')]===liI1ll(0x1d7,'yGaZ'))console[liI1ll(0x10c,'Q#r%')]=()=>{};}else IlllIl=[$['getdata']('CookieJD'),$[liI1ll(0x19f,'7T9R')](liI1ll(0x180,'0*OK')),...i1l1Ii($[liI1ll(0xda,'yUZd')]('CookiesJD')||'[]')['map'](lI1IIl=>lI1IIl['cookie'])][liI1ll(0x107,'5KUT')](i1ilI=>!!i1ilI);let lI1IIi=[];process[liI1ll(0x1f5,'#Ih%')][liI1ll(0x212,'5KUT')]&&process[liI1ll(0x11c,'5KUT')][liI1ll(0xe0,'yUZd')]!=''&&(lI1IIi=process[liI1ll(0x16d,'g&Aj')]['jd_shopDraw_venderId']['split']('@'));const I1l11I=process[liI1ll(0xbd,'TLhs')]['JD_SIGN_KRAPI']||'';function iii1II(_0x4c1b85,_0x16bef8){const _0x2e9335=Iii11l();return iii1II=function(_0x4801b4,_0x25da6c){_0x4801b4=_0x4801b4-0xb0;let _0x306ebf=_0x2e9335[_0x4801b4];if(iii1II['CcWACt']===undefined){var _0x2c74aa=function(_0x3676f6){const _0x212b3c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1be36a='',_0x2a37b6='';for(let _0x233250=0x0,_0xd5021a,_0x5aaf00,_0x13a86a=0x0;_0x5aaf00=_0x3676f6['charAt'](_0x13a86a++);~_0x5aaf00&&(_0xd5021a=_0x233250%0x4?_0xd5021a*0x40+_0x5aaf00:_0x5aaf00,_0x233250++%0x4)?_0x1be36a+=String['fromCharCode'](0xff&_0xd5021a>>(-0x2*_0x233250&0x6)):0x0){_0x5aaf00=_0x212b3c['indexOf'](_0x5aaf00);}for(let _0x28f711=0x0,_0x965d19=_0x1be36a['length'];_0x28f711<_0x965d19;_0x28f711++){_0x2a37b6+='%'+('00'+_0x1be36a['charCodeAt'](_0x28f711)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2a37b6);};const _0xbbbe1=function(_0x21bf5f,_0x4274e2){let _0x100a10=[],_0x3f577e=0x0,_0x1c563a,_0x239903='';_0x21bf5f=_0x2c74aa(_0x21bf5f);let _0x49c4ba;for(_0x49c4ba=0x0;_0x49c4ba<0x100;_0x49c4ba++){_0x100a10[_0x49c4ba]=_0x49c4ba;}for(_0x49c4ba=0x0;_0x49c4ba<0x100;_0x49c4ba++){_0x3f577e=(_0x3f577e+_0x100a10[_0x49c4ba]+_0x4274e2['charCodeAt'](_0x49c4ba%_0x4274e2['length']))%0x100,_0x1c563a=_0x100a10[_0x49c4ba],_0x100a10[_0x49c4ba]=_0x100a10[_0x3f577e],_0x100a10[_0x3f577e]=_0x1c563a;}_0x49c4ba=0x0,_0x3f577e=0x0;for(let _0x516e2f=0x0;_0x516e2f<_0x21bf5f['length'];_0x516e2f++){_0x49c4ba=(_0x49c4ba+0x1)%0x100,_0x3f577e=(_0x3f577e+_0x100a10[_0x49c4ba])%0x100,_0x1c563a=_0x100a10[_0x49c4ba],_0x100a10[_0x49c4ba]=_0x100a10[_0x3f577e],_0x100a10[_0x3f577e]=_0x1c563a,_0x239903+
|
2023-07-27 16:14:01 +08:00
|
|
|
|
// 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"])
|