faker3/jd_lzkj_know.js

27 lines
80 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
活动名称知识超人超级无线
活动链接https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10039&templateId=<模板id>&activityId=<活动id>&prd=cjwx
https://lzkj-isv.isvjcloud.com/prod/cc/interaction/v1/index?activityType=10039&templateId=<模板id>&activityId=<活动id>&prd=cjwx
环境变量jd_lzkj_know_url // 活动链接
jd_lzkj_know_opencard // 是否入会true/false默认不入会
jd_lzkj_know_Notify // 是否推送通知true/false默认不推送
活动接口没有登记正确答案所以脚本可能会出现答题失败的情况不过脚本会自动排除错误答案为了提高头部账号的成功率脚本采用倒序运行账号
7 7 7 7 *
*/
const $ = new Env('知识超人(超级无线)')
const jdCookie = require('./jdCookie')
const common = require('./function/jdCommon')
const notify = require('./function/sendJDNotify')
const getToken = require('./function/getToken')
const { wuxianDefense, getJdEnvInfo } = require('./function/jdCrypto')
const { loreal_savePrize } = require('./function/savePrize')
var il='jsjiami.com.v7';const lll111i=ii1lI;function ilI1lIi(){const lii11lli=(function(){return[...[il,'QLjskjUEJilHaCrmXie.cDomNY.NvDD7QdtEMGJl==','W6auW6i+fhfaW4PSDM8','W63cLSoAyvRdTNi','WR1QW5bPWOq','nSoDWPnLudq','E8k6WPZcQCkFs3Kn','W7CfW6WI','W65HA8ohW6m','nmkCiSofiSoUW4ZcIq','vCkkWR7dPSoSW4ZcRuH+oSoyWP52W44XWQH3','b8k0va1i','W7mEW7e/fLLAW4boyxe','b8kvvGn5','i8ocWPnGxcy','yCkGWO3cRmkeshuylG','WQHumCoL','WRPwW5a','WOlcTSomuCo0','W4RdNYdcIfZcJa','W5vIW4dcISkPWPHjWPiVCYVdPchdUa','4PMiDEIVUowHV+wfVUAIP+w9TEATSoEJSoEyNUMsL+AnNq','wmkqWO/cHCkznY5I','p8kiaCoFlW','ihFcNConWRVcQSkWxZ7dTJS','5P2t556a5RAL5yIM54M95OkkW48','6Ag86kEp5zMy54Mm77+R','WPahwMFcQW','nh3dPGiPebBcSNKEs8osFa','WOVcLCo+rCo3','W7FcJmoFCfFdIG','WR1miSozW4S','cG7dT8o+WPNdVSkb','W4vAW7xcJJxcSSoGBSk0W7O','qmkkWOJcRSk0pa','WP9TW5pcImkJW4DuWQWYEa','WPFdM8otWRfd','xCk1WRNdN8oO','WRhdRebbWPi','5AAW5zoJ5Bs15y+A5A2C','W6/cTSo1xwK','W6hdP3NcTmkhoqu','r8o6FrriwSoZpSoh','ihRcMSotWQJcSCkcrWldQdldSW','WQLlkCo8W67dQmoI','W5VdU8okW6f4BIZdTa','CvXnWOJdVcBcNq','W6xdU3/cG8k4','W6FcL8oqyKVdNG','imkqkq','x8kWW7nDqW','W63JG6/MTO/LIPZLNR7LNOFJG6i','4P+OWOROHjJMNlJOVyROO6lPGR3LIQNKUAdPLz/OR6nF','imoaWOzpEq','WRj6W6DQWP4','qJ3cTMHZ','F8kXWOZcTSklshK','WQysWPe+WOtdUflcQmoJ','W4fiEfxdOq','D8o+FZfY','W5zCW7lcLXZcUmo7C8ky','W6ddICoHW4vE','e8k6uqa','W5xdLd3cIuVcINxcNW','WODmWRr8WRxdJW','WPnkWOSrWR4','WPOWFMhcGSoOdG','W57dV0zfW7y','W5pdI2TG','W5BdI2XWW7xdGW','WOCxWPbicG','W4DuF8kcW5i','WPrxWQLoWR7dMq','W4BdQ8onW5DlyJG','W4NdLJBcPv0','dgvPW6SKW7KZ','b2LI','W6/dH3xcPmkA','WQ5kW4z6WPSK','y8kmWP3dNSkbWOur','W4hdSX7cU3W','WRbAW4zyWOeO','WPGNzM7cGSovg37dUW','aSkRyJj7','W4FdOxVcPSkemWDgWPO','W6rlE37dQG','W57dPSoxW5vk','W61jBmo5W6TFw8o+WOtdMa','W4rxvg7dVq','W7PnDSo8','W6ZdUM/cSmkt','WPXosCoSxCk0zIJcHq','W67dPmouW4DP','mcpdKmoaWQW','W6JdVMlcNCkz','WOHUW4HFWP4DmJ8','bCk+vHftBCowW5TH','W4FdSZZcGey','qCkqWOVcJG','WPbNW6/cLSkGW5XkWQmWEdBdSH3dOXZdMd4rW4RdTJO','WQzdWRyHWPVcI8ol','W6W2W5vn','W75nCgVdNmk3paa','WOTBt8oK','WPLKW5jIWOCFiYG','WP7dQuxdG8kG','WO4yjmoQWPSzuq','fSkRvqrIASo6W5bQWPVcLCkbWOu','W4JdVConW4jtyI3dP8oLWRNcHCol','sUw8K+wNR++8M+AzOUEaS+wgTEACPowsPg0','eSk1rHn1FSon','W750W4NcLHq','rCkvWRtcImkL','WRn3WO5p','kSomWRzgvW','W4pdShRcM8kL','W6pdSfNdTLlcMYS','wCoQdwDt','W61yy8oPW5bd','W5VdLMNdHMC','WRNdVMJdMSkc','W7ddKWxcNhK','xSkqWOhcGSk0','WQixWQSJWPS','W4BdI3fXW4/dNmkw','eqZdImokWQO','WR1CW5XwWOmPACkABwy','hI/cO8olWPKTW5b0W7KEW61HwbNcJGRdOWZdJM0cW6RdPa','ySkvW5C','rZ/cL01j','WOnvxa','WRSpWOa8WQtdVLBcQW','WOuWFgFcHSo8hW','WR8jWOO5WQpdSv3cOq','W5T1omoHWO4','WRHEW5XE','awH3WRBcSSkefa','W4JdJ2XZW67dHG','wmkxWP3dNmkC','ewL0W4WQW7uZnq','W41fBCkNW50','cGRdS8oR','W6ldUK3dRf0','W4xdGclcOhO','W7ZdSfNdOehcIISpkmoFW4r+W6ddR39C','W6XgA0JdPSk3jrddQq','5P+c6ikO6i645y+c55Ep5OQS6yIo5P2q5l2/5Oo1772O','WRXhWQWM','WRPwW4zEWPKSza','W4byW7xcHG','5P2z6ioW6i6W5yYm55E75OUq6yIf5P6I5l2A5Og27768','r8o6Fs5kuSoZmSoGv1RdHq','W6ldUK0','FJ/cP1n/ruVcLui','W6zoumolW7q','yCk/WPBcTCk4wNi','rmkkWQtdKmoSW43cLem','W4vrESkPW4DAl8kyW7rshuq','wMZcRZ/cHq','rGJcSxme','W7BdVxHfW7W','FN7cTdJcQG','WOpdUfpdU8kN','5BEI5yY15A2+','WPBdQhrvWOS','s2xcLJtcJq','5BMc6zkC5zoU56AN77+WWRW','WRFcPd7dISotALzPW6xcPryptG','WOVdTM1KWRa','ymkPWPVdS8ko','FmoubKvYWQK','WRpdH0ldUCkcWOibrW','CSofg0TTWQ7dVSoHCwxcT2q','W7eSW7XnW6u','eMTZW6GxW6S4','WPRcKmkqWPO','8y2+UE+7IG','ce9j','WRbqW5PAWPqSD8khr2pcRspdJ0HOkudcH8k7','W5Xkz8oVf8oJW4a','WQXLW5lcOSkx','WRzYW79pWPu','WO5eWQOXWP8','nwPTW4SK','8l6rKmkE56M+5Rc2','tw/cJIhcVmkdccS','W7O1W49VW7tdPSoHWRKLWOS7','v8kjWQ/cOSkd','W5JdQ8oCW6jtAJddVCoLWQNcMmol','WPrIW53cNW','WP5cW7/cK8ki','ymoshuT1WQddO8o+xa','WPJdH1/dUCkjWO0yd8kFcmodWOW','W7TcDa','CSofg0TTWQ7dVSoHBhG','utlcJKWG','j33cKq','W5HbD8oWa8oGW4dcTa','WPbGo8ogW6ldPbtcQM5HjuhdRmksWRVdNeqMWQVcPG','qdxcTq','W4VdM0XhW68','W5vhA8kZW4vAnmkpW6Lp','5REb5yQR5Bk25z+sW7O','WO80WRrkgW','qSknWO/cKCk/fITQkW','W6VcMCo3tKy','5lM05AY95z62','WQNdVf5mWQm','WQhdHmo9WO1NngeGW4ZdUmkf','FmklWPu','WOjcW5rBWOi','awrbWR7cGG','eSo9WP5lCG','WQRdImoKWODRdxCRW4pdPCkpxColWRhcVmoxkZddVSocWRfgdmofWPHYDmoLjSoGW6tcUCkEWQaxW5RcLcvtWQW','BSo4yIT/','WPujW6FcRZBcO8o+zq','W4NdT07cUmkU','WPRcNSkWWQFcSW','
// 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"])