2024-11-12 11:17:55 +08:00
|
|
|
|
/*
|
|
|
|
|
活动名称:京东直播互动抽奖
|
|
|
|
|
活动链接:https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=<直播间id>
|
2025-01-17 09:38:12 +08:00
|
|
|
|
环境变量:jd_liveLottery_ids // 直播间id,多个用英文逗号,@,换行分割
|
|
|
|
|
jd_liveLottery_threads // 控制并发线程数(正整数),默认1,最大10
|
2024-11-12 11:17:55 +08:00
|
|
|
|
jd_liveLottery_interval // 自定义运行间隔时长(整数,单位毫秒),默认500
|
|
|
|
|
jd_liveLottery_notify // 是否推送通知(true/false),默认不推送
|
|
|
|
|
jd_liveLottery_pinFilter // 账号pin过滤,多个用@进行分割
|
2025-01-17 09:38:12 +08:00
|
|
|
|
jd_liveLottery_rewardnum // 京豆低于值不跑,默认1
|
2024-11-12 11:17:55 +08:00
|
|
|
|
|
|
|
|
|
高并发脚本,谨慎使用并发
|
|
|
|
|
活动限制IP严重,建议使用代理
|
|
|
|
|
黑号会持续擦肩,同一直播间活动请勿连续抽奖,以直播间悬浮标识为准
|
|
|
|
|
|
2025-01-17 09:38:12 +08:00
|
|
|
|
修正403错误
|
2024-11-12 11:17:55 +08:00
|
|
|
|
|
2025-01-17 09:38:12 +08:00
|
|
|
|
cron:1 1 1 1 *
|
2024-11-12 11:17:55 +08:00
|
|
|
|
|
2025-01-17 09:38:12 +08:00
|
|
|
|
*/
|
2024-11-12 11:17:55 +08:00
|
|
|
|
|
2025-01-17 09:38:12 +08:00
|
|
|
|
const $ = new Env('京东直播互动抽奖')
|
|
|
|
|
function pa6k5_E(){}var PdtOF86=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],i_mJkn,Zeu15n,XZu7w3c,XHrx38,akCH8v4,fvao4R,naAlW4S,iRascf,k6YlSa,dmwTM5I,xDjjvYJ,eDrWyjt,wUBCfX,JctI4fR,xXYVqj,UuddD_,vkDO42,BvjHMU,B20NuJn,awGKcS;function THN11lZ(pa6k5_E){return i_mJkn[pa6k5_E<-0x50?pa6k5_E+0x1a:pa6k5_E>0x10?pa6k5_E-0x16:pa6k5_E<-0x50?pa6k5_E+0x35:pa6k5_E<-0x50?pa6k5_E-0x5b:pa6k5_E+0x4f]}pa6k5_E(i_mJkn=r30uF8(),Zeu15n=YTMjlf((pa6k5_E,PdtOF86)=>{return PdtOF86(pa6k5_E())},0x2)(RtL7p1N,K0de1I));var X9TJSM=[],sSjlJ5=['\u0079\u0057\u004c\u006c\u006d\u006f\u002c\u0043',mhbqWKJ(0x0),mhbqWKJ(THN11lZ(-0x36)),'\u004b\u0055\u005d\u006b','\u0048\u0079\u0042\u0058\u003d\u0056\u002a\u0060\u0055\u002c\u006f\u003b\u0033\u0036\u004a\u0055\u007d\u0074\u0037\u0044\u005b\u0064\u0045','\x6c\x7b\x35\x29\x61\x64\x45',mhbqWKJ(THN11lZ(-0x31)),mhbqWKJ(THN11lZ(-0x2f)),'UAsD):{n','\u0048\u0079\u0042\u0058\u003d\u0056\u002a\u0060\u0055\u002c\u006f\u003b\u0033\u0036\u004a\u0055\u007d\u0074\u004a\u006b\u003c\u0067\u0059\u0039\u0043\u0053\u007e','\u0048\u0079\u0042\u0058\u003d\u0056\u002a\u0060\u0055\u002c\u006f\u003b\u0033\u0036\u004a\u0055\u007d\u0074\u0022\u0051\u0067\u0064\u0077\u003d\u006a\u007c\u0048\u0053\u0046',mhbqWKJ(0x4),'\u0048\u0079\u0042\u0058\u003d\u0056\u002a\u0060\u0055\u002c\u006f\u003b\u0033\u0036\u004a\u0055\u007d\u0074\u0071\u0059\u0067\u0064\u003f\u0075\u002b\u0072','\x48\x79\x42\x58\x3d\x56\x2a\x60\x55\x2c\x6f\x3b\x33\x36\x4a\x55\x7d\x74\x75\x56\x67\x64\x3f\x75\x2b\x72','G1I)l','\x48\x79\x42\x58\x3d\x56\x2a\x60\x55\x2c\x6f\x3b\x33\x36\x4a\x55\x7d\x74\x33\x29\x4e\x59\x40\x32\x76\x71\x53\x32\x6e\x76',mhbqWKJ(THN11lZ(-0x30)),'\x48\x79\x42\x58\x3d\x56\x2a\x60\x55\x2c\x6f\x3b\x33\x36\x4a\x55\x7d\x74\x2c\x29\x2a\x23\x68\x58\x28\x26\x32','\u005e\u0034\u005a\u006d\u004d',mhbqWKJ(THN11lZ(-0x3b)),THN11lZ(-0x4f),'Kn|~@$1<iM7xG@:d~*T<ivgGlY)^3U$.4)(+l',mhbqWKJ(THN11lZ(-0x34)),'\x41\x77\x7c\x51\x24\x56\x22\x6e','\u0051\u0041\u0072\u006b\u0060\u003a\u0045',THN11lZ(-0x4f),mhbqWKJ(THN11lZ(-0x39)),'\u004d\u0043\u003d\u006b\u0041',mhbqWKJ(0x9),mhbqWKJ(0xa),mhbqWKJ(0xb),'\x25\x77\x71\x29\x6c','\x37\x34\x4a\x59\x6d\x64\x41\x6e',mhbqWKJ(0xc),'\x7e\x49\x6b\x5b\x72\x3b\x5e\x77\x75\x63\x62\x24\x21\x59\x42\x51\x6a\x23\x21\x33\x63\x50\x66\x70\x29\x56\x31\x21\x56\x31\x5d\x64\x3e\x77\x30\x7c\x78\x6e\x55\x62\x49\x3a\x24\x24\x32\x53\x66\x78\x7e\x34\x5f\x33\x73\x3b\x71\x68\x52\x63\x3e\x5a\x72\x21\x60\x51\x25\x64\x34\x34','\x70\x41\x26\x44','\x24\x68\x22\x44\x75\x4e\x4c\x49\x49\x5a','BwXD','\u007e\u0049\u006b\u005b\u0072\u003b\u005e\u004e\u0033\u0055\u0073\u005d\u0025\u0072\u002e\u0073\u003e\u0062\u007c\u0079\u0059\u0037\u002a\u002f\u0026\u0041\u0043\u002c\u0056\u0031\u0039\u0064\u0078\u0054\u0068\u0077\u007c\u0050\u0067\u0047\u0073\u006d\u003f\u0065\u0057\u0030\u005f\u0032\u005a\u0022\u0062\u0052\u0077','\x7e\x53\x54\x69','\x39\x78\x4d\x77\x66',mhbqWKJ(0xd),'QSfER','\x30\x34\x7c\x51\x55\x6f\x57\x22\x51\x26\x38\x25\x4f\x25\x39\x5d\x52\x4a\x35','\x77\x4a\x2f\x24\x36\x3a\x2f\x6c\x36\x69\x44\x47\x22\x76\x31\x6c\x3d\x3d\x3b\x71\x2c\x79\x2e\x41\x47\x38\x58\x3c\x3f\x7b\x4a\x28\x47\x57\x43\x72\x33\x6d\x67\x23\x48\x34\x56\x6d\x73',mhbqWKJ(THN11lZ(-0x35)),'\x67\x5b\x47\x76',mhbqWKJ(THN11lZ(-0x3d)),'\x47\x6f\x77\x46',mhbqWKJ(0x10),'\x32\x7a\x7d\x4e\x49\x2f\x70','AwMYyVJn','\x7e\x45\x2f\x30\x3d\x33\x66\x42\x42\x48','\u0030\u0034\u006f\u0059\u005e\u006d\u0060\u0026\u007d\u0054\u004b\u002b\u0041\u007d\u0041\u004c\u006b\u0046',mhbqWKJ(0x11),mhbqWKJ(0x12),'\u0063\u0064\u0067\u0032\u005e\u0059\u004c\u0022\u0038',mhbqWKJ(0x13),'\x7b\x41\x47\x29\x4f\x31\x30\x6e',mhbqWKJ(0x14),mhbqWKJ(THN11lZ(-0x2e)),'\x6f\x69\x61\x77\x66\x7b\x5b\x3e\x77\x25','\x76\x53\x5e\x4c\x4e\x21\x73\x60\x58\x38',THN11lZ(-0x4c),'\u007d\u0055\u0060\u0077\u005f\u004c\u0038\u0039','\x7c\x3e\x35\x37\x25\x48\x2a\x2a\x26\x7d',THN11lZ(-0x4e),mhbqWKJ(0x16),mhbqWKJ(THN11lZ(-0x2d)),'\x4b\x7e\x42\x58\x5b\x56\x48\x6e','\u0037\u0034\u004a\u0059\u006d\u0064\u0041\u006e',mhbqWKJ(0x18),'UA/k','\u004a\u007a\u0026\u0034\u0069\u0029\u0032\u0077\u0042\u005f\u004a\u007e\u006a\u004c\u0049\u0064\u0023\u0072\u006
|
2024-11-12 11:17:55 +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"])
|