mirror of
https://github.com/shufflewzc/faker3.git
synced 2025-01-10 16:29:13 +08:00
22 lines
86 KiB
JavaScript
22 lines
86 KiB
JavaScript
|
/*
|
|||
|
活动名称:积分抽奖 · 京耕
|
|||
|
活动链接:https://jinggeng-isv.isvjcloud.com/ql/front/showDrawOne?id=<活动id>&user_id=<店铺id>
|
|||
|
环境变量:jd_jinggeng_drawOne_url // 活动链接
|
|||
|
jd_jinggeng_drawOne_opencard // 是否入会(true/false),默认不入会
|
|||
|
jd_jinggeng_drawOne_Notify // 是否通知(true/false),默认不通知
|
|||
|
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#积分抽奖 · 京耕
|
|||
|
1 1 1 1 * jd_jinggeng_drawOne.js, tag=积分抽奖 · 京耕, enabled=true
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('积分抽奖(京耕)')
|
|||
|
function tqbXBPM(){}var I4CvjqH=Object['defineProperty'],oXc6uF,n8rqBK,N2uPmAl,WRLX1y,zxrvdOk,nr_xu2B,i3DElbs,XBzN2z,RrRB0E,GtBNKGq,b9nU9ul,wxOJ3t1,Usi7YYj,LnMXXB,a_i2aJ,CFRLry,RdnFK4,JRr5uA,CzK3DP,d_6o9gQ,KYQsiYK,XquP5kA,HAub1R3,Zr3_lWC,OL4w_X,KtikdMS,qlQrZf;function BZUjNc4(tqbXBPM){return oXc6uF[tqbXBPM<0xef?tqbXBPM>0xef?tqbXBPM+0x44:tqbXBPM>0x1c?tqbXBPM>0x1c?tqbXBPM-0x1d:tqbXBPM+0x57:tqbXBPM+0x5d:tqbXBPM-0x4b]}oXc6uF=aDUJF7();function sJBbvn1(tqbXBPM,I4CvjqH){return n8rqBK.call(BZUjNc4(0x5b),tqbXBPM,'length',{value:I4CvjqH,configurable:!0x0})}tqbXBPM(n8rqBK=Object.defineProperty,N2uPmAl=sJBbvn1(td5UMS((...I4CvjqH)=>{var n8rqBK=td5UMS(I4CvjqH=>{return oXc6uF[I4CvjqH>-0x38?I4CvjqH<0x9b?I4CvjqH>0x9b?I4CvjqH-0x42:I4CvjqH+0x37:I4CvjqH+0x27:I4CvjqH+0x37]},0x1);tqbXBPM(I4CvjqH.length=n8rqBK(-0x26),I4CvjqH[0xee]=I4CvjqH[0x1]);return I4CvjqH[0xee](I4CvjqH[BZUjNc4(0x2d)]())}),0x2)(G9ZVdx3,qrh11N3));var RBYqgY=[],IHjU0ei=[on8Tk4H(0x0),on8Tk4H(BZUjNc4(0x2f)),on8Tk4H(0x2),on8Tk4H(BZUjNc4(0x29)),on8Tk4H(BZUjNc4(0x2a)),on8Tk4H(BZUjNc4(0x28)),on8Tk4H(BZUjNc4(0x7f)),on8Tk4H(0x7),on8Tk4H(0x8),on8Tk4H(BZUjNc4(0x3a)),on8Tk4H(BZUjNc4(0x3e)),on8Tk4H(0xb),on8Tk4H(BZUjNc4(0x33)),on8Tk4H(0xd),'.|_@X&qv',on8Tk4H(0xe),on8Tk4H(0xf),'a|GK/',on8Tk4H(0x10),on8Tk4H(BZUjNc4(0x52)),on8Tk4H(BZUjNc4(0x32)),on8Tk4H(0x13),on8Tk4H(0x14),'#|Z}quorj%G..aLxfB#g:mrvV5=|=a0zDKR%Ppkx8$Cy~',on8Tk4H(0x15),'#|Z}quorj%G.Y','\u0023\u007c\u005a\u007d\u0071\u0075\u0024\u007e',on8Tk4H(0x16),on8Tk4H(0x17),on8Tk4H(0x18),on8Tk4H(0x19),on8Tk4H(BZUjNc4(0x38)),on8Tk4H(0x1b),on8Tk4H(0x1c),on8Tk4H(0x1d),on8Tk4H(BZUjNc4(0x56)),on8Tk4H(0x1f),on8Tk4H(0x20),'\x3f\x2c\x58\x7b\x66\x7c\x71\x6f\x30\x21\x7a',on8Tk4H(0x21),on8Tk4H(0x22),on8Tk4H(BZUjNc4(0x58)),on8Tk4H(0x24),on8Tk4H(0x25),on8Tk4H(0x26),on8Tk4H(BZUjNc4(0x59)),'*O|!)(,:xk%1}D$sv~',on8Tk4H(0x28),on8Tk4H(BZUjNc4(0x5a)),on8Tk4H(BZUjNc4(0x78)),on8Tk4H(0x2b),'\x5a\x76\x5d\x42\x23\x4d\x7c\x55\x54\x38\x4f\x73\x61\x23\x33\x6a\x42\x50\x79\x55\x54\x60\x58\x61\x2f\x22\x4b\x36\x2b\x72\x4d\x57\x3a\x4b\x45\x37\x2f',on8Tk4H(0x2c),on8Tk4H(0x2d),'\u0042\u0047\u0044\u0041\u004a\u0028\u0036\u0069\u007a\u006b\u0068\u004d\u0026\u0022\u0078\u0025\u0040\u003c\u0026\u002b\u006b\u0053\u004e\u0066\u004b\u006d\u007c\u0026\u006d\u007c\u0075\u006a\u0064\u0069\u005e\u005d\u0073\u0076\u0072\u0068\u0047\u0033\u004d\u004d\u006f\u0035\u004e\u0073\u0042\u003a\u0067\u002b\u0063\u0028\u0039\u007d\u0043\u006b\u0064\u0024\u004a\u0026\u007b\u0025\u003e\u006a\u003a\u003a',on8Tk4H(0x2e),on8Tk4H(0x2f),on8Tk4H(BZUjNc4(0x4e)),'*4.K/am=gP1|~',on8Tk4H(0x31),'y1|Kp@bv',on8Tk4H(BZUjNc4(0x55)),on8Tk4H(0x33),on8Tk4H(BZUjNc4(0x5e)),on8Tk4H(BZUjNc4(0x3f)),on8Tk4H(0x36),on8Tk4H(0x37),on8Tk4H(BZUjNc4(0x60)),on8Tk4H(0x39),on8Tk4H(0x3a),';jQB/KhUU8m&m|0Xed}laD~',on8Tk4H(0x3b),on8Tk4H(BZUjNc4(0x2b)),on8Tk4H(0x3d),on8Tk4H(0x3e),on8Tk4H(0x3f),on8Tk4H(BZUjNc4(0x1e)),on8Tk4H(BZUjNc4(0x62)),on8Tk4H(0x42),on8Tk4H(BZUjNc4(0x96)),on8Tk4H(0x44),on8Tk4H(0x45),on8Tk4H(BZUjNc4(0x40)),on8Tk4H(0x47),on8Tk4H(0x48),on8Tk4H(0x49),on8Tk4H(BZUjNc4(0x63)),on8Tk4H(0x4b),on8Tk4H(BZUjNc4(0x64)),on8Tk4H(0x4d),on8Tk4H(BZUjNc4(0x1d)),'\u0050\u007c\u0071\u0037\u0022\u006a\u0062\u0076',on8Tk4H(BZUjNc4(0x65)),on8Tk4H(0x50),on8Tk4H(BZUjNc4(0x69)),on8Tk4H(0x52),on8Tk4H(0x53),on8Tk4H(BZUjNc4(0x6a)),on8Tk4H(0x55),on8Tk4H(0x56),on8Tk4H(0x57),on8Tk4H(0x58),on8Tk4H(0x59),on8Tk4H(0x5a),on8Tk4H(0x52),on8Tk4H(0x51),on8Tk4H(BZUjNc4(0x49)),on8Tk4H(BZUjNc4(0x27)),on8Tk4H(BZUjNc4(0x24)),on8Tk4H(BZUjNc4(0x66)),on8Tk4H(0x4e),on8Tk4H(0x5d),on8Tk4H(BZUjNc4(0x6b)),on8Tk4H(BZUjNc4(0x5d)),on8Tk4H(BZUjNc4(0x6c)),on8Tk4H(BZUjNc4(0x21)),on8Tk4H(0x62),on8Tk4H(BZUjNc4(0x71)),on8Tk4H(BZUjNc4(0x1d)),on8Tk4H(0x5d),on8Tk4H(0x64),on8Tk4H(0x65),on8Tk4H(BZUjNc4(0x74)),on8Tk4H(0x67),on8Tk4H(BZUjNc4(0x77)),on8Tk4H(BZUjNc4(0x1e)),on8Tk4H(BZUjNc4(0x1f)),on8Tk4H(BZUjNc4(0xe1)),'\u003e\u007c\u0021\u0035\u0070\u002b\u0031\u005a\u0032\u0028\u0042\u0036\u003a',on8Tk4H(0x6b),on8Tk4H(0x6c),on8Tk4H(0x6d),on8Tk4H(0x6e),on8Tk4H(BZUjNc4(0x45)),'\u002c\u0054\u0075\u007e\u0039\u0035\u003b\u003d\u007c\u0021\u0069\u0033\u0075\u0041\u0023\u0072\u0030\u0062\u00
|
|||
|
|
|||
|
// 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"])
|