faker3/jd_redRain2021.js

20 lines
92 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
活动名称京豆红包雨
环境变量jd_redRain2021_threads // 控制并发线程数正整数默认1最大3尽量使用默认值否则请开启代理运行
jd_redRain2021_interval // 自定义运行间隔时长整数单位毫秒默认2000
jd_redRain2021_notify // 是否推送通知true/false默认不推送
jd_redRain2021_pinFilter // 账号pin过滤多个用@进行分割
高并发脚本谨慎使用并发
活动限制IP严重建议使用代理
定时请自行修改
cron:1 1 1 1 *
*/
const $ = new Env('京豆红包雨')
2024-08-15 13:13:18 +08:00
function IMynam(){}var rlOkAPj=Object['defineProperty'],x_6bgOc,zZkjhw,eFcpJ4X,PYiOUR,h1Ljsku,wTEdMrQ,ULk46o,OnhHkV,QQnR6P4,SV7dZ1,TpK21x,av4Nnk,IluXbP,xAGTZ5,FJAho6,I8xms5,lAcqUw,mQSoBO,DbHfBsr;function z4Cop7(IMynam){return x_6bgOc[IMynam<-0x13?IMynam-0x26:IMynam>0xc7?IMynam+0x6:IMynam<-0x13?IMynam+0x58:IMynam>-0x13?IMynam+0x12:IMynam-0x5b]}x_6bgOc=OjscSZ_.call(this);function xmpdFu(IMynam,rlOkAPj){return zZkjhw.call(z4Cop7(0x46),IMynam,z4Cop7(0x6),{value:rlOkAPj,configurable:!0x0})}zZkjhw=Object.defineProperty;var bOg4kOO=[],Ud7RSxj=['dM4:2}%n','g3+;W}!n','B%d8_~Pn','VCT2+&wNwlWp)f','0B@m9','a$3JetddgZD','9YrbAA|=QpR~h"','hvPW]','Zh}12<D3','E=,_8PA<~ud','7:Rzm','4l6)V','?Zb[nSTi','Y?+!i9`i','?Zb[nSTi','jrlxx=:','TORY#.tQ%Rx6i2%','ZZ9c&[bijR#(GTFXQa','eX0j','~%t!c=Bi','Rl}YhNAa',';6Pmhw9i','^lc@1','~%t!c=|y#*}Rpi&_(GHY]SOy@R~*a','Leqr%',';6;!Pn`i','lB2j','~%t!c=|y#*}Rpi&_(Gt.]Sftcq','JL$x}','~%t!c=|y#*}Rpi&_(G;x&[,+Ap*+iA','}9lx<S:','3Z_n1','ar])','XT6)x=9i','&Ym)',z4Cop7(-0x12),'eiRM,#Lh/1?`J,=SMUKh/A]J}[x3;X#WZx8c}','M(H)u','Kb}49=ItX,','?%W,CwE0X,','fZNE<{E!h,','?%o,5{Si;X"<jr','TORY#.Hi','YTqjQ=:','ir#x}','BZ>x3=0py*o+a','Y?+!i9`i',z4Cop7(-0xf),'4l([0w:','NOYcP]9i','XTpxb@a!d','VOpx}','"Tz)',z4Cop7(-0xc),'Y?+!i9`i',z4Cop7(-0x10),'M$j5qw3&;X60VqW6IsR%','PA<;.,oYqVHY_.,4[7hRdga','#^n0z5N6k$G','NOm)',z4Cop7(-0x12),z4Cop7(-0xd),'BZqjt]|"PUYwTvV|Ha','PO}YV','BZRYX(~i','VO%[wS9i','vXm)','x6^=zt^;z)g]8TF;ZZ"@~w+D]BSKCJ6W]Lyjo4s|_U34a','BZpxFe:',']5JA','BZ3oU6Oa',']5xf',z4Cop7(-0xe),z4Cop7(-0x6),z4Cop7(-0x5),z4Cop7(-0x3),'mr+[1=Wpd',':r,P|]6i','*$wtf)+!0V^','&$,Z)NY!0V^',z4Cop7(-0xb),'vX>m!4Bi','uZz)1=a})_A"a','^L6)','<LJm?nNSXDi"~vi06Ml',z4Cop7(-0x11),'9)>x}Jbi',z4Cop7(-0x11),'ZQ%Q}','{t(8','@+ukXex/<Dv]HV','Jl>x6CDHPB','t8?=[mrN','XY,=[','h&Qk^aJUESI','eX$md.6Qf','Q{L=[','Ye)5pkC#','~0wm=3!a','kw)xV','E=,Psc@.Gd_L~a~}p0C)','PI{N4L5n>','0Mqj)|WkX*3L7=D_TR6V3Xi9xq=U2vvPuZ@!X(dSnmY82IQ0hOz)','8@CnmzD.','P@^A&W0gdaq*?z[2>D7NRnvv@U','>]/du+%64:{?+X&}ODYA','>]/du+!.','T9L[[.bi','~W,KP','>]/du+%6ZM0<T^Y76@bjXRs.','DJCnNQ)azs','vXa~ons.','x]{Ad"vvDC','BZ>x3=6i','drYc}','uZ])"(1Qf','sA7yk3:',z4Cop7(-0x10),z4Cop7(-0x2),'BZ([3nQzvKecTvT|ja','eMNm5.~i','UL~c[Sbi','?Zb[nSTi',z4Cop7(-0x11),'XT!j','b>zZ/x+ONPbM@|$S{qGG8#>j>IAG(*g6AHJEg=vh#','NOm)','BZ>xL[a!~z8r0{kXeXqj','}ZJmFMbi','tOJxt"Xi','Zx8cCL~i','ZZ!j',z4Cop7(-0xf),'BZqj}n4+~zYwTvV|Ha','}O{)Q=4]f','NOm)','XT!j','.D50,#{0zTQY!f_','}ZJmFMP$!pK+US,WeT~cL[QQZq','1EyjT','BZpxFe:','BZ3oU6Oa',z4Cop7(-0xe),'uE^!0k;]OR]8l~^XrK~cL[DFf','#rH)u',z4Cop7(-0xd),'"Y&xU{L$$_(wo5!X}a','"Y&xU{~i','HZz)t&Ei','uZ:PX]dpd','QZz)K9bi','|Tz)d.ti','QZz)w6^H[&<K|r','ynEV','QZz)w6~i','PMIcQ=:',z4Cop7(-0xf),'Y?+!W"Xi','ZZ(Au','yZYc&[g+3z`','E:OoXd1J`',z4Cop7(-0x10),'Uk*;/9`7)^|','eX$md.6Qf','uZ:PX]zHQqE+a','PkChMV<<`E:','uZ:PX]7]j*D+a','PO}YV','"Y&xU{L$f','acLt!%G#q','iNIcy.`i','*P7:BA|B','"Y&xU{L$$_(wG5O~LYbuF@.Hd','NOm)',')^gNGf<th@QYyBfScj_bL19s;VK"F^hYQB~Jv=A6%hJ_rj%vTtb&w,jOi(hYBK(]}q%#','VOhL]Sbi','fr>mZ.Yi','^l&[5.Hi','=0^!]S:','#rH)t&1i',z4Cop7(0x3),z4Cop7(-0xc),'[50d',z4Cop7(0x0),'0Mqj_S}a','Rhvm5.aa','!XQ)Mx,i','{0*=b@1i','eX3oc(,i','YTwYV','BEb[[SzF~zlLa','uE^!0k;]OR]8l~^XrK~cL[DFf','!T)YV','d9NxC8:','Sl5cq@~Ql','0Oej','}OQcQ',z4Cop7(-0x8),'<LwYu=,i','YT.m','eX(!0k7Hy5>UkEF;YT.m','"Y&xU{L$$_(wq6%','eX(!0k7H"CP{tJ.~HZz)ELBi','0Mqj_S2kV!r(y{N~D1@!(I!$c!W*SE.~EXA@[SzF0p','BEb[[S1i','oX|f}',z4Cop7(-0x7),'uZ@!6(dSsd{>|yf','[;8cD[`i','.?Kr','[;8cD[1t._P{tJ$~','^W3v]P:','TOC)H@bi','YTwY6v;i','hOQokI)pLpY+a','9)JmpIEi','LeJTSP?a',z4Cop7(-0x1),'HO=@y','NOm)','^L6)','HZqjxnBi',z4Cop7(0x1),'5)3cr<`i','d9])y.wdOR*UCJQ0hOz)M3*QZq(Ukv?;vX4lMuVMi','L5p[QnBi','vXm)','}.H)?cp?$_|*Tv2N9/.T5','5)3cr<K$tDqRwEH;BZl','[?9=loqM;K3IKi3,N;4!{|M$Omi<BD.~_bcwM<ca%!_*G=7ZNYRVpO$<")','khRYQ=,i','3ZJmGc&I6BK+a','khz)x=^H/dD]B2%','d9])y.wdf','YTwYxP=$i','aU:Pn=Kyd','801oH@/]f','TOQco8:','kh1[%.bi','N0!1I`:','N0!13":','9L=@#.~i','0Mqj_S2kTmF80{N~D1@!(I!$f','759c|]Oyd','NY^!Gc.X$_(wa','rrLx^@6i','Jl>xH','rM/G.=4]4','3@IGGXE]4','.n5t7XJZ4',z4Cop7(0x4),'@n8NH!vmz','VE3oy@"|f','ZEafo4NMr','TOQc}','cEZ@3nQQf','&Ym)',z4Cop7(-0x10),z
2024-06-28 15:38:28 +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"])