faker3/jd_red1111.js

18 lines
81 KiB
JavaScript
Raw Normal View History

2024-10-14 17:05:11 +08:00
/*
活动名称双1111红包
环境变量jd_1111_url // 活动链接
jd_1111_threads // 控制并发线程数正整数默认1最大5尽量使用默认值否则请开启代理运行
jd_1111_interval // 自定义运行间隔时长整数单位毫秒默认2000
jd_1111_notify // 是否推送通知true/false默认不推送
jd_1111_pinFilter // 账号pin过滤多个用@进行分割
cron:0 0,20 * * * jd_red1111.js
*/
2024-10-15 20:17:18 +08:00
const $ = new Env('双1111红包')
function fakertgxdds(){}var faker0p3t8p=Object['defineProperty'],fakerrqaw7bp,fakerdshdrd,fakerc5hctj,fakerbep7tf,fakern9f1h,fakerou1ts8,fakerpc6vc9,fakerynb08k,faker9agkpt,fakerms2zuj,fakerfam4m6,fakergmsuki,fakerso2e,faker76vxl,fakerztj4gk,fakeru4grbc,fakerw34mvs;function fakerje2zag(fakertgxdds){return fakerrqaw7bp[fakertgxdds>-0x65?fakertgxdds+0x64:fakertgxdds-0x59]}fakerrqaw7bp=fakernkgq39.call(this);var faker0ys89=[],faker8kwew=['eL{rUzJT]jFzlE','NO2&H?^h','+:Wkv','Kr@8g','7S,k',';CG[r#_mbw)>^X',';CG[r#_mbwDRmt','f~iQ+G4','UXPh','`R><I','Sg5hQl~M',';CG[r#_mbwU"I}xS>ui',';CG[r#_m&Y=Kgw(#}ri',';CG[r#_mbwfu#wxSkX5h','R76XC',';CG[r#_m&Yu3?YU0[U',';CG[r#_m&Y!3?YU0[U','`RNQf',';CG[r#_m&YgB?|U,poz2H','{5Ngv{4','(sAyH','%rN:','MXWQf','VB#G){A3<`7=^)RkG,*3<;x^+9&pwP{>~&84+','obahv','$xSw9lx<SY','ECcYq|GM#S"+kX','PAB+C|t5?S"+kX','$xo=,l#.QS"+kX','ms{%+|%2eY','~E2;0lHs?@A"kX','g9urW8aM','rg6k[l4','MXWQf','Zs&Q(l,DjFcnU','H%jkg','=ib*,L4','{9r<?P~M','SgDQxJU2d','I9DQf','"g_h','qrzBv|_66T','{9Vh','oNkq6L(:#S5,I615^OuC*E32_g%B8RdG}$X9uTP`5ym.zZ?nAaO=9',',97kd85[m','eRcg','rgWQf','#hWfAb2w>ZTX8U8%)epB','&RJB','{9Vh','GrqH%','Zs6k0Pp"?3rLg!IpaU','?9frI','ZsurSbzar_vIKId,=xi','Q5zl_0z#_hTP>g]#ss"J;LnBPZG$K`51PRjkc=OpA3(=U','kO)H`c*','bOLgN','DR.B','>EfryG4','Esx*yGgM','UK^w9k><9fpBSvpG]CFe:Yc|H8+OWA@KHjawA1qyz^}_1@|%NU','mn|82=yb:m<$v__9Y_~"^CUlSf>3%Z',fakerje2zag(-0x64),'eK^gT9sd]jYm#O!}~K8b!2ed]"!M1hIO>C3xZ`4`o3sSUWM0s}=2#HP`lunEyE|&oV#x#x*','L#^gH{&)X)$PU','TeH#>$lm','j%6kQy{DRDrnU','V18XUwM;<ZFMn3*','vsJ2c#kZ2DrnU','L#^gH{&)X)$PU','NO2j,~KdK3i4U','fs`V]o?N2D$n3GY17g;<R*[[s6','<R3xb|U)9k','?#)H7xkG','=O3x{9<G','!S&V2=[[gx','Zs&Q(l,DjFcnU','NO.BimV?t','AQILdl*',fakerje2zag(-0x63),'[%DQ}*ZM','Zsb*(y[_!$7<g!gpkU','7o{Vq8;M','`i&Q;rUD=$fu!X','+RfrPG}n:A=KU','3R;<*GxM',fakerje2zag(-0x64),'!S&V2=[[gx','Sg2k','x&_s/Qn9{?xoJpNG|6..>W&k&^t.bFT5ta`%Tl!eW',fakerje2zag(-0x63),'Zs&QR*U2;_>X,|@S7S6k','fs`V]o?N2D$n3GY17g;<R*[[s6','Kq2_+','Zs6kfy=n;_rLg!IpaU','f9|h[l=Pm','{9Vh','fs`V]o?N2D$n3GY17g;<R*[[s6','H%jkg','ZsDQ]74','X9a?(J4V<2/_kMkqs~FJ%*k_w}+(bi)0{ELr[lh@Bqh^jGQAFRNMj8T[_}J~?XNI@/WsHW37Ph[lX[HFdBP`XDc:RgTQDv%t$sA5AIr#NMj8T[_}1nW;Y19/X%xS2gLrQ?J#C2f7q=c#`#1J2#Iv%Vt+s{x#@iRQ<?AUYhY^4','vs[<]^xM','rEn21"]aJF7LU','P#H*9P4','mX_h<y0M',',o6kAGw@gV]>,|{;BHJ2b^2N<2U">!wY~h&Qf`K]8KbP,|,a[oQIan&j:xZNyg.#aEP!%~T~7Fzoy!:{_SqhOJ#M','hCFX','99[d7PdGYZ',';C:V',';C&V',fakerje2zag(-0x5d),'>EjksGX0>_5','NmdJCG8am','NmdJ`JD2:A','+R1JCG*dd','+R1JCGhDHuF3*X','vsJ2c#o@ox"FU','UXb*,L4','lR5h',fakerje2zag(-0x63),fakerje2zag(-0x63),'0ga?5>4',';C4!Tbg[tDWN4',']1;!2#Bmi','Kr@8}N/Pm','Zsb*(ynMrD<|U','WXah0:pNNA',fakerje2zag(-0x62),'WXah0:pNNA',fakerje2zag(-0x62),'vs9QQlifd','zR5h','as6kQyZM','*q,d','DsRVHl{Dd',fakerje2zag(-0x61),'{rz2.<8SNAbLU','+R|h1@4',fakerje2zag(-0x60),'rgWQ<ydfd',fakerje2zag(-0x59),'[s&Qb^J]G$KnU',fakerje2zag(-0x5f),'`R><I','!S[<wz7{m','vsPh"bH[m',fakerje2zag(-0x55),'zR5h','UXrcElJnWul!+;q',fakerje2zag(-0x54),'*q,d','DsRVHl{Dd',fakerje2zag(-0x61),fakerje2zag(-0x56),')q~<pP9jd','vsJ2c#o@ox"FU','+R|h1@4',fakerje2zag(-0x60),fakerje2zag(-0x53),'{9(<*G_],D','UXb*,L4','[s&Qb^J]G$KnU',fakerje2zag(-0x5f),'`R><I','8?H7(!~j;','sg<V4arH;','<%sJGG~M',fakerje2zag(-0x5e),'[s6kayNjIx',fakerje2zag(-0x57),'<%sJGGj2;_R','Pz#A',',97k','||$@#w@<Pk','TA>/tyBW',fakerje2zag(-0x5e),';gRQ=^}M',',9DQf','Jb2k3z:"A3U+gt?eUb2k3z4~Y61+gt?eJb2k3z4','4rMt','p9[co>4','ZsurSbzar_vIKId,=xi','0T&;56bWR;FDe[Jda(WJ','4n*Xq','YhR;','Yh&;',fakerje2zag(-0x5d),':v1VN<AB:>]','NmdJCG8am','.T@u+udLRg','+R1JCG*dd','+R1JCGhDHuF3*X','$m&VHl(M:VU|}BtDWbMt',fakerje2zag(-0x5c),'P#H*9P4','mX_h<y0M',fakerje2zag(-0x5c),'P#H*9P4','mX_h<y0M','99~dd+9j+Ka|pX','g9[<f','`i&Qa','g9vk#y@^"$>LU',fakerje2zag(-0x58),fakerje2zag(-0x5b),'~gWQ+G[aWx',fakerje2zag(-0x5a),'6&K08Ye,58*',fakerje2zag(-0x5b),'~gWQ+G[aWx',fakerje2zag(-0x5a),'6&K08Ye,58*',fakerje2zag(-0x5b),'rEn2M~}M','!S`QxJ8am','{9Vh','5oRQ:*=nU$%','H%jkg',fakerje2zag(-0x63),'?9frI','$xo=,l#.?@CykX','!S:QpP}M',fakerje2zag(-0x63),':rVh','gj5`IphQ]9;K@SN','IG7,Ne.[58^','Zsb*(ynMrD<|U',fakerje2zag(-0x59),'>En2<lWjmD','UXb*,L4','{9Vh',fakerje2zag(-0
2024-10-14 17:05:11 +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"])