faker3/jd_try_notify.js

18 lines
69 KiB
JavaScript
Raw Normal View History

2024-08-13 16:34:06 +08:00
/*
活动名称京东试用通知
环境变量
jd_try_threads // 控制并发线程数正整数默认1最大3
jd_try_interval // 自定义运行间隔时长整数单位毫秒默认1500
jd_try_pinFilter // 账号pin过滤多个用@进行分割
有需要领取的试用品时脚本会自动推送通知
cron:59 16 * * *
*/
const $ = new Env('京东试用通知')
function ICQkbV(){}var iT2hWzr=Object['defineProperty'],BAsYbl,yFr4bG,G6o3kL,Uo8zD9,ZsQzcKb,w4rXL_M,TQClkY,aGqPbb,pfYiYJg,Jo6ArC,qcJF8xk,EDMo8fO,Z4XUv02,rNhKi_k,PLhHHb,hkqYBK;function wIH6nq(ICQkbV){return BAsYbl[ICQkbV>0x8a?ICQkbV-0x49:ICQkbV>0x8a?ICQkbV+0x3d:ICQkbV>0x8a?ICQkbV-0x43:ICQkbV+0xe]}BAsYbl=LhzTz0T.call(this);function Iuv8Gg(ICQkbV,iT2hWzr){var G6o3kL=mZxIjQY(ICQkbV=>{return BAsYbl[ICQkbV<0x1e?ICQkbV-0x37:ICQkbV>0x1e?ICQkbV<0xb7?ICQkbV-0x1f:ICQkbV-0x44:ICQkbV-0x14]},0x1);return yFr4bG(ICQkbV,G6o3kL(0x26),{value:iT2hWzr,configurable:!0x0})}yFr4bG=Object.defineProperty;var YYMFOg=[],B_iN5h=['%vqur{Nc','8niT!7~tl','KSxIsr`:','~P7UoAw/l','tK?#PO_c','U2*y:0kc','/dv?Br~k~ZVWND','tbp7&','cIO%!Xaaq1S','&+(LVVzM`G6?Ai','A;=@d','4VB"Nuph','24,vh?sh','nZRtUo)m','I,C*','@O>*8','.EBM%','mf2b)w/s','{mn_sdSs',wIH6nq(-0xc),'RcE44,a','/r={oY`s','!Vn_2l2s','ffd]Fb2s','CV;M],ds','9FoR|','Wx(R','>X*NW+e~Q2.hif%*`k','>X*NW+e~CH8q~/FQU?E','^F0cX','>X*NW+Ks','$x;MfYOs','$x,MfYOs','GVU47','>X*NW+e~<i7=]Io>]feR','7dE49wa','OfJ)#','kc+M','x/BM4,ds',wIH6nq(-0xd),'F{NM',wIH6nq(-0xe),'Ws=3LoVZ&#mSGL,w3:pZ&e+G7b4O?xo$f4h]7','38`M|','/r={oY`s','{/0R@,a',wIH6nq(-0xe),'Hfz4O,(yDPAnk','#KDR/','.E8b(qa','ojb`P@N(','x/y42lk_j','%ry47','C/iM','oc`M"FQUUJ','*rNM','3URI0qOF?xB(%0$B<5=Xbm:_i/K[YVjwSpcr=t+GB)g~!H6nJ`5.r',wIH6nq(-0xa),wIH6nq(-0x9),wIH6nq(-0xe),';[a$Kjl]S8vnjx`!yU<e','wWC=!f<Rvlp_`JH','PUI?`q&]=xj3h4]C=t0D','Hf0R"+QC6:{q/}%Q`k','6r7{%','/r2b]FkywH','@Ky4SbHs','mf2b)w/s',wIH6nq(-0xb),'Hfz4O,(yDPAnk','|f+MC8#@g','5euDTOa','*rNM','@Ky4SbHs',wIH6nq(-0xd),'Hf8bO)@i}pW]/}/QRk','W3*NIY>s','IM>ARYmjc',':V>]bw2s',wIH6nq(-0xc),wIH6nq(-0xb),'x/_R','2zif&4nr*623lQUw;0~~hok','6e9?Br?]m<E3ZU8+7:e','$qm,','Hfz4Vbk_>ihc(;TxWx0R',wIH6nq(-0xa),'#KDR/','Hf0R7).n>i{q/}%Q`k',';_vAn/3i"','*rNM','x/_R','Y[I(Lo;(i/@{_gJ',';X+1sahl}RN<$@>Y^!md6unnXk','#KDR/','Hfy4vWa','+6y*HIX;DWTP,m%','P!CDV','dX}DV','S7OiN%W:wd>Ix</it`c&+##hb5',wIH6nq(-0x9),'+6Ld#edxEo]','y4U4Bha','@fiMXAv`}Hz+k','B90j;','J_1A','IF<}Y,s|eg^[G','09|AV','09|Az.4lly','d)Fe5/HRx','+fKj|','+.6YBGEUQTA7g{','*rNM',wIH6nq(-0x9),'`fKbB8"@g','x_Vxk','xPJj:Lb','u05vjSb','HK2bbwiv>iEVk','jd*4^ha',';X^D^i)B','upLd(u?ztyhvz+lm','`XkDYSgn!#9B=9znS6.jj*mB','b?h][bSs','4rDR',';_ndn','cc{]7','nXfj38gn.y','6fnbIYywg','~$bc','`XkD_Hf;x','Gpg,k%{"=Ewu7UjQdq?Eu/E#~Et8%Y4QY<e?*%[IGm','996jqef;Ay~,G','FDkKG(Y;','VVh]2lBs','jfo5','C{F4:;>s',',I.j$vmB','!VBM','v|g,NK];','RX61?/JRx','TMCDV','xP;I/e;a.y7{%OC','h5A~w1$;',')Mof','"6q*P4X;','JIq}&dtQlyS[G','%AEd9UNlz(kW[)|p`Xf','uFTfmSmB','?GF$[sy;','IMO]c9pUIXl}.}e(.2E','7Y`Mm]ymUJQP/}1*d&Y/I','uId]Q+rDj','Gpg,k%{"ZoI9GUjQdq?Eu/E#~E@a9_{M.5SN0FHI|5xd<xXW[2|z%&t%2>k#Q7%Z8urz.{m/T[8)PUqjpu!w1%F/z','wwDNT?b;','+fKj|','I!0jd*x;x','*hG!','"6[5N}TvV!di]{P','n|fNN}x0!','~Yr?=}Gm!','8Vnbr+a','s*,l%,a','kc_R','VXJj^S]B','a/WIGKOG','Spe!5/@G','1Jb/>q$k','{mn_sdSs','Wg)].<Ss','{mn_$Cv`lPWqk','9V#b%,(yj','/r2b?)d@g','ccnb],?+Z2','KE0R/','ffml3h2s','nV~qO)"s','$ry4[bSs','ffml3h4@tF^cI1B$Ax!_+wa','Wxml3h4@tF^cI1B$Ax!_+wa','w?q{t8?s','qFk{#,ds','|fr4fY[@g','38"br+$yj','"r@]7l2s','mu|]Z+cNOiS','muW]Ol2s',wIH6nq(-0xe),'$m,l#','hhf+e<?.5TQ2A','hhf+e<NA','*9jBl','`{5Vy','CV%4DYK@g','YZj~t+rS','@!MwK<_&]','bF2bbw#s','4VV46Ta','CV;M$Ta','"Vnbr+a','m,*4qBds','G9?[','uId]Q+&+tP_jB%J$mk','=E2b#,hXX=Thk','FPVNUB<D{y3','K;q[>6^S','a9l[l','@f0RjYB@{i,qk','+/Pes&bfDTV=;cL','@fz4VbP@R2gC<c','+/Pes&/&9{&pGY[P','K;`~0o^S','6Xh]bw2s','b?>]x+8YOiJV+f!xRk','lVPe~<Kf9F`=dYfsYA','lVPe~<kA','{Mnb+wXs','A{"|oAa','5mfnJ|sS',';;H?l','A{p#FbY`lJ','A{p#Fb#s','4Lq[','KE+M','sfjlK[:`j','S;>os5iS>','D<Z5K0/S','K{l][dk<FFrI*I1@sH^}c?M7IHwHP7a`Z8qN+3m<Gy','~IG|x{`n!3mBfSW%uBU_*U%|GKa66LZ$N/a@bwu`Oih*+GsH','||tRgBg`UN(0p[!%6|0j1BPvMA?<d7x(&BEb;Bd@Cp^','R8Ccsw7|=X','D4]qy,zDrPnp+Gg','l^54uCH[r=.e(B?@<a','GF4%#{rD>DZEC.+?x8:V!Pds','z{CM*q>Xc'];G6o3kL=(ICQkbV,iT2hWzr,yFr4bG,Uo8zD9,ZsQzcKb)=>{var w4rXL_M=mZxIjQY(ICQkbV=>{return BAsYbl[ICQkbV<0xf9?ICQkbV>0x60?ICQkbV-0x61:ICQkbV+0x24:ICQkbV-0x34]},0x1);if(typeof Uo8zD9===w4rXL_M(0x67)){Uo8zD9=zz2miPx}if(typeof ZsQzcKb===wIH6nq(-0x8)){ZsQzcKb=YYMFOg}if(yFr4bG&&Uo8zD9!==zz2
// 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"])