faker3/jd_phone_818.js

15 lines
80 KiB
JavaScript
Raw Normal View History

2024-08-12 10:49:03 +08:00
/*
活动名称818手机节
环境变量jd_phone_818_interval // 自定义运行间隔时长整数单位毫秒默认1000
jd_phone_818_notify // 是否推送通知true/false默认不推送
jd_phone_818_pinFilter // 账号pin过滤多个用@进行分割
cron:1 1 1 1 *
*/
2024-08-12 16:40:48 +08:00
const $ = new Env('8.9-8.18 818手机节')
function ukhkX8(){}var fdyqG3=Object['defineProperty'],HQbLOuh,jF9OW8e,xKt_i41,iIu7mL,hzvYPfZ,Vj9O3w,Qc12tU,ofvC3k,aJcyybj,RWsbbYv,C6KFj8,tfMhDCP,KEU6Zj,CjPJ0wg,D_7djqz,V3r3Vm,CKIQFO,MDPcq89;function UBI3XPS(ukhkX8){return HQbLOuh[ukhkX8<0x63?ukhkX8+0x4c:ukhkX8+0x52]}HQbLOuh=vRYH_6.call(this);function WL9TbH(ukhkX8,fdyqG3){var xKt_i41=bNFJVMr(ukhkX8=>{return HQbLOuh[ukhkX8>0xc1?ukhkX8-0x16:ukhkX8<0xc1?ukhkX8-0x12:ukhkX8-0x45]},0x1);return jF9OW8e(ukhkX8,xKt_i41(0x21),{value:fdyqG3,configurable:!0x0})}jF9OW8e=Object.defineProperty;var hXJvpbq=[],txHlsv=['$Qa,dD54A','^TIZe&(L','C:75Xd?L','"Vq$:tnr','##p5VFJ','U3k*M','1z[4fa/S','nzfZ','M&^l++>9KG,_St','Se@Bj','QMl{:>=S','iQX$SWfS','iQX$m,cC%9A?j','h&gLj*vS','4M|V','AD:"p',')LKit','G$6,cB7T','*3ws','dqlCJX[BA','a&Jt|rEjf','WGy=*@Q[Q','dqlCJX[BYm7~9TE+p3}=J`6Cf[','/*DPq','dqlCJX[BYm7~9TE+wx}=T4^T','dqlCJX3T','5$lCFNDH','r3Wi$%_T','Oy.=5','dqlCJX[BYm7~9TE+/7enL%`!Yh2','5ML=~Bu','_$hc"','HP`i','37Ki=WMT',UBI3XPS(-0x48),'TPg=5','*Te2:gy]b"G/O:WB2{?]bf`O5,=_N3gr$=kv5','2@!ia','w2DshB0;7C','>7enn)J.E#','9?17$Bc>xh','lxas2=(jD[','w2DshB0;7C^','p3y=$%2y76z','.59U~%?VnS>','E3DY8YLHN?U','5$up{N/jT','}GXnRW_qmCY?!PQw','hW9Yt;[1:$','7xeng%!T','n7DsRWu','TPg=5','#$}=_Ww[ZmU(H',UBI3XPS(-0x4b),')L@,wXu','lxnv+`MT','37[=6YH1Q','tx[=5','|7Si','gP!iozJ..h',UBI3XPS(-0x4c),'2.s9DX_zN3KwtDrKV<eq,G{1S7^>%yQB/?PxeE`OKcA8I#+(h!<)x','lxCi','TPg=5','gP!ioz"T','+x5nt','5$OCj26T','oxO=o|3T','"i9u:N|B','$$1s','3S])u.VB','8LZso`QBxe1p+:WdaxL','qxmi2)0B','G$6,cB7T','5$OCj2+.1[?({B:r*7dvy,RR$D','k_ER+Pqq3]','c"gR7K@J+m(<O*{#s3|uN)qq"j','0"EiI5Xmv;M<U','!e<+#&7$`;snU','["~C&t=qY','<f&Z;_u',UBI3XPS(-0x4c),'R^[=/,#T','#$@,_cRSp?*v7p7JsH','*2lC9%dT','G$6,cB7T','0f68B$uB','li"A,"k','HP1s','3_i|mr=l','{ydv,B6T','G$6,cB7T','p3}C1)RR76','p3}C1)#T','371s','6}S$b=(xl+62YJ.B4D88kg}s}Vf8@mEKf!O^EWp]g','lxCi','#$}=y,H1dSkPw4;3*3Ds','5$OCj26T','oxO=o|3T','$=kvFydT','$$1s',UBI3XPS(-0x4b),'#$Ds5c)(dSnX7ptJ!H','5x4iRW)`A','lxCi','371s','%>9w:g4wS7Rn1Ah','5$OCj2+.1[?({B:r*7dvy,RR$D',UBI3XPS(-0x4b),'#$[=j*u','>7enn)J.*?1Y7Z13ra}C+cQ5$1z{XP','gP!ia','gP!iozJ..h','Z^Ds7','lxCi','371s','tBb9@T:pqkP1YXrBq!56frkU}vf]4/x}z#;cx','#$@,p)^Rgeh>+4$r','nG(1TM/T','CP^,i}L5qhm(H','nG(1r|j!Ym*XH','CP^,i}nT','CP^,i}h1WS/','n7g=J`u','n7g=J`u',UBI3XPS(-0x4a),'UL3qe6<a*','sPL==WKT','Zalm(','{)YA','n7g=J`u',UBI3XPS(-0x45),'d2dvs}NT','ULxA','UL3qe6<a*',UBI3XPS(-0x4a),UBI3XPS(-0x49),'8pRIf','8pn?S@&%T','?)iwj+cY(%q','pp9:ZwE','2ihAM','O(T,RoAOZfZxYQ','])tjWgN;`bH','CP^,i}/T',':X/?','xxRv+;&#/?!e3$.d','txlCp@dSA',UBI3XPS(-0x4a),'UnV/E`k(Q','d2dvs}NT','ULxA',UBI3XPS(-0x49),'tx[=5',UBI3XPS(-0x44),'5ML=OV6T','p3Rv0I*lA','#$@,p)KT','@yBRz,_T','7x5n:Bu',UBI3XPS(-0x4c),'}nI1g}w[1[0(H','XQ#czzvy@I4#`','xxo1{N9T','znCi',UBI3XPS(-0x47),UBI3XPS(-0x46),'K2yCU)KT',UBI3XPS(-0x41),'Mi_v9BIj]eC0&WZ','xxjv>,n!=D^(H',UBI3XPS(-0x48),'K2y=z,)(H?^','6WY,"',UBI3XPS(-0x48),UBI3XPS(-0x47),UBI3XPS(-0x46),'g%0vZ','znCi','K2y=z,)(H?^',UBI3XPS(-0x45),'n7DsRWu',UBI3XPS(-0x48),UBI3XPS(-0x43),UBI3XPS(-0x44),'v^$YBBZ1dSy',UBI3XPS(-0x48),UBI3XPS(-0x43),'[$Kig}H["e"4sf','wh=AZ','xxjv>,u',UBI3XPS(-0x48),'K2y=z,!T','L#0s',UBI3XPS(-0x42),'SiXnvWu','~y5n+Wu','}nI1g}]T','(7!+5','}nI1g}eZp#e(H','~y5n+WCT','UWl=5','~y5n+W{(w[0{H','a^4ip@u','d7^,Rc(T','TPg=5','~y5n+Wc`qm>(H','wx}=9Bu',UBI3XPS(-0x48),UBI3XPS(-0x47),UBI3XPS(-0x46),'xxo1{N9T',UBI3XPS(-0x40),'w2DshB0;7CR>,P','R^kv&X7o:1"4#f','UiP,1)&`3m)?H','QxaQD','s|GXZ','Xx`H','9v4Wk','1nSsW','xxjv>,u','fw@X`~vZo*M${',')IgMk',UBI3XPS(-0x44),'.6=/Qb{.gug8M"','~u5Xo',UBI3XPS(-0x42),'onL4!','xxo1{N9T','5>=/','Z6<MIp}O','[$yC"Wl[Q','laoMP','9i_vP~/T','H#m/oG~Ha(','I2(X$G5;`.','Mb+0R]xxci','Dqhv%C:]Wr','y9[,Rc#T','p3Ci','5%!iGv[G.hJm7p0lMb%79','d|yI,spsH','9i_vP~?.o>DeX^!N#$L','XU#Ywe<NJA%zAO%)yJfF;C@}_et;Nz@.Tx(XN,C{nF?',';]Si=WI!bQ>`#0q','QM`iZ%XQxem{FOG]#eHc&v>jgeB?ztqd*3GY2k{!JUXFW7n3N2)t"zm%~i','#>YVQGtO','w2DshB0;7CR>=ttJ{wVYtOzy76{zNp:rpqnWRcoT',':x#C+m2oH','w2DshB0;7CR>=ttJ{wVYtOzy76{zNp:rpqnWRc4jT','yv5F3CS{','#$Sia','pw{a@~(T','>vbIeRlD','57Ds7','7x2n0%QBA','lqXn}4>AA','%#FWL@0z9',UBI3XPS(-0x41),'vWQICpHhH','8c<MIpoF=d$~!4jt','P62I
2024-08-12 10:49:03 +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"])