faker3/jd_wdzfd.js

48 lines
79 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/**
微定制瓜分福袋-加密
目前实现
1.指定首位账号即指定PIN变量京东用户名
//export jd_wdz_pin="pin值" (不填写,默认首位账号以 jd_wdz_mixnu 为准)
2.指定从账号几跑到账号几变量(jd_wdz_mixnu代表开始jd_wdz_maxnum代表结束)
//export jd_wdz_mixnum="0" 0代表青龙排位为1的账号
//export jd_wdz_maxnum="90"
如需做任务点亮店铺等请设置以下变量
//export jd_wdzfd_task="true"
PSjd_wdz_maxnum必须大于jd_wdz_mixnum 才能生效 不填写默认运行0-90账号
3.活动进度条剩余 0 自动退出脚本
4.每运行 5 个账号休息 10 秒钟避免493
5.IP被限流自动退出脚本账号是黑号自动跳过
6.首位账号助力作者其他均助力CK1
7.优化大量重复请求
必须条件配置文件或者环境变量中添加变量
## 微定制瓜分福袋-jd_wdzfd.js
//export jd_wdzfd_activityId="活动ID"
//export jd_wdzfd_activityUrl="https://cjhydz-isv.isvjcloud.com"
cron:7 7 7 7 *
============Quantumultx===============
[task_local]
#微定制瓜分福袋-加密
7 7 7 7 * jd_wdzfd.js, tag=微定制瓜分福袋-加密, enabled=true
*/
let jd_wdzfd_activityId="" // 活动ID
let jd_wdzfd_activityUrl="https://cjhydz-isv.isvjcloud.com" // 活动地址
const $ = new Env("微定制瓜分福袋-加密");
var __encode ='jsjiami.com',_a={}, _0xb483=["\x5F\x64\x65\x63\x6F\x64\x65","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x73\x6F\x6A\x73\x6F\x6E\x2E\x63\x6F\x6D\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x6F\x62\x66\x75\x73\x63\x61\x74\x6F\x72\x2E\x68\x74\x6D\x6C"];(function(_0xd642x1){_0xd642x1[_0xb483[0]]= _0xb483[1]})(_a);var __Oxe8455=["\x69\x73\x4E\x6F\x64\x65","\x2E\x2F\x73\x65\x6E\x64\x4E\x6F\x74\x69\x66\x79","","\x2E\x2F\x6A\x64\x43\x6F\x6F\x6B\x69\x65\x2E\x6A\x73","\x61\x63\x74\x69\x76\x69\x74\x79\x45\x6E\x64","\x6A\x64\x5F\x6B\x72\x5F\x77\x64\x7A\x66\x64\x5F\x61\x63\x74\x69\x76\x69\x74\x79\x49\x64","\x67\x65\x74\x64\x61\x74\x61","\x6A\x64\x5F\x6B\x72\x5F\x77\x64\x7A\x66\x64\x5F\x61\x63\x74\x69\x76\x69\x74\x79\x55\x72\x6C","\x66\x61\x6C\x73\x65","\x6A\x64\x5F\x77\x64\x7A\x66\x64\x5F\x74\x61\x73\x6B","\x65\x6E\x76","\x6A\x64\x5F\x77\x64\x7A\x66\x64\x5F\x61\x63\x74\x69\x76\x69\x74\x79\x49\x64","\x6A\x64\x5F\x77\x64\x7A\x66\x64\x5F\x61\x63\x74\x69\x76\x69\x74\x79\x55\x72\x6C","\x6A\x64\x5F\x77\x64\x7A\x66\x64\x5F\x70\x69\x6E","\x6A\x64\x5F\x77\x64\x7A\x66\x64\x5F\x6D\x69\x78\x6E\x75\x6D","\x6A\x64\x5F\x77\x64\x7A\x66\x64\x5F\x6D\x61\x78\x6E\x75\x6D","\x47\x49\x54\x48\x55\x42","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x65\x78\x69\x74","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x6B\x65\x79\x73","\x4A\x44\x5F\x44\x45\x42\x55\x47","\x6C\x6F\x67","\x66\x69\x6C\x74\x65\x72","\x43\x6F\x6F\x6B\x69\x65\x4A\x44","\x43\x6F\x6F\x6B\x69\x65\x4A\x44\x32","\x63\x6F\x6F\x6B\x69\x65","\x6D\x61\x70","\x43\x6F\x6F\x6B\x69\x65\x73\x4A\x44","\x5B\x5D","\x74\x6F\x4F\x62\x6A","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x66\x69\x6E\x64\x49\x6E\x64\x65\x78","\x73\x70\x6C\x69\x63\x65","\x73\x6C\x69\x63\x65","\x0A\u272A\u272A\u672C\u6B21\u5B9E\u9645\u8FD0\u884C","\x6C\x65\x6E\x67\x74\x68","\u4E2A\u4EAC\u4E1C\u8D26\u53F7\u272A\u272A\x0A","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x64\x6F\x6E\x65","\x66\x69\x6E\x61\x6C\x6C\x79","\x20","\x6E\x61\x6D\x65","\x2C\x20\u5931\u8D25\x21\x20\u539F\u56E0\x3A\x20","\x21","\x63\x61\x74\x63\x68","\u6D3B\u52A8\x69\x64\u4E0D\u5B58\u5728","\x6D\x73\x67","\x68\x74\x74\x70\x3A\x2F\x2F\x63\x6F\x64\x65\x2E\x6B\x69\x6E\x67\x72\x61\x6E\x2E\x67\x61\x2F\x77\x64\x7A\x66\x64\x2E\x6A\x73\x6F\x6E","\u265A\u265A\u6D3B\u52A8\u5165\u53E3\u265A\u265A\x0A\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x6A\x68\x79\x64\x7A\x2D\x69\x73\x76\x2E\x69\x73\x76\x6A\x63\x6C\x6F\x75\x64\x2E\x63\x6F\x6D\x2F\x6D\x69\x63\x72\x6F\x44\x7A\x2F\x69\x6E\x76\x69\x74\x65\x2F\x6F\x70\x65\x6E\x4C\x75\x63\x6B\x42\x61\x67\x2F\x77\x78\x2F\x76\x69\x65\x77\x2F\x69\x6E\x64\x65\x78\x2F\x38\x38\x38\x32\x37\x36\x31\x3F\x61\x63\x74\x69\x76\x69\x74\x79\x49\x64\x3D","\x0A\u273F\u273F\u5F53\u524D\u6307\u5B9A\u9996\u4F4D\u8D26\u53F7\u273F\u273F\x20\uFF1A","\x0A\u2764\u2764\u5F53\u524D\u6307\u5B9A\u4ECE\u8D26\u53F7","\u8FD0\u884C\u81F3\u8D26\u53F7","\u505C\u6B62\u2764\u2764","\u3010\u63D0\u793A\u3011\u8BF7\u5148\u83B7\u53D6\u4EAC\u4E1C\u8D26\u53F7\u4E00\x63\x6F\x6F\x6B\x69\x65\x0A\u76F4\u63A5\u4F7F\u7528\x4E\x6F\x62\x79\x44\x61\u7684\u4EAC\u4E1C\u7B7E\u5230\u83B7\u53D6","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x62\x65\x61\x6E\x2E\x6D\x2E\x6A\x64\x2E\x63\x6F\x6D\x2F","\x55\x73\x65\x72\x4E\x61\x6D\x65","\x6D\x61\x74\x63\x68","\x69\x6E\x64\x65\x78","\x69\x73\x4C\x6F\x67\x69\x6E","\x6E\x69\x63\x6B\x4E\x61\x6D\x65","\x0A\u5F00\u59CB\u3010\u4EAC\u4E1C\u8D26\u53F7","\u3011","\x0A","\u3010\u63D0\u793A\u3011\x63\x6F\x6F\x6B\x69\x65\u5DF2\u5931\u6548","\u4EAC\u4E1C\u8D26\u53F7","\x0A\u8BF7\u91CD\u65B0\u767B\u5F55\u83B7\u53D6\x0A\x68\x74\x74\x70\x73\x3A\x2F\x2F\x62\x65\x61\x6E\x2E\x6D\x2E\x6A\x64\x2E\x63\x6F\x6D\x2F","\x63\x6F\x6F\x6B\x69\x65\u5DF2\u5931\u6548\x20\x2D\x20","\x0A\u8BF7\u91CD\u65B0\u767B\u5F55\u83B7\u53D6\x63\x6F\x6F\x6B\x69\x65","\x73\x65\x6E\x64\x4E\x6F\x74\x69\x66\x79","\x77\x61\x69\x74","\x72\x65\x73\x69\x64\x75\x61\x6C\x50\x65\x72\x63\x65\x6E\x74\x61\x67\x65\x45\x6E\x64","\x6F\x75\x74\x46\x6C\x61\x67","\x73\x69\x64","\x75\x73\x65\x72\x49\x64","\x54\x6F\x6B\x65\x6E","\x50\x69\x6E","\x68\x69\x73\x50\x69\x6E","\x63\x61\x72\x64","\u6B64\x69\x70
// 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"])