faker3/jd_red1111_task.js

19 lines
89 KiB
JavaScript
Raw Normal View History

2024-10-14 17:05:11 +08:00
/*
活动名称双1111红包日常任务
环境变量jd_1111_url // 活动链接
jd_1111_ids // 分享码,多个用英文逗号,@换行分割一般是链接后面的s=xxx参数5个字符
jd_1111_threads // 控制并发线程数正整数默认1最大5尽量使用默认值否则请开启代理运行
jd_1111_interval // 自定义运行间隔时长整数单位毫秒默认2000
jd_1111_notify // 是否推送通知true/false默认不推送
jd_1111_pinFilter // 账号pin过滤多个用@进行分割
2024-10-15 21:38:38 +08:00
随机
2024-10-14 17:05:11 +08:00
*/
const $ = new Env('双1111红包日常任务')
2024-10-17 03:55:56 +08:00
function fakeree7j9w(){}var faker8a4jah=Object['defineProperty'],faker5cfs3,faker4lgr7,faker1i1vi,fakerikuqj9,fakerrwf63l,faker8uxfz,fakerf2apgh,fakery9oyn4v,fakertbkxd,fakerf38axi,fakertlj38f,fakerbq91i,fakerzzx6m8,fakerm4csoo,fakerc8p0b;function faker15tmsl(fakeree7j9w){return faker5cfs3[fakeree7j9w<-0x2?fakeree7j9w-0x3d:fakeree7j9w<-0x2?fakeree7j9w-0x2e:fakeree7j9w<-0x2?fakeree7j9w+0x28:fakeree7j9w<-0x2?fakeree7j9w-0x2:fakeree7j9w+0x1]}faker5cfs3=fakerci0d7e.call(this);var fakerkosgpf=[],fakericvk2x=['%^y(+/`q','fvATx:Zc','m!_^/','[84j0','WwT^','r,<S8elE+1U&hC','r,<S8elE+1;xEB',':bNPm<y','iCIA','fx&*Y','w0KAPnbg','r,<S8elEM62[017e$8N','r,<S8elE+1:.e1"w^CKA','xW{C,','r,<S8elEM6.R?6i)Si','r,<S8elEM6>R?6i)Si','fx`P:','r,<S8elEM60~?ciT59Gt#','7qV|#','!8kA','LQDa}','Wg.96_x%}#X$f6n<9RQ%}BIf:]P7ew_LqP&*:','9+ZA/','Q"w1vn"*w6','X,H6Dc<gewzm^C','IV~m,cBK?wzm^C','Q"92Tne3Pwzm^C','Eqp@mc@t%6','bXtr)n#q?4Vz^C','0v.8_jZg','80{^Sny','gC_P:','oqMP7nT;aJHdi',faker15tmsl(0x1),'2N+]T=y','pv8*?Ibg','w0;P"uitO','Yv;P:','z0lA','_CZA)!5``V','pvkA','9`^D{=7!ewKTY{LKh(.,]XRtl0@~jxO<$QCv.FIfK|E3Go?dVZ(2v','TvW^OjKSE','TvW^','80_P:','@n6?(*uj3OVxrir:;T[A','pvkA','oq.8w+GZ8l/Y[YOT2"N','PKGnl)GelAFI&0seqqzur=d~Io<Q[fKLIxa^H2(5VR72i','oq;PsWy','*qa^/','LvIA','&X:8|<y','Xq"]|<0g','pvkA','i[h1v^&*v:5~w/5<s,J%!6Hc#jm(_V4[#aZ1VLD|Gh$lL4c@`i',faker15tmsl(-0x1),'a.5NlZgr"a&}[PP+hP_)F/X;uQsOU?','Xq"]|<0g','T9{^V<14YtD+@qGwe9r*GuT4Y.GQmnUq3N"]OsJs~"1bi6Q%1wXu@Pds7lF>2>!pGL]ue|rg','a@{^P|p;x;8di','Xq"]|<0g','a@{^P|p;x;8di','Kx#*]HPZj"SH3~O','/qutHe^ot;8di','{p=Hs&+7n7dA(','/qutHe949"zJi','+>l*','pvkA','r#jlNI9a@7,A.1VEf_GmnbDD#=','0v"]*!i;<o',faker15tmsl(0x0),'/#!b&1_<','WS~l@)DD_!','i#~shOB7{06A(','c#z*:"xDP','(BUa47y',faker15tmsl(-0x1),faker15tmsl(0x0),'oq+]7|Sl>QW*0>05^i','W9pkDjrg','fNMPr8i;2Q:.>C','mx:8I<$d!V2[i','Rxr*]<"g','Xq"]|<0g','>wMkt2SS0"','w0t^','"Mlq}Pdvp?"9u5`<c{33&_M^MhB3+JFKBZf@Fn>%_','pvkA','oqMPx]itrl&CTc4wWw{^',':qfks9?`t;QdR<6LW0r*x]SSq{',faker15tmsl(0x1),'oq{^:|2drl8=0>Y5Zi',':vcASn2IE','i8VZ','*Y>V|9R`w:fCs0k{2vX}W)..Y[','?e#Ov','oq;PsWy','CvZ?7uyk*t}l^g^DqbJu@]^l1$m7+NU)pX=8SnA4~DAha<PVJx`gajFSl$ub?C`Y4}_q#_RWIASnCS#JO~IfC;H!x0FP;/@BQqVKVY8e`gajFSl$Ld_r6Lv}C@"wt0=8P?ue,t:WD2HefeLuteY/@kBmqp"e4NxP*?Vi6A6hy','/qS*sh"g','8XdtLzsZuJW=i',faker15tmsl(0xf),'EClA*|)g','A,JC','vvSOWIO<6o','r,!k','r,Mk','r,T^','&Xa^q<C)&lK','`EOu,<jZE','`EOufu;t!V','mxLu,<]OO','mxLu,<A;#.JR]C','T9{^V<140ks&Tcpr~#ut+ht`*tiz&>16bAMP:f[s}kN2mr95j[/j!&")Gla~{6}7Oj*#X!usyRvR,c#p9+OCm<fhE','/qutHe949"zJi','YTk|([}','Rq5Z',faker15tmsl(-0x1),'pvkA','VkY_Q?cTLhOt=jo','oq+]7|dg8;*ci','_CZA/','/@GtT41/E;w^cf05$0l8*|/Oh;','fNV|?IdS&;cb?6,',faker15tmsl(0x2),'o@KA_K,kyRJ>)Y1p',faker15tmsl(0x3),'?v:8DH.`E','&xYPkmeIiQH',faker15tmsl(-0x1),'kC@]?!@guV',faker15tmsl(0x4),'g:`_r5KTLhOt=jo','&Xdt*n~I>Q#.R<05LvlA',faker15tmsl(0x8),'K9xkH2Kg','qkjr$BXPP0nd+V6',faker15tmsl(0xa),'K9xkH2Kg','ObSO>+i:|!mQac?)',']!KA{$2s~":a?cqL@NIA','>wzuY','fNV|?IdS&;cb?6,','pv"];$2s~"7E0>Ze',faker15tmsl(0x2),'o@KA_K,kyRJ>)Y1p',faker15tmsl(0x3),'?v:8DH.`E','&xYPkmeIiQH','K9xkH2Kg',faker15tmsl(-0x1),'RF~9=6)TXh]dFV"','kC@]?!@guV',faker15tmsl(0x4),faker15tmsl(-0x1),'PBtT@O$*@7Ot=jRI*>B','_CZA)!5``V','/qvPPnN:O',faker15tmsl(0xd),'Zq{^P|og',']DTO',';qxk#np;O',faker15tmsl(0x5),'p8Gt3*jw`V+=i',faker15tmsl(0x6),faker15tmsl(0x7),'80_P*|O:O','fNMPZ','`5xdQ:!iZ$LzA','(DMP7zus<Q[di','T07VX','>wS*1GWpE','/qIAz+#SE','/qvPPnN:O','GxKA','iC8HXnud_.n>mrD','Zq{^P|og',']DTO','j":4!G.jW',faker15tmsl(0x5),'.8}35zJI(lr%_','=$tzS2&fW',faker15tmsl(0x6),faker15tmsl(0x7),'8BuRzDW0W','pv7*]<lsT;','_Qrgh%H','~"ZRr{>9)|^v_','w$ZRVm>9)|^v_','7:@zs','EI~za}1.N','?"2]mr!~N','*@qu<<bg','?v:8Y','Sq{^Z|`aY"','oq{^OjKSE','*@qu<<atrlx','6xr>jrjelA:','TvW^','Vz{2(b`W','gi8ds','r0xP2h$g','Tv;P:','xhltJy3LrJXIpugmXhltJyZTA0QIpugmxhltJyZ','ZdWu','5vSH9&y','.qnd^hyYd{asfsFC#c4','eV?_GN/W3_X|6]u~1hWu','yd]CD','QEMk#n7g!kic$~B;_+gB','8Xdtgb$g','Ie#]vIy','EClA*|)g','8Xdtgb$g','Ie#]vIy','EClA*|)g','vvbOOmvam[Zc5C','0vS*:','oqMP?I2s_.Dc>C',faker15tmsl(-0x1),faker15tmsl(0x2),'&Xdt*n_aE;','iC+]T=y','pvkA','pvkA','!8kA','Vk*e6_j:bPL~hEo','&Xdt*n
2024-10-14 17:05:11 +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"])