// # Source: https://github.com/985Ming/qlk/blob/main/%E9%9B%80%E5%B7%A2.min.js
// # Raw: https://raw.githubusercontent.com/985Ming/qlk/main/%E9%9B%80%E5%B7%A2.min.js
// # Repo: 985Ming/qlk
// # Path: 雀巢.min.js
// # UploadedAt: 2026-05-01T20:27:37+08:00
// # SHA256: b021d6527ceda19bfe13fbdbb639346ef45ed81a2b28f4a45b934d31adde3e5d
// # Category: web版/抓包
// # Evidence: web/H5关键词 + cookie/token/header
// 

// 大大鸣版 雀巢
// 有问题请及时联系大大鸣 v:xolag29638099  （有其他想要的脚本也可以联系，尽量试着写一写）
// 环境变量 NESTLE_TOKEN  抓取 Authorization 的值，例如：bearer 0610099d-550e-4e8d-9624-6840ff680812，只需要 bearer 后面的值

//
//   --------------------------------祈求区--------------------------------
//                     _ooOoo_
//                    o8888888o
//                    88" . "88
//                    (| -_- |)
//                     O\ = /O
//                 ____/`---'\____
//               .   ' \\| |// `.
//                / \\||| : |||// \
//              / _||||| -:- |||||- \
//                | | \\\ - /// | |
//              | \_| ''\---/'' | |
//               \ .-\__ `-` ___/-. /
//            ___`. .' /--.--\ `. . __
//         ."" '< `.___\_<|>_/___.' >'"".
//        | | : `- \`.;`\ _ /`;.`/ - ` : | |
//          \ \ `-. \_ __\ /__ _/ .-` / /
//  ======`-.____`-.___\_____/___.-`____.-'======
//                     `=---='
//
//  .............................................
//           佛祖保佑             永无BUG
//           佛祖镇楼             BUG辟邪
//   --------------------------------代码区--------------------------------
const a0_0x4d8a53=a0_0xf65b;(function(e,a){const n=a0_0xf65b,t=e();while(!![]){try{const s=parseInt(n(527))/1+-parseInt(n(518))/2*(parseInt(n(529))/3)+parseInt(n(513))/4+parseInt(n(497))/5+parseInt(n(503))/6*(parseInt(n(483))/7)+-parseInt(n(498))/8+parseInt(n(490))/9*(-parseInt(n(521))/10);if(s===a)break;else t["push"](t["shift"]())}catch(e){t["push"](t["shift"]())}}})(a0_0x4a64,498412);const axios=require(a0_0x4d8a53(488)),$={name:"雀巢会员",wait:a=>new Promise(e=>setTimeout(e,a)),logErr:e=>console[a0_0x4d8a53(491)](e),done:()=>console[a0_0x4d8a53(502)](a0_0x4d8a53(509))},nestleList=process[a0_0x4d8a53(533)][a0_0x4d8a53(508)]?process[a0_0x4d8a53(533)][a0_0x4d8a53(508)][a0_0x4d8a53(534)](/[\n&]/):[];let message="";function a0_0xf65b(e,a){const t=a0_0x4a64();return a0_0xf65b=function(e,a){e=e-481;let n=t[e];return n},a0_0xf65b(e,a)}const baseUrl=a0_0x4d8a53(539);function printBanner(){const e=a0_0x4d8a53,a=e(541);console[e(502)](a)}function getRandomUserAgent(){const e=a0_0x4d8a53,a=[e(535),"Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",e(537)];return a[Math["floor"](Math["random"]()*a[e(487)])]}function getRandomWait(e,a){const n=a0_0x4d8a53;return Math[n(482)](Math[n(494)]()*(a-e+1)+e)}async function sendRequest(e,a,n,t=null){const s=a0_0x4d8a53;try{const o={url:e,method:a,headers:n,timeout:1e4,validateStatus:()=>!![]};t&&(a[s(499)]()===s(492)||a["toLowerCase"]()==="put")&&(o["data"]=t);const r=await axios(o);return r[s(504)]}catch(e){return console["error"]("请求失败: "+e[s(507)]),{errcode:500,errmsg:s(510)+e["message"]}}}const headers={"User-Agent":getRandomUserAgent(),"content-type":a0_0x4d8a53(515),referer:a0_0x4d8a53(542)};(async()=>{const a=a0_0x4d8a53;printBanner(),console[a(502)](a(514)+headers[a(516)]);for(let e=0;e<nestleList[a(487)];e++){const n=e+1;console["log"](a(495)+n+"]个"+$[a(524)]+a(523)),headers["authorization"]=a(538)+nestleList[e],message+="📣===="+$["name"]+a(512)+n+a(511),await main(),await $[a(501)](getRandomWait(2e3,2500))}message&&console[a(502)](a(525)+message)})()["catch"](e=>$[a0_0x4d8a53(505)](e))[a0_0x4d8a53(496)](()=>$[a0_0x4d8a53(528)]());async function main(){const e=a0_0x4d8a53;await getUserInfo(),await $["wait"](getRandomWait(1e3,2e3)),await getTaskList(),await $[e(501)](getRandomWait(1e3,2e3)),await getUserBalance()}function a0_0x4a64(){const e=["name","\n执行结果汇总：\n","errmsg","500007sKihWc","done","36231mRCeyO","用户：","开始【","获取任务列表失败：","env","split","Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148","完成任务时发生异常 -> ","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36","Bearer ","https://crm.nestlechinese.com","】任务","\n免责声明:\n\n所发布的所有资源文件，禁止任何公众号、自媒体进行任何形式的转载、发布。 \n对任何问题概不负责，包括但不限于由任何脚本错误导致的任何损失或损害。间接使用脚本的任何用户，\n包括但不限于建立VPS或在某些行为违反国家/地区法律或相关法规的情况下进行传播。\n对于由此引起的任何隐私泄漏或其他后果概不负责。如果任何单位或个人认为该项目的脚本可能涉嫌侵犯其权利，\n则应及时通知并提供身份证明，所有权证明，我们将在收到认证文件后删除相关脚本。\n任何以任何方式查看此项目的人或直接或间接使用该项目的任何脚本的使用者都应仔细阅读此声明。\n\n所发布的内容仅供学习，禁止用于其他用途，您必须在下载后的24小时内从计算机或手机中完全删除以上内容。严禁产生利益链！\n保留随时更改或补充此免责声明的权利。一旦使用或复制了任何相关脚本或Script项目的规则，则视为您已接受此免责声明。\n如您不同意，请马上删除所以相关文件。\n\nGithub:\nhttps://github.com/985Ming/qlk\n    ╔══════════════════════════════════════════════╗\n    ║                                              ║\n    ║   ██████  ██████  ███    ███                ║\n    ║   ██   ██ ██   ██ ████  ████                ║\n    ║   ██   ██ ██   ██ ██ ████ ██                ║\n    ║   ██   ██ ██   ██ ██  ██  ██                ║\n    ║   ██████  ██████  ██      ██                ║\n    ║                                              ║\n    ║     雀巢会员自动任务脚本                    ║\n    ║     Created by 大大鸣 - V1.0.0               ║\n    ║     联系方式: v:xolag29638099                ║\n    ║     大大鸣交流群：1025838653                 ║\n    ╚══════════════════════════════════════════════╝\n","https://servicewechat.com/wxc5db704249c9bb31/353/page-frame.html","获取任务列表时发生异常 -> ","floor","91lwBdCE","获取用户积分余额失败：","完成任务","get","length","axios","task_guid","1575wzmWpQ","error","post","获取用户信息时发生异常 -> ","random","\n*****第[","finally","4880540CxLcIQ","6968072OOAbDf","toLowerCase","获取用户巢币时发生异常 -> ","wait","log","270234rLIWlJ","data","logErr","errcode","message","NESTLE_TOKEN","任务完成","请求失败: ","]====📣\n","账号[","3444756LPOrKA","\n已随机分配 User-Agent\n\n","application/json","User-Agent","/openapi/pointsservice/api/Points/getuserbalance","90MQXMfv","/openapi/member/api/User/GetUserInfo","获取用户信息失败：","57710wNwPsp","任务失败 -> ","账号*****"];a0_0x4a64=function(){return e};return a0_0x4a64()}async function getUserInfo(){const a=a0_0x4d8a53;try{const e=await sendRequest(baseUrl+a(519),a(486),headers);if(200!==e[a(506)])return console[a(491)](a(520)+e[a(526)]);const{nickname:n,mobile:t}=e[a(504)];console[a(502)](a(530)+n+"("+t+")"),message+=a(530)+n+"("+t+")\n"}catch(e){console[a(491)](a(493)+e)}}async function getTaskList(){const a=a0_0x4d8a53;try{const e=await sendRequest(baseUrl+"/openapi/activityservice/api/task/getlist",a(492),headers);if(200!==e[a(506)])return console["error"](a(532)+e[a(526)]);for(const n of e[a(504)]){console[a(502)](a(531)+n["task_title"]+a(540)),await doTask(n[a(489)]),await $[a(501)](getRandomWait(2e3,2500))}}catch(e){console[a(491)](a(481)+e)}}async function doTask(e){const a=a0_0x4d8a53;try{const n=await sendRequest(baseUrl+"/openapi/activityservice/api/task/add",a(492),headers,{task_guid:e});if(201==n[a(506)])return console[a(491)](a(522)+n["errmsg"]+"\n");console[a(502)](a(485)+n["errcode"]+" -> "+n[a(526)]+"\n")}catch(e){console[a(491)](a(536)+e)}}async function getUserBalance(){const a=a0_0x4d8a53;try{const e=await sendRequest(baseUrl+a(517),a(492),headers);if(200!==e["errcode"])return console[a(491)](a(484)+e[a(526)]);console[a(502)]("当前巢币："+e[a(504)]),message+="当前巢币："+e[a(504)]+"\n\n"}catch(e){console[a(491)](a(500)+e)}}