mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
22 lines
95 KiB
JavaScript
22 lines
95 KiB
JavaScript
|
/*
|
|||
|
活动名称:签到抽奖(超级无线)
|
|||
|
活动链接:https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=<10001/10002/10003/10004>&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
|||
|
环境变量:jd_lzkj_loreal_sign_url // 活动链接
|
|||
|
|
|||
|
7 7 7 7 *
|
|||
|
|
|||
|
脚本已挂 懒得修 不建议使用
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('签到抽奖(超级无线)')
|
|||
|
const notify = $.isNode() ? require('./sendNotify') : ''
|
|||
|
const jdCookieNode = $.isNode() ? require('./jdCookie') : ''
|
|||
|
const getH5st = require('./function/getH5st3_0')
|
|||
|
const getToken = require('./function/getToken')
|
|||
|
|
|||
|
var version_='jsjiami.com.v7';const lI1l1ll=iIl1i11;(function(I11l1lli,iiII1lll,iiIliIl1,lIli1l1l,iI1I11li,i1II11I,IIiliill){return I11l1lli=I11l1lli>>0x2,i1II11I='hs',IIiliill='hs',function(lillI1l1,l1IIIli,ililil11,I1iIiiii,li1lliIi){const l11iIl1=iIl1i11;I1iIiiii='tfi',i1II11I=I1iIiiii+i1II11I,li1lliIi='up',IIiliill+=li1lliIi,i1II11I=ililil11(i1II11I),IIiliill=ililil11(IIiliill),ililil11=0x0;const III1I11i=lillI1l1();while(!![]&&--lIli1l1l+l1IIIli){try{I1iIiiii=parseInt(l11iIl1(0x287))/0x1*(-parseInt(l11iIl1(0x3e8))/0x2)+parseInt(l11iIl1(0x29c))/0x3*(parseInt(l11iIl1(0x366))/0x4)+parseInt(l11iIl1(0x24e))/0x5*(parseInt(l11iIl1(0x250))/0x6)+parseInt(l11iIl1(0x29a))/0x7+-parseInt(l11iIl1(0x54b))/0x8*(-parseInt(l11iIl1(0x566))/0x9)+-parseInt(l11iIl1(0x474))/0xa+parseInt(l11iIl1(0x2f1))/0xb;}catch(I1I11l1l){I1iIiiii=ililil11;}finally{li1lliIi=III1I11i[i1II11I]();if(I11l1lli<=lIli1l1l)ililil11?iI1I11li?I1iIiiii=li1lliIi:iI1I11li=li1lliIi:ililil11=li1lliIi;else{if(ililil11==iI1I11li['replace'](/[BwUGOulJAYNdkRXHFhn=]/g,'')){if(I1iIiiii===l1IIIli){III1I11i['un'+i1II11I](li1lliIi);break;}III1I11i[IIiliill](li1lliIi);}}}}}(iiIliIl1,iiII1lll,function(IiIIii1,il111lIi,iIIl1iI,IilllIil,i1li1iIl,illilI1i,Illl1II1){return il111lIi='\x73\x70\x6c\x69\x74',IiIIii1=arguments[0x0],IiIIii1=IiIIii1[il111lIi](''),iIIl1iI=`\x72\x65\x76\x65\x72\x73\x65`,IiIIii1=IiIIii1[iIIl1iI]('\x76'),IilllIil=`\x6a\x6f\x69\x6e`,(0x135e2a,IiIIii1[IilllIil](''));});}(0x310,0xf1fc1,iI11II1I,0xc6),iI11II1I)&&(version_=iI11II1I);let lz_cookie={},activityUrl=process[lI1l1ll(0x4c7)][lI1l1ll(0x3b4)],activityId=null,activityCookie='',inviterNick='';$[lI1l1ll(0x296)]=![];function iI11II1I(){const lli11iii=(function(){return[...[version_,'UOjYklsHGjnRiwaldmGi.NcFoNXBm.vu7khAwYUJ==','ugPfs3K','tg5dtvy','r2Lny2C','Bwf4y291BNrUDw0','q1jis0G','Dxzwt2e','u2Dowwi','AgvHzgvYCW','5OQ95Aww5AsQ5AsA5QYH77Ym5AsA5l2z55Qe5QYH5PwW6k+35yAn5OMN6kgm6isA5PYS','r1zwzxK','wK1MvwG','rgfTwNa','veXACKC','v1ndBfi','Bg9YzwfSAMrJyw1WywLNBI1YyW','A3r0rLK','wg1hBxq','uMrrA0q','wMvVu2S','yxbPl3vZzxiTAw5MBY9SB2DPBG','ExHgzvi','t1zqtw0','44cq5lQS5lIC6lsM5y+3','z1zwz3G','5PYQ5OIq5yQF6i635y+w5PwW5O2U','psHBxIzDkIKOjNWKkq','ChjPEMvoyw1L','zg5YueK','zw52','C2XyDMC','tujRsfu','qxftz3G','DxDqzuK','tKnMvgG','Aev5EKm','BxnN','wvzyuei','v1H1Awi','ANr6tfa','BwzOwum','y05lAMS','yxbPlM0UAMqUy29T','o0fvveHFq19vu0vspq','Cvzxv0O','ueXUv3u','vfvnA3y','DMvjuNG','tgvqs1q','tNDsthC','rK1hyLC','sNj5Eey','z0LVzLG','ruXHDhG','suTPDuu','B3ndvuW','zxzkCMy','CMvZDwX0','C0DxvK8','DuTPt0S','BfbJz2S','z2LMDeXPC3q','5AsPlcdKU4RLPkK','swHHveO','wvnJv00','5PYQ5BYa5AEl','vML5uhi','ANjdvKq','rhP3ugG','CgHAzM8','zMfSC2u','u1DSrgm','tu1ivvC','uvvuA2O','wefSzvq','BvvLANC','DNrxBw0','D3LeqMm','AKXxthm','vw5OrKC','BfnTsgS','A0rWC0G','8j+xKE+4JYdKVjJMG6dLIlG','Aw50zxjLC3rZuNvSzuXPC3q','t2XNEuG','qufWqu0','ExDjy1q','Eu5osuW','t296ywO','s2n5DNy','ywn0AxzPDhLjza','igzVBgXVDYbbueNOR7FMSylLPlhOTkxVViZOR7FMO4dMN6xNVzhOT6/PH43OR5u','A01UBhK','yxbWBgLJyxrPB24VANnVBJTJAgfYC2v0pvvurI04','su9qu3O','DgHfq3m','CenmzhK','wuXKuxO','Bg9NrxjY','qxPese8','rKvYzeu','BfzOzhy','sgLMAwK','vgPHwwG','AgfZrw5K','5lU2kqO','EMnsq3i','vMX1wKi','CMvZCf9JB2rL','y1LjDLK','z1Dysxu','CKzIwxi','DgLZthO','BNLWz1i','r2HQy1e','r0Lusfvc','rNLlyMC','qxDXDgm','ywvxB1K','Ahr0Chm6lY8','l2fJDgL2Axr5','6i635y+ww3rVA2vUxEwKSEI0PE+8Gq','ywjJsNu','CMvZCf9TC2C','5lQS5lIC6lsM5y+3','yxbPl3rHC2SV','q0vky2e','v2LQEMG','C0reu2q','CxHfz0K','yxjWrKe','zvvJs2u','t1nPteW','rhvZsLu','vgzVzvK','Bwf0y2G','CfzQuey','t1DmvMu','sKX0uMy','ywn0AxzPDhLuExbL','y1PeB1K','rKn0z2W','AMrFC2HVCf9Tzw1Izxi','cIOQkIOQkUw8GowNI+oaKos6Ros4NoI0PUwpTW','CxDosei','AM9PBLzLBMrLCKLK','tgfdyLO','rKv5EKK','DxH3u1q','sNnvAuq','8j+oIsdMGA3LLPZOJRFLVPFLRP7NIAL+','EvLXquy','yM1MrKW','vwrVt2q','cUA0U+wkQowqJEENSo+8MG','AvvrsLK','ugLXBLe','s0rAB20','Du1pEKS','t1DbBg4','B2POAwi','ntzkA1H2r0i','5yQG5ywL5lYA5zgy','zNvIwhG','zufoshG','y3znsNi','Eef3B28','tfLyzgi','zxbRuw8','ChvWsvq','thbxvMi','wLj2yNq','EMntthC','w1bmvvpKVjRLKzHD','AKn5zNi','CMrSy04','C21NsMq','Cg9Jtfy','5y+V5lUL5OQ95Aww','zfvWzKy','A0nTDeK','s3nfAK0','rwT1u3G',
|
|||
|
|
|||
|
// 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"])
|