faker2/jd_OpenCard_Force.js

23 lines
43 KiB
JavaScript
Raw Normal View History

2024-06-28 07:27:40 +00:00
/*
活动名称强制入会
活动链接https://shopmember.m.jd.com/shopcard/?venderId=<商家ID>
环境变量jd_opencard_force_venderId // 商家ID多个用英文逗号分割
jd_opencard_force_task_threads // 控制店铺并发线程数正整数默认1最大3
jd_opencard_force_account_threads // 控制账号并发线程数正整数默认1最大3
jd_opencard_force_account_interval // 自定义运行间隔时长整数单位毫秒默认0
7 7 7 7 *
*/
const $ = new Env('强制入会')
const jdCookie = require('./jdCookie')
const notify = require('./function/sendJDNotify')
const common = require('./function/jdCommon')
const { H5st } = require('./function/jdCrypto')
var il='jsjiami.com.v7';function i11iiIII(){const iI1Iiii1=(function(){return[...[il,'xAjsjNniBQapnmiKp.KdYcTxoOmNdt.dtRv7PEGR==','WQnGWO0/da','W57dNmo6WRzZ','W6pdHCoa','DYtdKCkaW5DO','jSoiWORdO8oJW6BcRCkwWOFcN0pdNq','CcVdJ8ka','xSoeu8o/W7i','rhfTBua','W4ruva','j8o4nmkpWOG7sa','W5/dPCo6WQnNv8kW','W5ZcI8kpW57dSmk3W7JdSa','cmoQW6hcKJu','W6FcKmkcW5/dIG','W4dcMfVcVJ8','stJdTSkxW4a','5Bsa5PIi5l+H5zcb','W5pdQmolWQ17xSkNk8oBWQv5g8odWRqag8k9W6meWRe2W7ZdTSkeWPiby8oiB8khWQFcUcC','nG0BWR7dOW','W5RdPSo5WOb2','zehcKfVcSa','W7TPymo7nW','5BEM5PUt5l6O5zkp','W5VcPmk3W6XM','W4BdTh4NW4tcSSk7W7D+WQhdTmozWPO7WRpdHG5PW4bjca','W6JdVgFdH8kHlgtcPCkRBLWBW64','W4ZcTSkvW6DvFHncWOib','W5hdN8okWOvB','W4vWW5K','BmoPWPBdSsa','lNlcH8kXma','iCkvW5STWOm','5lIJ6lgm8yEIMq','i8kOje0DlG','kmoCl8kmW5C','W5dcI8kA','W7uck1VdJa','m8o1l8kWW606vCoakL0Z','qVgmQiG','W6NdJCogW5ve','WQrmqG','W6ldG8oj','WQZcH8ku','WP1xWP43jLtdUqZdOCoVc8kpW6qK','WOFcVJbiW60','W5LXamokmW','W7X4xSo8la','W6VcPqFcOLFdHCkh','FSoaF8o+W7hcL8k9D3JcNqi1p2W','W5lcKmklW6j8','u8klW5FcNCkI','zu1o','W57dN8otW5bX','sHpcGCkRwa','fmkIwfZdPq','f3ZcV3RcQq','W5VdUxq0W4BcPCk/W7z8WO3dKW','hLxdSepcTq','yColySo/W6BcKq','v0q3vCoN','bddcNLah','W6VdUCoaW4Do','WQ7WKkU4','B3KIx8oT','pmk8Av3dMq','WQtcLJLbW40','BJ/dKCkn','BmkBW5ldTcO','W4n+E8kswa','BmomySo5W7VcKmkqyLNcJt49pg4','E3FcIh7cUG','W7ldR8otWQuFu8kzqmolW6xcKmkVW57cJsldKYK','5yUV5ysR5BUM6zcm5l615zgk5OIq5yM3','x08qrSooWPO','W5xdO8oZ','W5tdQCoNWRfQxmkS','W7ZdSKSNW4W','W4ZcLSoQn8oJ','W4FcK8onn8oM','5l2l5OcK5yII8jkfGU+5La','W7PjWPRcLbK','W6VcRX3cN08','5BQe6zoV5l+d5zgt5lUu5A6/5z6bW6RWN7Uz','j8khm10J','W5LtWOq','jwNdVa','W5pcJmku','W6FdPmo0W75W','r8k9WRPykmo8WO85EYP2o27dQa','W6PWW5dcSaFdJSoSWPVdOXzoW74','WOfIybKOWQbcEmonW4BdLCkyl0NdLurufs8','W4RcICkZW5Pg','kSoUe8kFW58','WQNcHSkhpeL8WQbcveJcKmkBwSkXf8oNWRm','nKVcVSkeea','W4ZcTSo7','DsBdICkQW6e','o0xdMLNcIq','zmkEW6SlyX9moNX5emogW6NdHCoxA3rHW5JdPW','W53cJZz+WOFdK8kVj1tcOqLl','lw/dQhxcJCkXW4tcHJpcTKyNpHu','ENVcQM7cQ8kt','5yIi5ywE5BQK6zco5lYU5zkn5OI/5yQy772H6iYY5B+H77Yp','zCkaW7RdKcq','kh3cKMXDWQpdU8kcW74tsKG','aZdcN2u0','W7tcRKdcRM7dILe','W7Wqhmo5xSoEWRn5ovi+uq','aw7cRxu','5BUv6zkT56s25yIW8kASL++7Ga','W4BcICoukmo/','pCkIma','W7FdPmoTW6n+','WQNcOthcGSoFEJ/cRSketgyWW4POW5vEu1O','nSkKmuW4ngNdUq','5l6h5zkv5y6A772F','jd7cTuidW7O','zmkoW5VcRCk2WPZcICkSWQK','hCouW6xcQsW','WOfpWPqPkfddPGRdL8oPkCkAW6mZWR8QWQTb','W5vzx8oTiG','W6jVWOJcQXK','iYSFWPhdM3O','WODsyCkIga','5RA05yIq5Asg54ky54IM77+R6kYX56Mb5zo+5ysM6k67','lSo6W6xcHcu','W452W5JcScVdJSo+W5K','lmoYjW','W5VdUxqZW5VcSSk7W7PTWRBdTmoxWOC0WPpdJsfO','aJK/','nNZcISkLf8ow','WRNcRJ1BW6CBWOa','eSk7W7W6WOaL','WRqZz8kkW4Tvj33dRq','5l6x5Ogy5yIu8yoNSE+7Qa','W4z8DSobna','W6NdQgtcPgW','tmouwmo5W5W','W6vVjSouhG','vYRcPCkUzq','WQZcRddcLSo3BrhcRCktwMSWW5vP','6lwi5y6H5PA45Psq','W6JcMmkXfmo3','hSk8e1md','adC1pq','W7ZcOCkx','WOZdKx86W4O','ohdcISkMnmoxu33cKmkuW4xdKSkisa','yxdcQN7cTCkt','WPGPWOJdTflcKCo+W7/dJJPlW7i','WO7cJZlcGSol','W5ZcSSkiW55Kza1g','WPRdIwWTW5BcLmkQ'],...(function(){return[...['s8oXWQVdHd8','W7PPkSoGhG','W7VcO8ksdCoW','44k75OYd56EB44k76k+h5ywf6i+x5y+1WQylW4rDzSox','WOvRzH0rWQXcFW','pSk4i34Do2G','5yI15yEW5BIT6zcV5lYP5zcR5OUT5yQ6776H6iY+5B2M77+b','WOFdKmovWOFcTSoGWQVdQSoDavmwfq','WQ3dI2CwW7i','F8oeEmoUW4dcJmktCW','imkSC1pdPW','W4xdTgGWW7FcSmkZ','umkJWQjSfq','veuWrmoV','ru1EDv8','4PQdW7tOHkpLRQhKUi7OVzNOOQ3PLRNPMRZMLQJPLBVOR6ZNVA7PLPBOR7y','FYFdKcG','FMBcVG','W7vXimofWOaP','W5ztWOJcIcC','W5bsWPu','W4njs8kquG','WORdTSomWO9dDSkA','5yIt5yw+5BQT6zgU5l235zoP5OMb5yIM','CSo/xCoZW5m','W55+W5FcSa','W63cRmkjjmoFWPNdQCoIW4RcMq','W5fDWPFcNW','W5NcISkl','v8kSW5tcKSkb','i8kZthpdHq','4PMsb+IeKEwVG+s4RoI/PEIJH+MwNoMyPUAvREMuLEITHEE/V+MvJUISMq','BMStz8ol','W6JdJ8otW75zEmk4xxKwbu8iW4a','CSonpmozW5RdICkeFIFcSs06itldJSkuWOtdH8oa','W5tcLSkFW5VdOSk9','WPtdRmkSsmkdw8oIgSoCWO7cK8k/','WPlcGSkJlL4','yCklW68','D3XdW47cMIPvWQ01Cmkjga','lhtdQxNcKa','W4xdNSo0WO94','tH7cOCk6wa','WQmKEG','W73dTmojWOvbgSktuCoKW6FcL8k0W6q','W4PNbSoChG','WRvqWQGGnG','W54odhtdRW','W4RcLmk1l8oe','W6tWR4QL','rIdcG8kpDa','ymkfW7G','iCkXyM/dGG','W4FcSmo6c8o/amoDia','W6RXIAU1','W6qzdfZdSNC6hSkUBmkQW5b2mZxdQb9PuMZcJa','yCoqzSo/W5O','4P
// 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"])