KR/jd_Redpacket.js

24 lines
210 KiB
JavaScript
Raw Normal View History

2023-10-23 19:17:32 +08:00
/*
双11开红包
变量
JD_JF_PROXY_OPEN // 代理启用变量默认不开启true/false
JD_JF_PROXY_TUNNRL // 代理池代理地址变量,默认不开启,仅支持代理池模式(auto-proxy-pool)格式为http://ip:port
JD_JF_PROXY_URL // API代理地址变量默认不开启仅支持 数据格式:txt;提取数量:每次一个格式为http://api.xxx.xxx
JD_JF_NO_PROXY // 禁止走代理,默认 127.0.0.1,*.baidu.com 需要自行修改
JD_JF_CODE_WAIT // 开红包延迟,默认值 10 表示1000ms 需要自行修改
JD_JF_CODE_NUM // 默认全抽,领取次数, 0=不限制 1=领取1次
JD_CODE1111 // https://u.jd.com/xxxxxxx xxxxxxx为变量值就是链接后面那7位字母
2023-10-24 01:27:02 +08:00
59 59 9,20,23 * * * jd_Redpacket.js
2023-10-23 19:17:32 +08:00
*/
const $ = new Env('双11开红包');
2023-10-24 01:27:02 +08:00
var version_='jsjiami.com.v7';const l111i1lI=i1lI1il;(function(lIl11i1l,IiiIiIIi,I1iiIi11,Ii1IlI11,IIllil1I,I11II1ll,liIlIiI){return lIl11i1l=lIl11i1l>>0x2,I11II1ll='hs',liIlIiI='hs',function(i1Iil1Ii,i111l1,lIIIlliI,IIiil1il,Iil11I){const IlIlllI1=i1lI1il;IIiil1il='tfi',I11II1ll=IIiil1il+I11II1ll,Iil11I='up',liIlIiI+=Iil11I,I11II1ll=lIIIlliI(I11II1ll),liIlIiI=lIIIlliI(liIlIiI),lIIIlliI=0x0;const lliIil1i=i1Iil1Ii();while(!![]&&--Ii1IlI11+i111l1){try{IIiil1il=-parseInt(IlIlllI1(0x445,'Gevu'))/0x1*(parseInt(IlIlllI1(0x242,'Cx8T'))/0x2)+parseInt(IlIlllI1(0x6fe,'$Cdt'))/0x3*(parseInt(IlIlllI1(0x572,'T%%%'))/0x4)+-parseInt(IlIlllI1(0x185,'Gevu'))/0x5*(-parseInt(IlIlllI1(0x730,'964X'))/0x6)+-parseInt(IlIlllI1(0x629,'KGx#'))/0x7+parseInt(IlIlllI1(0x4d4,'PoEp'))/0x8+parseInt(IlIlllI1(0x16a,'kb0C'))/0x9+-parseInt(IlIlllI1(0x72e,'oG6l'))/0xa;}catch(lIl1IlIi){IIiil1il=lIIIlliI;}finally{Iil11I=lliIil1i[I11II1ll]();if(lIl11i1l<=Ii1IlI11)lIIIlliI?IIllil1I?IIiil1il=Iil11I:IIllil1I=Iil11I:lIIIlliI=Iil11I;else{if(lIIIlliI==IIllil1I['replace'](/[tdOprYJPVSbLTElKRwN=]/g,'')){if(IIiil1il===i111l1){lliIil1i['un'+I11II1ll](Iil11I);break;}lliIil1i[liIlIiI](Iil11I);}}}}}(I1iiIi11,IiiIiIIi,function(lIiliil1,Ilii1ill,II1l1iII,III11il1,i1I1il1l,Iiiili1l,Il1II1ii){return Ilii1ill='\x73\x70\x6c\x69\x74',lIiliil1=arguments[0x0],lIiliil1=lIiliil1[Ilii1ill](''),II1l1iII=`\x72\x65\x76\x65\x72\x73\x65`,lIiliil1=lIiliil1[II1l1iII]('\x76'),III11il1=`\x6a\x6f\x69\x6e`,(0x14423f,lIiliil1[III11il1](''));});}(0x328,0x1ba6b,lIiiI1Ii,0xcc),lIiiI1Ii)&&(version_=lIiiI1Ii);const IlIllIli=$[l111i1lI(0x2f3,'KGx#')]()?require(l111i1lI(0x609,'GwW@')):'',Il1i1lI=$['isNode']()?require('./sendNotify'):'',llI1li1=require(l111i1lI(0x287,'yshC'));$['CryptoJS']=require(l111i1lI(0x433,'oCil'));let iIiIII1l=[],liIill1='';if($[l111i1lI(0x195,'9X7l')]()){Object['keys'](IlIllIli)[l111i1lI(0x6aa,'GwW@')](iIilIiIl=>{const III1l1Ii=l111i1lI;iIiIII1l[III1l1Ii(0x56f,'oCil')](IlIllIli[iIilIiIl]);});if(process[l111i1lI(0x451,'Pcjo')][l111i1lI(0x199,'%R!D')]&&process[l111i1lI(0x52c,'fnwc')][l111i1lI(0x5fa,'PoEp')]===l111i1lI(0x392,'FP)Z'))console[l111i1lI(0x61b,'3O5W')]=()=>{};}else iIiIII1l=[$[l111i1lI(0x5bd,'69@Y')](l111i1lI(0xef,'Cx8T')),$['getdata']('CookieJD2'),...jsonParse($['getdata'](l111i1lI(0xd6,'7Vnw'))||'[]')[l111i1lI(0x740,'B4rc')](I11IIIll=>I11IIIll['cookie'])]['filter'](ilIliIIi=>!!ilIliIIi);let i1lIii11='',i1lI1l1='';i1lIii11=$[l111i1lI(0x207,'2LbF')]()?process['env'][l111i1lI(0x58e,'fnwc')]?process['env']['JD_CODE1111']:''+i1lIii11:$[l111i1lI(0x774,'hmP[')]('JD_CODE1111')?$[l111i1lI(0x34d,'Pcjo')]('JD_CODE1111'):''+i1lIii11,i1lI1l1=$[l111i1lI(0x378,'tMep')]()?process[l111i1lI(0x691,'oCil')][l111i1lI(0x5fb,'XXCk')]?process[l111i1lI(0x79a,'m]Wc')][l111i1lI(0x6c8,'2LbF')]:''+i1lI1l1:$[l111i1lI(0x373,'FP)Z')](l111i1lI(0x6f3,'4vzr'))?$[l111i1lI(0x1ae,'m]Wc')](l111i1lI(0x23d,'7Vnw')):''+i1lI1l1;let lliIiII1=i1lI1l1&&i1lI1l1[l111i1lI(0x2a9,'DJPe')](',')||[];rebateCode=i1lIii11+'';let IlI111l=l111i1lI(0x51d,'TJ6l');$[l111i1lI(0x5d4,'$Cdt')](l111i1lI(0x348,'zud4')),message='',newCookie='',resMsg='',$[l111i1lI(0x76a,'sMTJ')]='',$[l111i1lI(0x383,'*IUZ')]=![],$[l111i1lI(0x74d,'XXCk')]=![];let lIi11ilI={};$['getH5st_WQ_Arr']={},$[l111i1lI(0x3b5,'ILcv')]={};let llII1iIl=null;const liIlI11=l111i1lI(0x2ee,'oCil');let l11Il111=new Date()['getTime']()+new Date()[l111i1lI(0x5c3,'C^w#')]()*0x3c*0x3e8+0x8*0x3c*0x3c*0x3e8,lil1liii=$[l111i1lI(0x148,'JO!Z')]('H',l11Il111);$[l111i1lI(0x77d,'[LK5')]={},lr={},$[l111i1lI(0x3ea,'[LK5')]='';let Il111Ii='',I1iII1iI='';$[l111i1lI(0x701,'#IX)')](l111i1lI(0x2ba,'$Cdt')),iiIl11iI();const lilil=process['env']['JD_JF_PROXY_OPEN']==='true',lilii1i1=process[l111i1lI(0x52d,'sMTJ')][l111i1lI(0x29f,'C^w#')],IllI1Ii1=process[l111i1lI(0x4b2,'tMep')]['JD_JF_PROXY_URL'],IlIIl1II=process[l111i1lI(0x5e7,'TJ6l')]['JD_JF_NO_PROXY']||l111i1lI(0x4d7,'9X7l');function i1lI1il(_0x338dd3,_0x3c82ea){const _0x25845e=lIiiI1Ii();return i1lI1il=function(_0x3626f0,_0x4a580b){_0x3626f0=_0x3626f0-0xd1;let _0x4ae712=_0x25845e[_0x3626f0];if(i1lI1il['QtGesw']===undefined){var _0xa696e0
2023-10-23 19:17:32 +08:00
function randomString(e){e=e||32;let t='abcdef0123456789',a=t.length,n='';for(i=0;i<e;i++)n+=t.charAt(Math.floor(Math.random()*a));return n}
const navigator={userAgent:`jdapp;iPhone;12.1.4;14.3;${$.CryptoJS.SHA1(randomString(40)).toString()};M/5.0;network/wifi;ADID/;model/iPhone12,1;addressid/;appBuild/167814;jdSupportDarkMode/0;Mozilla/5.0(iPhone;CPU iPhone OS 14_3 like Mac OS X)AppleWebKit/605.1.15(KHTML,like Gecko)Mobile/15E148;supportJDSHWK/1`,plugins:{length:0},language:'zh-CN',};const screen={availHeight:812,availWidth:375,colorDepth:24,height:812,width:375,pixelDepth:24,};const window={};const document={location:{ancestorOrigins:{},href:'https://pro.m.jd.com/mall/active/CZVwK75uo38y7YdC2v8dJ6TH9SS/index.html',origin:'https://pro.m.jd.com',protocol:'https:',host:'pro.m.jd.com',hostname:'pro.m.jd.com',port:'',pathname:'/mall/active/CZVwK75uo38y7YdC2v8dJ6TH9SS/index.html',search:'',hash:'',},};var start_time=new Date().getTime(),_jdfp_canvas_md5='',_jdfp_webgl_md5='',_fingerprint_step=1,_JdEid='',_eidFlag=!1,risk_jd_local_fingerprint='',_jd_e_joint_;function generateUuid(){var t=Math;for(var g='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.split(''),m=0,a=g.length;m<a;m++)switch(g[m]){case'x':g[m]=t.floor(16*t.random()).toString(16);break;case'y':g[m]=(t.floor(4*t.random())+8).toString(16)}return g.join('')}function t(a){if(null==a||void 0==a||''==a)return'NA';if(null==a||void 0==a||''==a)var b='';else{b=[];for(var c=0;c<8*a.length;c+=8)b[c>>5]|=(a.charCodeAt(c/8)&255)<<c%32}a=8*a.length;b[a>>5]|=128<<a%32;b[(((a+64)>>>9)<<4)+14]=a;a=1732584193;c=-271733879;for(var l=-1732584194,h=271733878,q=0;q<b.length;q+=16){var z=a,C=c,D=l,B=h;a=v(a,c,l,h,b[q+0],7,-680876936);h=v(h,a,c,l,b[q+1],12,-389564586);l=v(l,h,a,c,b[q+2],17,606105819);c=v(c,l,h,a,b[q+3],22,-1044525330);a=v(a,c,l,h,b[q+4],7,-176418897);h=v(h,a,c,l,b[q+5],12,1200080426);l=v(l,h,a,c,b[q+6],17,-1473231341);c=v(c,l,h,a,b[q+7],22,-45705983);a=v(a,c,l,h,b[q+8],7,1770035416);h=v(h,a,c,l,b[q+9],12,-1958414417);l=v(l,h,a,c,b[q+10],17,-42063);c=v(c,l,h,a,b[q+11],22,-1990404162);a=v(a,c,l,h,b[q+12],7,1804603682);h=v(h,a,c,l,b[q+13],12,-40341101);l=v(l,h,a,c,b[q+14],17,-1502002290);c=v(c,l,h,a,b[q+15],22,1236535329);a=x(a,c,l,h,b[q+1],5,-165796510);h=x(h,a,c,l,b[q+6],9,-1069501632);l=x(l,h,a,c,b[q+11],14,643717713);c=x(c,l,h,a,b[q+0],20,-373897302);a=x(a,c,l,h,b[q+5],5,-701558691);h=x(h,a,c,l,b[q+10],9,38016083);l=x(l,h,a,c,b[q+15],14,-660478335);c=x(c,l,h,a,b[q+4],20,-405537848);a=x(a,c,l,h,b[q+9],5,568446438);h=x(h,a,c,l,b[q+14],9,-1019803690);l=x(l,h,a,c,b[q+3],14,-187363961);c=x(c,l,h,a,b[q+8],20,1163531501);a=x(a,c,l,h,b[q+13],5,-1444681467);h=x(h,a,c,l,b[q+2],9,-51403784);l=x(l,h,a,c,b[q+7],14,1735328473);c=x(c,l,h,a,b[q+12],20,-1926607734);a=u(c^l^h,a,c,b[q+5],4,-378558);h=u(a^c^l,h,a,b[q+8],11,-2022574463);l=u(h^a^c,l,h,b[q+11],16,1839030562);c=u(l^h^a,c,l,b[q+14],23,-35309556);a=u(c^l^h,a,c,b[q+1],4,-1530992060);h=u(a^c^l,h,a,b[q+4],11,1272893353);l=u(h^a^c,l,h,b[q+7],16,-155497632);c=u(l^h^a,c,l,b[q+10],23,-1094730640);a=u(c^l^h,a,c,b[q+13],4,681279174);h=u(a^c^l,h,a,b[q+0],11,-358537222);l=u(h^a^c,l,h,b[q+3],16,-722521979);c=u(l^h^a,c,l,b[q+6],23,76029189);a=u(c^l^h,a,c,b[q+9],4,-640364487);h=u(a^c^l,h,a,b[q+12],11,-421815835);l=u(h^a^c,l,h,b[q+15],16,530742520);c=u(l^h^a,c,l,b[q+2],23,-995338651);a=w(a,c,l,h,b[q+0],6,-198630844);h=w(h,a,c,l,b[q+7],10,1126891415);l=w(l,h,a,c,b[q+14],15,-1416354905);c=w(c,l,h,a,b[q+5],21,-57434055);a=w(a,c,l,h,b[q+12],6,1700485571);h=w(h,a,c,l,b[q+3],10,-1894986606);l=w(l,h,a,c,b[q+10],15,-1051523);c=w(c,l,h,a,b[q+1],21,-2054922799);a=w(a,c,l,h,b[q+8],6,1873313359);h=w(h,a,c,l,b[q+15],10,-30611744);l=w(l,h,a,c,b[q+6],15,-1560198380);c=w(c,l,h,a,b[q+13],21,1309151649);a=w(a,c,l,h,b[q+4],6,-145523070);h=w(h,a,c,l,b[q+11],10,-1120210379);l=w(l,h,a,c,b[q+2],15,718787259);c=w(c,l,h,a,b[q+9],21,-343485551);a=A(a,z);c=A(c,C);l=A(l,D);h=A(h,B)}b=[a,c,l,h];a='';for(c=0;c<4*b.length;c++)a+='0123456789abcdef'.charAt((b[c>>2]>>((c%4)*8+4))&15)+'0123456789abcdef'.charAt((b[c>>2]>>((c%4)*8))&15);return a}function u(a,b,c,l,h,q){a=A(A(b,a),A(l,q));return A((a<<h)|(a>>>(32-h)),c)}function v(a,b,c,l,h,q,z){return u((b&c)|(~b&l),a,b,h,q,z)}function x(a,b,c,l,h,q,z){return u((b&l)|(c&~l),
// 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.d