mirror of
https://github.com/3288588344/toulu.git
synced 2025-12-17 07:18:47 +08:00
Add files via upload
This commit is contained in:
149
this官方商城.js
Normal file
149
this官方商城.js
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
/*
|
||||||
|
------------------------------------------
|
||||||
|
@Author: smallfawn 860562056
|
||||||
|
@Date: 2024.06.09 13.27
|
||||||
|
@Description: this官方商城小程序 签到
|
||||||
|
------------------------------------------
|
||||||
|
变量名this
|
||||||
|
变量值https://xcx.this.cn/api/ 域名下请求头Headers中authori-zation的值 去掉Bearer 多账号&或换行或新建同名变量
|
||||||
|
[Script]
|
||||||
|
http-response
|
||||||
|
|
||||||
|
[MITM]
|
||||||
|
hostname =
|
||||||
|
|
||||||
|
⚠️【免责声明】
|
||||||
|
------------------------------------------
|
||||||
|
1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
|
||||||
|
2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。
|
||||||
|
3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。
|
||||||
|
4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。
|
||||||
|
5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。
|
||||||
|
6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。
|
||||||
|
7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。
|
||||||
|
*/
|
||||||
|
|
||||||
|
const $ = new Env("this官方商城");
|
||||||
|
let ckName = `this`;
|
||||||
|
let userCookie = checkEnv(
|
||||||
|
($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""
|
||||||
|
);
|
||||||
|
const notify = $.isNode() ? require("./sendNotify") : "";
|
||||||
|
|
||||||
|
!(async () => {
|
||||||
|
console.log(
|
||||||
|
`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
|
||||||
|
new Date().getTime() +
|
||||||
|
new Date().getTimezoneOffset() * 60 * 1000 +
|
||||||
|
8 * 60 * 60 * 1000
|
||||||
|
).toLocaleString()} \n==================================================`
|
||||||
|
);
|
||||||
|
//console.log(userCookie)
|
||||||
|
if (!userCookie?.length) return console.log(`没有找到CK哦`);
|
||||||
|
let index = 1;
|
||||||
|
let strSplitor = "#";
|
||||||
|
|
||||||
|
for (let user of userCookie) {
|
||||||
|
$.log(`\n🚀 user:【${index}】 start work\n`);
|
||||||
|
index++
|
||||||
|
$.token = user
|
||||||
|
$.ckStatus = true;
|
||||||
|
await info()
|
||||||
|
}
|
||||||
|
|
||||||
|
await $.sendMsg($.logs.join("\n"));
|
||||||
|
})()
|
||||||
|
.catch((e) => console.log(e))
|
||||||
|
.finally(() => $.done());
|
||||||
|
async function info() {
|
||||||
|
let data = JSON.stringify({
|
||||||
|
"sign": 1
|
||||||
|
});
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
method: 'POST',
|
||||||
|
url: 'https://xcx.this.cn/api/sign/user',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220089 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android',
|
||||||
|
'Accept-Encoding': 'gzip,compress,br,deflate',
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'charset': 'utf-8',
|
||||||
|
'form-type': 'routine',
|
||||||
|
'authori-zation': 'Bearer ' + $.token,
|
||||||
|
'Referer': 'https://servicewechat.com/wx1c228827dfa0de9e/13/page-frame.html'
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
};
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.status == 200) {
|
||||||
|
$.log(`${result.data.nickname} 累计签到[${result.data.sign_num}]天 当前积分[${result.data.integral}]分`)
|
||||||
|
if (result.data.is_day_sgin !== true) {
|
||||||
|
$.log(`未签到 ===> 签到ing`)
|
||||||
|
await signIn()
|
||||||
|
} else {
|
||||||
|
$.log(`已签到 ===> 跳过签到`)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$.log(result.msg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function signIn() {
|
||||||
|
let data = JSON.stringify({});
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
method: 'POST',
|
||||||
|
url: 'https://xcx.this.cn/api/sign/integral',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220089 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android',
|
||||||
|
'Accept-Encoding': 'gzip,compress,br,deflate',
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'charset': 'utf-8',
|
||||||
|
'form-type': 'routine',
|
||||||
|
'authori-zation': 'Bearer ' + $.token,
|
||||||
|
'Referer': 'https://servicewechat.com/wx1c228827dfa0de9e/13/page-frame.html'
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
};
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.status == 200) {
|
||||||
|
$.log(`签到成功:[${result.msg}]`)
|
||||||
|
} else {
|
||||||
|
$.log(result.msg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function checkEnv(userCookie) {
|
||||||
|
const envSplitor = ["&", "\n"];
|
||||||
|
//console.log(userCookie);
|
||||||
|
let userList = userCookie
|
||||||
|
.split(envSplitor.find((o) => userCookie.includes(o)) || "&")
|
||||||
|
.filter((n) => n);
|
||||||
|
console.log(`共找到${userList.length}个账号`);
|
||||||
|
return userList;
|
||||||
|
}
|
||||||
|
// prettier-ignore
|
||||||
|
function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`).join("&") } getURLParams(url) { const params = {}; const queryString = url.split("?")[1]; if (queryString) { const paramPairs = queryString.split("&"); paramPairs.forEach((pair) => { const [key, value] = pair.split("="); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === "object" } catch (e) { return false } } isJson(obj) { var isjson = typeof obj == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if (this.isNode()) { await notify.sendNotify(this.name, message) } else { this.msg(this.name, "", message) } } randomNumber(length) { const characters = "0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } randomString(length) { const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) { new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))) } return t } msg(title = t, subtitle = "", body = "", options) { const formatOptions = (options) => { if (!options) { return options } else if (typeof options === "string") { if (this.isQuanX()) { return { "open-url": options } } else { return undefined } } else if (typeof options === "object" && (options["open-url"] || options["media-url"])) { if (this.isQuanX()) { return options } else { return undefined } } else { return undefined } }; if (!this.isMute) { if (this.isQuanX()) { $notify(title, subtitle, body, formatOptions(options)) } } let logs = ["", "==============📣系统通知📣=============="]; logs.push(title); subtitle ? logs.push(subtitle) : ""; body ? logs.push(body) : ""; console.log(logs.join("\n")); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isQuanX(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) }
|
||||||
|
|
||||||
|
async function Request(options) {
|
||||||
|
if ($.isNode()) {
|
||||||
|
const axios = require("axios");
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await axios.request(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if ($.isQuanX()) {
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await $task.fetch(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return await Request(options);
|
||||||
|
}
|
||||||
213
今日一句.js
Normal file
213
今日一句.js
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
/*
|
||||||
|
------------------------------------------
|
||||||
|
@Author: smallfawn 860562056
|
||||||
|
@Date: 2024.06.10 21:00
|
||||||
|
@Description: 每日一句 小程序 一天大概2毛 满3提
|
||||||
|
------------------------------------------
|
||||||
|
变量名:juzi
|
||||||
|
变量值 https://api.juzi.co/ 接口域名的请求头Headers中token的值 多账号&或换行或新建同名变量
|
||||||
|
[Script]
|
||||||
|
http-response
|
||||||
|
|
||||||
|
[MITM]
|
||||||
|
hostname =
|
||||||
|
|
||||||
|
⚠️【免责声明】
|
||||||
|
------------------------------------------
|
||||||
|
1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
|
||||||
|
2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。
|
||||||
|
3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。
|
||||||
|
4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。
|
||||||
|
5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。
|
||||||
|
6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。
|
||||||
|
7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。
|
||||||
|
*/
|
||||||
|
|
||||||
|
const $ = new Env("每日一句小程序");
|
||||||
|
let ckName = `juzi`;
|
||||||
|
let userCookie = checkEnv(
|
||||||
|
($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""
|
||||||
|
);
|
||||||
|
const notify = $.isNode() ? require("./sendNotify") : "";
|
||||||
|
|
||||||
|
!(async () => {
|
||||||
|
console.log(
|
||||||
|
`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
|
||||||
|
new Date().getTime() +
|
||||||
|
new Date().getTimezoneOffset() * 60 * 1000 +
|
||||||
|
8 * 60 * 60 * 1000
|
||||||
|
).toLocaleString()} \n==================================================`
|
||||||
|
);
|
||||||
|
//console.log(userCookie)
|
||||||
|
if (!userCookie?.length) return console.log(`没有找到CK哦`);
|
||||||
|
let index = 1;
|
||||||
|
let strSplitor = "#";
|
||||||
|
|
||||||
|
for (let user of userCookie) {
|
||||||
|
$.log(`\n🚀 user:【${index}】 start work\n`);
|
||||||
|
index++
|
||||||
|
$.token = user
|
||||||
|
$.ckStatus = true;
|
||||||
|
$.juzi = null
|
||||||
|
$.sid = null
|
||||||
|
await getJuzi();
|
||||||
|
if ($.juzi) {
|
||||||
|
$.log(`🎉 获取成功:${$.juzi}`);
|
||||||
|
await postJuzi();
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
await getNewJuzi()
|
||||||
|
if ($.sid) {
|
||||||
|
await likeJuzi()
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await $.sendMsg($.logs.join("\n"));
|
||||||
|
})()
|
||||||
|
.catch((e) => console.log(e))
|
||||||
|
.finally(() => $.done());
|
||||||
|
|
||||||
|
async function getJuzi() {
|
||||||
|
let config = {
|
||||||
|
url: `https://v1.hitokoto.cn`,
|
||||||
|
method: "GET"
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config);
|
||||||
|
if (result) {
|
||||||
|
$.juzi = result.hitokoto + "~~~" + result.from_who;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function postJuzi() {
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
url: `https://api.juzi.co/sentence/execWrite`,
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"accept": "*/*",
|
||||||
|
"accept-language": "zh-CN,zh;q=0.9",
|
||||||
|
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
|
||||||
|
"sec-fetch-dest": "empty",
|
||||||
|
"sec-fetch-mode": "cors",
|
||||||
|
"sec-fetch-site": "cross-site",
|
||||||
|
"token": $.token,
|
||||||
|
"xweb_xhr": "1",
|
||||||
|
"Referer": "https://servicewechat.com/wx3e3540cb2012ea1f/26/page-frame.html",
|
||||||
|
"Referrer-Policy": "unsafe-url"
|
||||||
|
},
|
||||||
|
data: qs({
|
||||||
|
"juzi": encodeURIComponent($.juzi),
|
||||||
|
"original": "false",
|
||||||
|
"writer": "",
|
||||||
|
"source": "",
|
||||||
|
"tagsValue": "",
|
||||||
|
"tagslength": "0",
|
||||||
|
"tags": ""
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let { data: result } = await Request(config);
|
||||||
|
if (result.code = 200) {
|
||||||
|
$.log(`发布句子成功`)
|
||||||
|
console.log(result)
|
||||||
|
} else {
|
||||||
|
$.log(`发布句子失败 [${result.msg}]`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function likeJuzi() {
|
||||||
|
let config = {
|
||||||
|
url: `https://api.juzi.co/sentence/slike`,
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"accept": "*/*",
|
||||||
|
"accept-language": "zh-CN,zh;q=0.9",
|
||||||
|
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
|
||||||
|
"sec-fetch-dest": "empty",
|
||||||
|
"sec-fetch-mode": "cors",
|
||||||
|
"sec-fetch-site": "cross-site",
|
||||||
|
"token": $.token,
|
||||||
|
"xweb_xhr": "1",
|
||||||
|
"Referer": "https://servicewechat.com/wx3e3540cb2012ea1f/26/page-frame.html",
|
||||||
|
"Referrer-Policy": "unsafe-url"
|
||||||
|
},
|
||||||
|
data: qs({ sid: $.sid })
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config);
|
||||||
|
if (result.code = 200) {
|
||||||
|
$.log(`点赞句子成功`)
|
||||||
|
} else {
|
||||||
|
$.log(`点赞句子失败 [${result.msg}]`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function getNewJuzi() {
|
||||||
|
let config = {
|
||||||
|
url: `https://api.juzi.co/index/tab`,
|
||||||
|
method: "GET",
|
||||||
|
headers: {
|
||||||
|
"accept": "*/*",
|
||||||
|
"accept-language": "zh-CN,zh;q=0.9",
|
||||||
|
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
|
||||||
|
"sec-fetch-dest": "empty",
|
||||||
|
"sec-fetch-mode": "cors",
|
||||||
|
"sec-fetch-site": "cross-site",
|
||||||
|
"token": $.token,
|
||||||
|
"xweb_xhr": "1",
|
||||||
|
"Referer": "https://servicewechat.com/wx3e3540cb2012ea1f/26/page-frame.html",
|
||||||
|
"Referrer-Policy": "unsafe-url"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config);
|
||||||
|
if (result.code = 200) {
|
||||||
|
let num = Math.floor(Math.random() * 9)
|
||||||
|
$.sid = result.data.recommend[num].id
|
||||||
|
} else {
|
||||||
|
$.log(`获取待点赞句子失败 [${result.msg}]`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function qs(obj) {
|
||||||
|
let str = "";
|
||||||
|
for (let key in obj) {
|
||||||
|
str += `${key}=${obj[key]}&`
|
||||||
|
}
|
||||||
|
return str.substring(0, str.length - 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkEnv(userCookie) {
|
||||||
|
const envSplitor = ["&", "\n"];
|
||||||
|
//console.log(userCookie);
|
||||||
|
let userList = userCookie
|
||||||
|
.split(envSplitor.find((o) => userCookie.includes(o)) || "&")
|
||||||
|
.filter((n) => n);
|
||||||
|
console.log(`共找到${userList.length}个账号`);
|
||||||
|
return userList;
|
||||||
|
}
|
||||||
|
// prettier-ignore
|
||||||
|
function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`).join("&") } getURLParams(url) { const params = {}; const queryString = url.split("?")[1]; if (queryString) { const paramPairs = queryString.split("&"); paramPairs.forEach((pair) => { const [key, value] = pair.split("="); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === "object" } catch (e) { return false } } isJson(obj) { var isjson = typeof obj == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if (this.isNode()) { await notify.sendNotify(this.name, message) } else { this.msg(this.name, "", message) } } randomNumber(length) { const characters = "0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } randomString(length) { const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) { new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))) } return t } msg(title = t, subtitle = "", body = "", options) { const formatOptions = (options) => { if (!options) { return options } else if (typeof options === "string") { if (this.isQuanX()) { return { "open-url": options } } else { return undefined } } else if (typeof options === "object" && (options["open-url"] || options["media-url"])) { if (this.isQuanX()) { return options } else { return undefined } } else { return undefined } }; if (!this.isMute) { if (this.isQuanX()) { $notify(title, subtitle, body, formatOptions(options)) } } let logs = ["", "==============📣系统通知📣=============="]; logs.push(title); subtitle ? logs.push(subtitle) : ""; body ? logs.push(body) : ""; console.log(logs.join("\n")); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isQuanX(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) }
|
||||||
|
|
||||||
|
async function Request(options) {
|
||||||
|
if ($.isNode()) {
|
||||||
|
const axios = require("axios");
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await axios.request(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if ($.isQuanX()) {
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await $task.fetch(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return await Request(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
38
免流校园网签到.py
Normal file
38
免流校园网签到.py
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
import requests
|
||||||
|
import time
|
||||||
|
|
||||||
|
url = "http://8.137.111.254:1024/user/index.php"
|
||||||
|
params = {'act': "do_login"}
|
||||||
|
payload = "name=xxxxxx&pass=xxxxxxxxxxx"#name是账号,pass是密码
|
||||||
|
headers = {
|
||||||
|
'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36",
|
||||||
|
'Accept': "application/json, text/javascript, */*; q=0.01",
|
||||||
|
'Accept-Encoding': "gzip, deflate",
|
||||||
|
'X-Requested-With': "XMLHttpRequest",
|
||||||
|
'Content-Type': "application/x-www-form-urlencoded; charset=UTF-8",
|
||||||
|
'Origin': "http://8.137.111.254:1024",
|
||||||
|
'Referer': "http://8.137.111.254:1024/user/index.php",
|
||||||
|
'Accept-Language': "zh-CN,zh;q=0.9",
|
||||||
|
}
|
||||||
|
response = requests.post(url, params=params, data=payload, headers=headers)
|
||||||
|
|
||||||
|
cookie_value = response.cookies.get('PHPSESSID')
|
||||||
|
print("Cookie value:", cookie_value)
|
||||||
|
|
||||||
|
time.sleep(2)
|
||||||
|
|
||||||
|
url = "http://8.137.111.254:1024/user/getline.php"
|
||||||
|
params = {'act': "sign"}
|
||||||
|
headers = {
|
||||||
|
'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36",
|
||||||
|
'Accept': "application/json, text/javascript, */*; q=0.01",
|
||||||
|
'Accept-Encoding': "gzip, deflate",
|
||||||
|
'X-Requested-With': "XMLHttpRequest",
|
||||||
|
'Origin': "http://8.137.111.254:1024",
|
||||||
|
'Referer': "http://8.137.111.254:1024/user/admin.php",
|
||||||
|
'Accept-Language': "zh-CN,zh;q=0.9",
|
||||||
|
'Cookie': f"PHPSESSID={cookie_value}"
|
||||||
|
}
|
||||||
|
response = requests.post(url, params=params, headers=headers)
|
||||||
|
|
||||||
|
print(response.json())
|
||||||
251
华硕商城每日抽奖.js
Normal file
251
华硕商城每日抽奖.js
Normal file
@@ -0,0 +1,251 @@
|
|||||||
|
/*
|
||||||
|
------------------------------------------
|
||||||
|
@Author: smallfawn 860562056
|
||||||
|
@Date: 2024.06.11 16:43
|
||||||
|
@Description: 华硕商城APP 基础任务 浏览[好像有BUG]5分 + 签到5分 = 抽奖9分
|
||||||
|
------------------------------------------
|
||||||
|
经测试小程序CK失效短 故抓取APP的数据API
|
||||||
|
变量名asusStore
|
||||||
|
变量值 https://store.asus.com.cn/storeapi 域名请求头Headers中Authorization的值#token的值
|
||||||
|
多账号&或换行或新增同名变量
|
||||||
|
[Script]
|
||||||
|
http-response
|
||||||
|
|
||||||
|
[MITM]
|
||||||
|
hostname =
|
||||||
|
|
||||||
|
⚠️【免责声明】
|
||||||
|
------------------------------------------
|
||||||
|
1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
|
||||||
|
2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。
|
||||||
|
3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。
|
||||||
|
4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。
|
||||||
|
5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。
|
||||||
|
6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。
|
||||||
|
7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。
|
||||||
|
*/
|
||||||
|
const $ = new Env("华硕商城APP");
|
||||||
|
let ckName = `asusStore`;
|
||||||
|
|
||||||
|
let userCookie = checkEnv(
|
||||||
|
($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""
|
||||||
|
);
|
||||||
|
const notify = $.isNode() ? require("./sendNotify") : "";
|
||||||
|
|
||||||
|
!(async () => {
|
||||||
|
console.log(
|
||||||
|
`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
|
||||||
|
new Date().getTime() +
|
||||||
|
new Date().getTimezoneOffset() * 60 * 1000 +
|
||||||
|
8 * 60 * 60 * 1000
|
||||||
|
).toLocaleString()} \n==================================================`
|
||||||
|
);
|
||||||
|
//console.log(userCookie)
|
||||||
|
if (!userCookie?.length) return console.log(`没有找到CK哦`);
|
||||||
|
let index = 1;
|
||||||
|
let strSplitor = "#";
|
||||||
|
|
||||||
|
for (let user of userCookie) {
|
||||||
|
$.log(`\n🚀 user:【${index}】 start work\n`);
|
||||||
|
index++
|
||||||
|
$.auth = user.split(strSplitor)[0];
|
||||||
|
$.token = user.split(strSplitor)[1];
|
||||||
|
$.ckStatus = true;
|
||||||
|
await signIn()
|
||||||
|
for (let i of [1, 2]) {
|
||||||
|
await roll()
|
||||||
|
await $.wait(5000)
|
||||||
|
|
||||||
|
}
|
||||||
|
await $.wait(5000)
|
||||||
|
|
||||||
|
await get_more()
|
||||||
|
}
|
||||||
|
|
||||||
|
await $.sendMsg($.logs.join("\n"));
|
||||||
|
})()
|
||||||
|
.catch((e) => console.log(e))
|
||||||
|
.finally(() => $.done());
|
||||||
|
|
||||||
|
//签到
|
||||||
|
async function signIn() {
|
||||||
|
let time = Date.parse(new Date) / 1e3
|
||||||
|
let nonce = d(1e4, 99999)
|
||||||
|
let text = `${nonce}${time}Asus!@#$%^&*()Store`
|
||||||
|
let config = {
|
||||||
|
url: `https://store.asus.com.cn/storeapi/user/my/sign`,
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'okhttp/3.9.1',
|
||||||
|
'Connection': 'Keep-Alive',
|
||||||
|
'Accept-Encoding': 'gzip',
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
|
'Authorization': $.auth,
|
||||||
|
'plat': 'android',
|
||||||
|
'source': '2',
|
||||||
|
'version': '2.7.16',
|
||||||
|
'device': 'MI 8 Lite',
|
||||||
|
'token': $.token,
|
||||||
|
'visitorid': 'a232e99938994576',
|
||||||
|
'Cache-Control': 'no-cache'
|
||||||
|
},
|
||||||
|
data: `timestamp=${time}&nonce=${nonce}&signature=${MD5(text)}`
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.code == 200) {
|
||||||
|
$.log(`签到成功`)
|
||||||
|
} else {
|
||||||
|
$.log(`签到失败 [${result.msg}]`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取兑奖码
|
||||||
|
async function get_more() {
|
||||||
|
let time = Date.parse(new Date) / 1e3
|
||||||
|
let nonce = d(1e4, 99999)
|
||||||
|
let text = `${nonce}${time}Asus!@#$%^&*()Store`
|
||||||
|
let config = {
|
||||||
|
url: `https://store.asus.com.cn/storeapi/user/activity/get-more`,
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'okhttp/3.9.1',
|
||||||
|
'Connection': 'Keep-Alive',
|
||||||
|
'Accept-Encoding': 'gzip',
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
|
'Authorization': $.auth,
|
||||||
|
'plat': 'android',
|
||||||
|
'source': '2',
|
||||||
|
'version': '2.7.16',
|
||||||
|
'device': 'MI 8 Lite',
|
||||||
|
'token': $.token,
|
||||||
|
'visitorid': 'a232e99938994576',
|
||||||
|
'Cache-Control': 'no-cache'
|
||||||
|
},
|
||||||
|
data: `page=1&limit=10×tamp=${time}&nonce=${nonce}&signature=${MD5(text)}`
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.code == 200) {
|
||||||
|
for (let i of result.data.list) {
|
||||||
|
$.log(`历史奖品:${i.id} ===> [${i.prize_name}]`)
|
||||||
|
if (i.is_exchange !== 1) {
|
||||||
|
if (i.level == 4) {
|
||||||
|
$.log(`${i.id} 未兑换 --- 脚本执行兑换`)
|
||||||
|
await exchange(i.id)
|
||||||
|
} else {
|
||||||
|
$.log(`${i.id} 未兑换实物奖励 --- 请看规则找客服或页面兑换`)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//兑奖
|
||||||
|
|
||||||
|
async function exchange(id) {
|
||||||
|
let time = Date.parse(new Date) / 1e3
|
||||||
|
let nonce = d(1e4, 99999)
|
||||||
|
let text = `${nonce}${time}Asus!@#$%^&*()Store`
|
||||||
|
let config = {
|
||||||
|
url: `https://store.asus.com.cn/storeapi/user/activity/exchange`,
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'okhttp/3.9.1',
|
||||||
|
'Connection': 'Keep-Alive',
|
||||||
|
'Accept-Encoding': 'gzip',
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
|
'Authorization': $.auth,
|
||||||
|
'plat': 'android',
|
||||||
|
'source': '2',
|
||||||
|
'version': '2.7.16',
|
||||||
|
'device': 'MI 8 Lite',
|
||||||
|
'token': $.token,
|
||||||
|
'visitorid': 'a232e99938994576',
|
||||||
|
'Cache-Control': 'no-cache'
|
||||||
|
},
|
||||||
|
data: `id=${id}×tamp=${time}&nonce=${nonce}&signature=${MD5(text)}`
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.code == 200) {
|
||||||
|
$.log(`兑换成功 [${id}]`)
|
||||||
|
} else {
|
||||||
|
$.log(`兑换失败 [${result.msg}]`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//抽奖
|
||||||
|
async function roll() {
|
||||||
|
let time = Date.parse(new Date) / 1e3
|
||||||
|
let nonce = d(1e4, 99999)
|
||||||
|
let text = `${nonce}${time}Asus!@#$%^&*()Store`
|
||||||
|
let config = {
|
||||||
|
url: `https://store.asus.com.cn/storeapi/user/activity/roll`,
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'okhttp/3.9.1',
|
||||||
|
'Connection': 'Keep-Alive',
|
||||||
|
'Accept-Encoding': 'gzip',
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
|
'Authorization': $.auth,
|
||||||
|
'plat': 'android',
|
||||||
|
'source': '2',
|
||||||
|
'version': '2.7.16',
|
||||||
|
'device': 'MI 8 Lite',
|
||||||
|
'token': $.token,
|
||||||
|
'visitorid': 'a232e99938994576',
|
||||||
|
'Cache-Control': 'no-cache'
|
||||||
|
},
|
||||||
|
data: `ticket=RixzlRQgH&activity_type=1&active_code=×tamp=${time}&nonce=${nonce}&signature=${MD5(text)}`
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.code == 200) {
|
||||||
|
$.log(`抽奖成功`)
|
||||||
|
} else {
|
||||||
|
$.log(`抽奖失败 [${result.msg}]`)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
function d(t, e) {
|
||||||
|
var r = e - t
|
||||||
|
, n = Math.random();
|
||||||
|
return String(t + Math.round(n * r))
|
||||||
|
}
|
||||||
|
|
||||||
|
function MD5(data) {
|
||||||
|
const crypto = require('crypto');
|
||||||
|
return crypto.createHash('md5').update(data).digest('hex');
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkEnv(userCookie) {
|
||||||
|
const envSplitor = ["&", "\n"];
|
||||||
|
//console.log(userCookie);
|
||||||
|
let userList = userCookie
|
||||||
|
.split(envSplitor.find((o) => userCookie.includes(o)) || "&")
|
||||||
|
.filter((n) => n);
|
||||||
|
console.log(`共找到${userList.length}个账号`);
|
||||||
|
return userList;
|
||||||
|
}
|
||||||
|
// prettier-ignore
|
||||||
|
function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`).join("&") } getURLParams(url) { const params = {}; const queryString = url.split("?")[1]; if (queryString) { const paramPairs = queryString.split("&"); paramPairs.forEach((pair) => { const [key, value] = pair.split("="); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === "object" } catch (e) { return false } } isJson(obj) { var isjson = typeof obj == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if (this.isNode()) { await notify.sendNotify(this.name, message) } else { this.msg(this.name, "", message) } } randomNumber(length) { const characters = "0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } randomString(length) { const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) { new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))) } return t } msg(title = t, subtitle = "", body = "", options) { const formatOptions = (options) => { if (!options) { return options } else if (typeof options === "string") { if (this.isQuanX()) { return { "open-url": options } } else { return undefined } } else if (typeof options === "object" && (options["open-url"] || options["media-url"])) { if (this.isQuanX()) { return options } else { return undefined } } else { return undefined } }; if (!this.isMute) { if (this.isQuanX()) { $notify(title, subtitle, body, formatOptions(options)) } } let logs = ["", "==============📣系统通知📣=============="]; logs.push(title); subtitle ? logs.push(subtitle) : ""; body ? logs.push(body) : ""; console.log(logs.join("\n")); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isQuanX(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) }
|
||||||
|
|
||||||
|
async function Request(options) {
|
||||||
|
if ($.isNode()) {
|
||||||
|
const axios = require("axios");
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await axios.request(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if ($.isQuanX()) {
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await $task.fetch(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return await Request(options);
|
||||||
|
}
|
||||||
152
卡士会员.js
Normal file
152
卡士会员.js
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
/*
|
||||||
|
------------------------------------------
|
||||||
|
@Author: smallfawn
|
||||||
|
@Date: 2024.06.09 11.56
|
||||||
|
@Description: 卡士会员小程序
|
||||||
|
------------------------------------------
|
||||||
|
变量名kashivip
|
||||||
|
值 第一次进签到页面会有https://gateway.fengxuan.cn/Identity/API_Authen/Get_Token 获取TOKEN的请求 找到Url中pid和key和secret和unionid和绑定的手机号和进入签到页面的https://gateway.fengxuan.cn/QianDao/API_Sign/Save_User_Sign_Detail
|
||||||
|
里面的Post请求体的参数uid 这个UID在用户界面点我的庄园 找到https://internal.fengxuan.cn/API_Member/GetUserContent接口的返回uid的值
|
||||||
|
一共六个值 pid#key#secret#unionid#手机号#uid 在点进去签到页面之前就开启抓包 第一次很容易抓到 或者等7200s之后再去抓token的请求
|
||||||
|
[Script]
|
||||||
|
http-response
|
||||||
|
|
||||||
|
[MITM]
|
||||||
|
hostname =
|
||||||
|
|
||||||
|
⚠️【免责声明】
|
||||||
|
------------------------------------------
|
||||||
|
1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
|
||||||
|
2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。
|
||||||
|
3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。
|
||||||
|
4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。
|
||||||
|
5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。
|
||||||
|
6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。
|
||||||
|
7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。
|
||||||
|
*/
|
||||||
|
|
||||||
|
const $ = new Env("卡士会员");
|
||||||
|
let ckName = `kashivip`;
|
||||||
|
let userCookie = checkEnv(
|
||||||
|
($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""
|
||||||
|
);
|
||||||
|
const notify = $.isNode() ? require("./sendNotify") : "";
|
||||||
|
|
||||||
|
!(async () => {
|
||||||
|
console.log(
|
||||||
|
`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
|
||||||
|
new Date().getTime() +
|
||||||
|
new Date().getTimezoneOffset() * 60 * 1000 +
|
||||||
|
8 * 60 * 60 * 1000
|
||||||
|
).toLocaleString()} \n==================================================`
|
||||||
|
);
|
||||||
|
//console.log(userCookie)
|
||||||
|
if (!userCookie?.length) return console.log(`没有找到CK哦`);
|
||||||
|
let index = 1;
|
||||||
|
let strSplitor = "#";
|
||||||
|
|
||||||
|
for (let user of userCookie) {
|
||||||
|
$.log(`\n🚀 user:【${index}】 start work\n`);
|
||||||
|
index++
|
||||||
|
$.access_token = null
|
||||||
|
$.pid = user.split(strSplitor)[0];
|
||||||
|
$.key = user.split(strSplitor)[1];
|
||||||
|
$.secret = user.split(strSplitor)[2];
|
||||||
|
$.unionid = user.split(strSplitor)[3];
|
||||||
|
|
||||||
|
$.bid = null
|
||||||
|
$.phone = user.split(strSplitor)[4];
|
||||||
|
$.uid = user.split(strSplitor)[5];
|
||||||
|
$.ckStatus = true;
|
||||||
|
await getToken()
|
||||||
|
if ($.access_token) {
|
||||||
|
await signIn()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await $.sendMsg($.logs.join("\n"));
|
||||||
|
})()
|
||||||
|
.catch((e) => console.log(e))
|
||||||
|
.finally(() => $.done());
|
||||||
|
async function getToken() {
|
||||||
|
let config = {
|
||||||
|
method: 'GET',
|
||||||
|
url: `https://gateway.fengxuan.cn/Identity/API_Authen/Get_Token?pid=&key=${$.key}&secret=${$.secret}&openid=&unionid=&appid=`,
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220089 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android',
|
||||||
|
'Accept-Encoding': 'gzip,compress,br,deflate',
|
||||||
|
'authorization': '',
|
||||||
|
'charset': 'utf-8',
|
||||||
|
'content-type': 'application/x-www-form-urlencoded',
|
||||||
|
'Referer': 'https://servicewechat.com/wxf1b4741159cb8b06/43/page-frame.html'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let { data: result } = await Request(config);
|
||||||
|
if (result?.code == 0) {
|
||||||
|
$.access_token = result.access_token
|
||||||
|
$.bid = result.bid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function signIn() {
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
method: 'POST',
|
||||||
|
url: `https://gateway.fengxuan.cn/QianDao/API_Sign/Save_User_Sign_Detail?bid=${$.bid}&pid=${$.pid}`,
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220089 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android',
|
||||||
|
'Accept-Encoding': 'gzip,compress,br,deflate',
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
|
'authorization': 'Bearer ' + $.access_token,
|
||||||
|
'charset': 'utf-8',
|
||||||
|
'Referer': 'https://servicewechat.com/wxf1b4741159cb8b06/43/page-frame.html'
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
'phone': $.phone,
|
||||||
|
'unionid': $.unionid,
|
||||||
|
'uid': $.uid,
|
||||||
|
'type': '1',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config);
|
||||||
|
if (result?.code == 0) {
|
||||||
|
$.log(`签到状态[${result.msg}]`)
|
||||||
|
} else {
|
||||||
|
$.log(`签到状态[${result.msg}]`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function checkEnv(userCookie) {
|
||||||
|
const envSplitor = ["&", "\n"];
|
||||||
|
//console.log(userCookie);
|
||||||
|
let userList = userCookie
|
||||||
|
.split(envSplitor.find((o) => userCookie.includes(o)) || "&")
|
||||||
|
.filter((n) => n);
|
||||||
|
console.log(`共找到${userList.length}个账号`);
|
||||||
|
return userList;
|
||||||
|
}
|
||||||
|
// prettier-ignore
|
||||||
|
function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`).join("&") } getURLParams(url) { const params = {}; const queryString = url.split("?")[1]; if (queryString) { const paramPairs = queryString.split("&"); paramPairs.forEach((pair) => { const [key, value] = pair.split("="); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === "object" } catch (e) { return false } } isJson(obj) { var isjson = typeof obj == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if (this.isNode()) { await notify.sendNotify(this.name, message) } else { this.msg(this.name, "", message) } } randomNumber(length) { const characters = "0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } randomString(length) { const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) { new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))) } return t } msg(title = t, subtitle = "", body = "", options) { const formatOptions = (options) => { if (!options) { return options } else if (typeof options === "string") { if (this.isQuanX()) { return { "open-url": options } } else { return undefined } } else if (typeof options === "object" && (options["open-url"] || options["media-url"])) { if (this.isQuanX()) { return options } else { return undefined } } else { return undefined } }; if (!this.isMute) { if (this.isQuanX()) { $notify(title, subtitle, body, formatOptions(options)) } } let logs = ["", "==============📣系统通知📣=============="]; logs.push(title); subtitle ? logs.push(subtitle) : ""; body ? logs.push(body) : ""; console.log(logs.join("\n")); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isQuanX(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) }
|
||||||
|
|
||||||
|
async function Request(options) {
|
||||||
|
if ($.isNode()) {
|
||||||
|
const axios = require("axios");
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await axios.request(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if ($.isQuanX()) {
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await $task.fetch(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return await Request(options);
|
||||||
|
}
|
||||||
156
卡池.js
Normal file
156
卡池.js
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
/*
|
||||||
|
------------------------------------------
|
||||||
|
@Author: smallfawn 860562056
|
||||||
|
@Date: 2024.06.11 18:52
|
||||||
|
@Description: 卡池权益会员店 小程序 一周签到大概50积分 500换5花费
|
||||||
|
------------------------------------------
|
||||||
|
变量名 kachi
|
||||||
|
变量值 点击我的 ID 填入 多账号&或换行或新建同名变量
|
||||||
|
[Script]
|
||||||
|
http-response
|
||||||
|
|
||||||
|
[MITM]
|
||||||
|
hostname =
|
||||||
|
|
||||||
|
⚠️【免责声明】
|
||||||
|
------------------------------------------
|
||||||
|
1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
|
||||||
|
2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。
|
||||||
|
3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。
|
||||||
|
4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。
|
||||||
|
5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。
|
||||||
|
6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。
|
||||||
|
7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。
|
||||||
|
*/
|
||||||
|
|
||||||
|
const $ = new Env("卡池权益会员店");
|
||||||
|
let ckName = `kachi`;
|
||||||
|
let userCookie = checkEnv(
|
||||||
|
($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""
|
||||||
|
);
|
||||||
|
const notify = $.isNode() ? require("./sendNotify") : "";
|
||||||
|
|
||||||
|
!(async () => {
|
||||||
|
console.log(
|
||||||
|
`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
|
||||||
|
new Date().getTime() +
|
||||||
|
new Date().getTimezoneOffset() * 60 * 1000 +
|
||||||
|
8 * 60 * 60 * 1000
|
||||||
|
).toLocaleString()} \n==================================================`
|
||||||
|
);
|
||||||
|
//console.log(userCookie)
|
||||||
|
if (!userCookie?.length) return console.log(`没有找到CK哦`);
|
||||||
|
let index = 1;
|
||||||
|
let strSplitor = "#";
|
||||||
|
|
||||||
|
for (let user of userCookie) {
|
||||||
|
$.log(`\n🚀 user:【${index}】 start work\n`);
|
||||||
|
index++
|
||||||
|
$.userId = user
|
||||||
|
$.ckStatus = true;
|
||||||
|
await initJifen()
|
||||||
|
}
|
||||||
|
|
||||||
|
await $.sendMsg($.logs.join("\n"));
|
||||||
|
})()
|
||||||
|
.catch((e) => console.log(e))
|
||||||
|
.finally(() => $.done());
|
||||||
|
async function initJifen() {
|
||||||
|
let config = {
|
||||||
|
url: `https://wx.wpool.cn/kqcentersp.do`,
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
"Accept": "*/*",
|
||||||
|
"Accept-Encoding": "gzip, deflate, br",
|
||||||
|
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||||
|
"Connection": "keep-alive",
|
||||||
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
|
"Cookie": "",
|
||||||
|
"Host": "wx.wpool.cn",
|
||||||
|
"Referer": "https://servicewechat.com/wxdae71fc43b208fff/63/page-frame.html",
|
||||||
|
"Sec-Fetch-Dest": "empty",
|
||||||
|
"Sec-Fetch-Mode": "cors",
|
||||||
|
"Sec-Fetch-Site": "cross-site",
|
||||||
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309092b) XWEB/8555",
|
||||||
|
"xweb_xhr": "1"
|
||||||
|
},
|
||||||
|
data: `kqapp=1&plantform=0&userid=${$.userId}`
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config);
|
||||||
|
if (result?.result == "ok") {
|
||||||
|
$.log(`当前积分[${result.data.userAccount.coupons}]`)
|
||||||
|
if (result.data.signData.nowsign.sign !== 1) {
|
||||||
|
$.log(`开始签到`);
|
||||||
|
await signIn(result.data.signData.nowsign.jifen)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$.log(`今天已经签到过了`);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$.log(`获取签到信息失败 [${JSON.stringify(result)}]`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function signIn(jifen) {
|
||||||
|
let config = {
|
||||||
|
url: `https://wx.wpool.cn/senvendaydosignsp.do`,
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
"Accept": "*/*",
|
||||||
|
"Accept-Encoding": "gzip, deflate, br",
|
||||||
|
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||||
|
"Connection": "keep-alive",
|
||||||
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
|
"Cookie": "",
|
||||||
|
"Host": "wx.wpool.cn",
|
||||||
|
"Referer": "https://servicewechat.com/wxdae71fc43b208fff/63/page-frame.html",
|
||||||
|
"Sec-Fetch-Dest": "empty",
|
||||||
|
"Sec-Fetch-Mode": "cors",
|
||||||
|
"Sec-Fetch-Site": "cross-site",
|
||||||
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309092b) XWEB/8555",
|
||||||
|
"xweb_xhr": "1"
|
||||||
|
},
|
||||||
|
data: `userid=${$.userId}&jifen=${jifen}&indexday=0&plantform=3`
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config);
|
||||||
|
if (result?.result == "ok") {
|
||||||
|
$.log(`签到成功`);
|
||||||
|
} else {
|
||||||
|
$.log(`签到失败 [${JSON.stringify(result)}]`);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkEnv(userCookie) {
|
||||||
|
const envSplitor = ["&", "\n"];
|
||||||
|
//console.log(userCookie);
|
||||||
|
let userList = userCookie
|
||||||
|
.split(envSplitor.find((o) => userCookie.includes(o)) || "&")
|
||||||
|
.filter((n) => n);
|
||||||
|
console.log(`共找到${userList.length}个账号`);
|
||||||
|
return userList;
|
||||||
|
}
|
||||||
|
// prettier-ignore
|
||||||
|
function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`).join("&") } getURLParams(url) { const params = {}; const queryString = url.split("?")[1]; if (queryString) { const paramPairs = queryString.split("&"); paramPairs.forEach((pair) => { const [key, value] = pair.split("="); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === "object" } catch (e) { return false } } isJson(obj) { var isjson = typeof obj == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if (this.isNode()) { await notify.sendNotify(this.name, message) } else { this.msg(this.name, "", message) } } randomNumber(length) { const characters = "0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } randomString(length) { const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) { new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))) } return t } msg(title = t, subtitle = "", body = "", options) { const formatOptions = (options) => { if (!options) { return options } else if (typeof options === "string") { if (this.isQuanX()) { return { "open-url": options } } else { return undefined } } else if (typeof options === "object" && (options["open-url"] || options["media-url"])) { if (this.isQuanX()) { return options } else { return undefined } } else { return undefined } }; if (!this.isMute) { if (this.isQuanX()) { $notify(title, subtitle, body, formatOptions(options)) } } let logs = ["", "==============📣系统通知📣=============="]; logs.push(title); subtitle ? logs.push(subtitle) : ""; body ? logs.push(body) : ""; console.log(logs.join("\n")); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isQuanX(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) }
|
||||||
|
|
||||||
|
async function Request(options) {
|
||||||
|
if ($.isNode()) {
|
||||||
|
const axios = require("axios");
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await axios.request(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if ($.isQuanX()) {
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await $task.fetch(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return await Request(options);
|
||||||
|
}
|
||||||
165
古井贡酒.js
Normal file
165
古井贡酒.js
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
/*
|
||||||
|
------------------------------------------
|
||||||
|
@Author: smallfawn 860562056
|
||||||
|
@Date: 2024.06.09 12.40
|
||||||
|
@Description: 古井贡酒会员中心小程序
|
||||||
|
------------------------------------------
|
||||||
|
变量名 gujing
|
||||||
|
值 https://scrm.gujing.com/gujing_scrm/ 请求头Headers中的Access-Token的值 多账号&或换行或新建同名变量
|
||||||
|
|
||||||
|
[Script]
|
||||||
|
http-response
|
||||||
|
|
||||||
|
[MITM]
|
||||||
|
hostname =
|
||||||
|
|
||||||
|
⚠️【免责声明】
|
||||||
|
------------------------------------------
|
||||||
|
1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
|
||||||
|
2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。
|
||||||
|
3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。
|
||||||
|
4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。
|
||||||
|
5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。
|
||||||
|
6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。
|
||||||
|
7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。
|
||||||
|
*/
|
||||||
|
|
||||||
|
const $ = new Env("古井贡酒会员中心小程序");
|
||||||
|
let ckName = `gujing`;
|
||||||
|
let userCookie = checkEnv(
|
||||||
|
($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""
|
||||||
|
);
|
||||||
|
const notify = $.isNode() ? require("./sendNotify") : "";
|
||||||
|
|
||||||
|
!(async () => {
|
||||||
|
console.log(
|
||||||
|
`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
|
||||||
|
new Date().getTime() +
|
||||||
|
new Date().getTimezoneOffset() * 60 * 1000 +
|
||||||
|
8 * 60 * 60 * 1000
|
||||||
|
).toLocaleString()} \n==================================================`
|
||||||
|
);
|
||||||
|
//console.log(userCookie)
|
||||||
|
if (!userCookie?.length) return console.log(`没有找到CK哦`);
|
||||||
|
let index = 1;
|
||||||
|
let strSplitor = "#";
|
||||||
|
|
||||||
|
for (let user of userCookie) {
|
||||||
|
$.log(`\n🚀 user:【${index}】 start work\n`);
|
||||||
|
index++
|
||||||
|
$.token = user
|
||||||
|
$.ckStatus = true;
|
||||||
|
await search()
|
||||||
|
}
|
||||||
|
|
||||||
|
await $.sendMsg($.logs.join("\n"));
|
||||||
|
})()
|
||||||
|
.catch((e) => console.log(e))
|
||||||
|
.finally(() => $.done());
|
||||||
|
async function search() {
|
||||||
|
let data = JSON.stringify({
|
||||||
|
"activityId": "110001000",
|
||||||
|
"preview": false
|
||||||
|
});
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
method: 'POST',
|
||||||
|
url: 'https://scrm.gujing.com/gujing_scrm/wxclient/mkt/activities/sign:search',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220089 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wxba9855bdb1a45c8e',
|
||||||
|
'Accept': 'application/json, text/plain, */*',
|
||||||
|
'sec-ch-ua': '"Chromium";v="122", "Not(A:Brand";v="24", "Android WebView";v="122"',
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8',
|
||||||
|
'sec-ch-ua-mobile': '?1',
|
||||||
|
'Access-Token': $.token,
|
||||||
|
'sec-ch-ua-platform': '"Android"',
|
||||||
|
'Origin': 'https://scrm.gujing.com',
|
||||||
|
'X-Requested-With': 'com.tencent.mm',
|
||||||
|
'Sec-Fetch-Site': 'same-origin',
|
||||||
|
'Sec-Fetch-Mode': 'cors',
|
||||||
|
'Sec-Fetch-Dest': 'empty',
|
||||||
|
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
|
||||||
|
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
};
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.code == 200) {
|
||||||
|
if (result.content.signed !== 1) {
|
||||||
|
$.log(`未签到 ===> 签到ing`)
|
||||||
|
await signIn()
|
||||||
|
} else {
|
||||||
|
$.log(`已签到 ===> 什么都不做`)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$.log(`签到查询失败 [${JSON.stringify(result)}]`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function signIn() {
|
||||||
|
let data = JSON.stringify({
|
||||||
|
"activityId": "110001000",
|
||||||
|
"preview": false
|
||||||
|
});
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
method: 'POST',
|
||||||
|
url: 'https://scrm.gujing.com/gujing_scrm/wxclient/mkt/activities/sign:search',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220089 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wxba9855bdb1a45c8e',
|
||||||
|
'Accept': 'application/json, text/plain, */*',
|
||||||
|
'sec-ch-ua': '"Chromium";v="122", "Not(A:Brand";v="24", "Android WebView";v="122"',
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8',
|
||||||
|
'sec-ch-ua-mobile': '?1',
|
||||||
|
'Access-Token': $.token,
|
||||||
|
'sec-ch-ua-platform': '"Android"',
|
||||||
|
'Origin': 'https://scrm.gujing.com',
|
||||||
|
'X-Requested-With': 'com.tencent.mm',
|
||||||
|
'Sec-Fetch-Site': 'same-origin',
|
||||||
|
'Sec-Fetch-Mode': 'cors',
|
||||||
|
'Sec-Fetch-Dest': 'empty',
|
||||||
|
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
};
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.code == 200) {
|
||||||
|
$.log(`签到成功 获得积分[${result.content.point}]`)
|
||||||
|
} else {
|
||||||
|
$.log(`签到失败 [${result.chnDesc}]`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkEnv(userCookie) {
|
||||||
|
const envSplitor = ["&", "\n"];
|
||||||
|
//console.log(userCookie);
|
||||||
|
let userList = userCookie
|
||||||
|
.split(envSplitor.find((o) => userCookie.includes(o)) || "&")
|
||||||
|
.filter((n) => n);
|
||||||
|
console.log(`共找到${userList.length}个账号`);
|
||||||
|
return userList;
|
||||||
|
}
|
||||||
|
// prettier-ignore
|
||||||
|
function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`).join("&") } getURLParams(url) { const params = {}; const queryString = url.split("?")[1]; if (queryString) { const paramPairs = queryString.split("&"); paramPairs.forEach((pair) => { const [key, value] = pair.split("="); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === "object" } catch (e) { return false } } isJson(obj) { var isjson = typeof obj == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if (this.isNode()) { await notify.sendNotify(this.name, message) } else { this.msg(this.name, "", message) } } randomNumber(length) { const characters = "0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } randomString(length) { const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) { new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))) } return t } msg(title = t, subtitle = "", body = "", options) { const formatOptions = (options) => { if (!options) { return options } else if (typeof options === "string") { if (this.isQuanX()) { return { "open-url": options } } else { return undefined } } else if (typeof options === "object" && (options["open-url"] || options["media-url"])) { if (this.isQuanX()) { return options } else { return undefined } } else { return undefined } }; if (!this.isMute) { if (this.isQuanX()) { $notify(title, subtitle, body, formatOptions(options)) } } let logs = ["", "==============📣系统通知📣=============="]; logs.push(title); subtitle ? logs.push(subtitle) : ""; body ? logs.push(body) : ""; console.log(logs.join("\n")); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isQuanX(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) }
|
||||||
|
|
||||||
|
async function Request(options) {
|
||||||
|
if ($.isNode()) {
|
||||||
|
const axios = require("axios");
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await axios.request(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if ($.isQuanX()) {
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await $task.fetch(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return await Request(options);
|
||||||
|
}
|
||||||
174
媓钻小程序.js
Normal file
174
媓钻小程序.js
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
/*
|
||||||
|
------------------------------------------
|
||||||
|
@Author: sm
|
||||||
|
@Date: 2024.06.08 13.38
|
||||||
|
@Description: 媓钻 小程序 赛龙舟活动 每天抽奖2-3次
|
||||||
|
------------------------------------------
|
||||||
|
变量名huangzuan_WX
|
||||||
|
变量值https://api.hzyxhfp.com/api/ 请求头Headers中authorization的值 去掉Bearer 多账号&或换行或新建同名变量
|
||||||
|
[Script]
|
||||||
|
http-response
|
||||||
|
|
||||||
|
[MITM]
|
||||||
|
hostname =
|
||||||
|
|
||||||
|
⚠️【免责声明】
|
||||||
|
------------------------------------------
|
||||||
|
1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
|
||||||
|
2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。
|
||||||
|
3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。
|
||||||
|
4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。
|
||||||
|
5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。
|
||||||
|
6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。
|
||||||
|
7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。
|
||||||
|
*/
|
||||||
|
|
||||||
|
const $ = new Env("媓钻小程序");
|
||||||
|
let ckName = `huangzuan_WX`;
|
||||||
|
let userCookie = checkEnv(
|
||||||
|
($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""
|
||||||
|
);
|
||||||
|
const notify = $.isNode() ? require("./sendNotify") : "";
|
||||||
|
|
||||||
|
!(async () => {
|
||||||
|
console.log(
|
||||||
|
`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
|
||||||
|
new Date().getTime() +
|
||||||
|
new Date().getTimezoneOffset() * 60 * 1000 +
|
||||||
|
8 * 60 * 60 * 1000
|
||||||
|
).toLocaleString()} \n==================================================`
|
||||||
|
);
|
||||||
|
//console.log(userCookie)
|
||||||
|
if (!userCookie?.length) return console.log(`没有找到CK哦`);
|
||||||
|
let index = 0;
|
||||||
|
//let strSplitor = "#";
|
||||||
|
|
||||||
|
for (let user of userCookie) {
|
||||||
|
$.log(`\n🚀 user:【${index || ++index}】 start work\n`);
|
||||||
|
$.token = user
|
||||||
|
$.ckStatus = false;
|
||||||
|
await signIn()
|
||||||
|
for (let i = 0; i < 2; i++) {
|
||||||
|
await play()
|
||||||
|
await $.wait(5000)
|
||||||
|
|
||||||
|
if ($.ckStatus) {
|
||||||
|
await lottery()
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
await $.sendMsg($.logs.join("\n"));
|
||||||
|
})()
|
||||||
|
.catch((e) => console.log(e))
|
||||||
|
.finally(() => $.done());
|
||||||
|
//取150-200随机数
|
||||||
|
function getRandomInt(min, max) {
|
||||||
|
min = Math.ceil(min);
|
||||||
|
max = Math.floor(max);
|
||||||
|
return Math.floor(Math.random() * (max - min)) + min; //不含最大值,含最小值
|
||||||
|
}
|
||||||
|
async function signIn() {
|
||||||
|
|
||||||
|
let data = JSON.stringify({});
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
method: 'POST',
|
||||||
|
url: 'https://api.hzyxhfp.com/api/signInLog/addSignIn',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220067 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android',
|
||||||
|
'Accept-Encoding': 'gzip,compress,br,deflate',
|
||||||
|
'app': 'wx3df7476c42cace5d',
|
||||||
|
'authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2FwaS5oenl4aGZwLmNvbS9hcGkveWZtR2V0QXV0aFVzZXIiLCJpYXQiOjE3MTc4MjQ4NzMsImV4cCI6MjMxNzgyNDgxMywibmJmIjoxNzE3ODI0ODczLCJqdGkiOiJxdWRGcUlLaHRxWUd3Y0dIIiwic3ViIjozMDIwMTk5LCJwcnYiOiJjNzdlYWJjNmQyOWRiY2UwYjU1ZTk4YmRlYzM5MWI1NDlhNWVmMWYwIn0.0akWVLgE0Bd8_a-EOIQiC8dB_xiiOc2Y40xIVQnBRkU',
|
||||||
|
'charset': 'utf-8',
|
||||||
|
'content-type': 'application/json;charset=UTF-8',
|
||||||
|
'Referer': 'https://servicewechat.com/wx3df7476c42cace5d/370/page-frame.html'
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
};
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
result?.code == 0 ? ($.log(`签到成功 已签到[${result.data.cont_days}]天`)) : ($.log(`签到失败`), console.log(JSON.stringify(result)))
|
||||||
|
|
||||||
|
}
|
||||||
|
async function play() {
|
||||||
|
let data = JSON.stringify({
|
||||||
|
"id": "1",
|
||||||
|
"score": getRandomInt(150, 200)
|
||||||
|
});
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
method: 'POST',
|
||||||
|
url: 'https://api.hzyxhfp.com/api/dragonActivity/addDragonScore',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220067 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android',
|
||||||
|
'Accept-Encoding': 'gzip,compress,br,deflate',
|
||||||
|
'app': 'wx3df7476c42cace5d',
|
||||||
|
'authorization': 'Bearer ' + $.token,
|
||||||
|
'charset': 'utf-8',
|
||||||
|
'content-type': 'application/json;charset=UTF-8',
|
||||||
|
'Referer': 'https://servicewechat.com/wx3df7476c42cace5d/370/page-frame.html'
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
};
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
result?.code == 0 ? ($.log(`游戏成功`), $.ckStatus = true) : ($.log(`游戏失败`), console.log(JSON.stringify(result)))
|
||||||
|
}
|
||||||
|
async function lottery() {
|
||||||
|
let data = JSON.stringify({
|
||||||
|
"id": "1"
|
||||||
|
});
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
method: 'POST',
|
||||||
|
url: 'https://api.hzyxhfp.com/api/dragonActivity/getDragonPrizeResult',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220067 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android',
|
||||||
|
'Accept-Encoding': 'gzip,compress,br,deflate',
|
||||||
|
'app': 'wx3df7476c42cace5d',
|
||||||
|
'authorization': 'Bearer ' + $.token,
|
||||||
|
'charset': 'utf-8',
|
||||||
|
'content-type': 'application/json;charset=UTF-8',
|
||||||
|
'Referer': 'https://servicewechat.com/wx3df7476c42cace5d/370/page-frame.html'
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
};
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
result?.code == 0 ? $.log(`抽奖[${result.data.title}]`) : ($.log(`抽奖失败`), console.log(JSON.stringify(result)))
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkEnv(userCookie) {
|
||||||
|
const envSplitor = ["&", "\n"];
|
||||||
|
console.log(userCookie);
|
||||||
|
let userList = userCookie
|
||||||
|
.split(envSplitor.find((o) => userCookie.includes(o)) || "&")
|
||||||
|
.filter((n) => n);
|
||||||
|
console.log(`共找到${userList.length}个账号`);
|
||||||
|
return userList;
|
||||||
|
}
|
||||||
|
// prettier-ignore
|
||||||
|
function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`).join("&") } getURLParams(url) { const params = {}; const queryString = url.split("?")[1]; if (queryString) { const paramPairs = queryString.split("&"); paramPairs.forEach((pair) => { const [key, value] = pair.split("="); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === "object" } catch (e) { return false } } isJson(obj) { var isjson = typeof obj == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if (this.isNode()) { await notify.sendNotify(this.name, message) } else { this.msg(this.name, "", message) } } randomNumber(length) { const characters = "0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } randomString(length) { const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) { new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))) } return t } msg(title = t, subtitle = "", body = "", options) { const formatOptions = (options) => { if (!options) { return options } else if (typeof options === "string") { if (this.isQuanX()) { return { "open-url": options } } else { return undefined } } else if (typeof options === "object" && (options["open-url"] || options["media-url"])) { if (this.isQuanX()) { return options } else { return undefined } } else { return undefined } }; if (!this.isMute) { if (this.isQuanX()) { $notify(title, subtitle, body, formatOptions(options)) } } let logs = ["", "==============📣系统通知📣=============="]; logs.push(title); subtitle ? logs.push(subtitle) : ""; body ? logs.push(body) : ""; console.log(logs.join("\n")); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isQuanX(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) }
|
||||||
|
|
||||||
|
async function Request(options) {
|
||||||
|
if ($.isNode()) {
|
||||||
|
const axios = require("axios");
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await axios.request(options);
|
||||||
|
} catch (error) {
|
||||||
|
throw error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if ($.isQuanX()) {
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await $task.fetch(options);
|
||||||
|
} catch (error) {
|
||||||
|
throw error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return await Request(options);
|
||||||
|
}
|
||||||
110
小猴工具小程序.js
Normal file
110
小猴工具小程序.js
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
/*
|
||||||
|
------------------------------------------
|
||||||
|
@Author: smallfawn 860562056
|
||||||
|
@Date: 2024.06.08 13.21
|
||||||
|
@Description: 小猴工具小程序
|
||||||
|
------------------------------------------
|
||||||
|
自己先签到一次 抓请求包https://h5.youzan.com/wscump/checkin/checkinV2.json 后面Url的checkinId和请求头Headers中extra-data里面sid的值
|
||||||
|
#拼接 多账号&或换行或新建同名变量
|
||||||
|
[Script]
|
||||||
|
http-response
|
||||||
|
|
||||||
|
[MITM]
|
||||||
|
hostname =
|
||||||
|
|
||||||
|
⚠️【免责声明】
|
||||||
|
------------------------------------------
|
||||||
|
1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
|
||||||
|
2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。
|
||||||
|
3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。
|
||||||
|
4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。
|
||||||
|
5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。
|
||||||
|
6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。
|
||||||
|
7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。
|
||||||
|
*/
|
||||||
|
|
||||||
|
const $ = new Env("小猴工具小程序");
|
||||||
|
let ckName = `Monkey_WX`;
|
||||||
|
let userCookie = checkEnv(
|
||||||
|
($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""
|
||||||
|
);
|
||||||
|
const notify = $.isNode() ? require("./sendNotify") : "";
|
||||||
|
|
||||||
|
!(async () => {
|
||||||
|
console.log(
|
||||||
|
`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
|
||||||
|
new Date().getTime() +
|
||||||
|
new Date().getTimezoneOffset() * 60 * 1000 +
|
||||||
|
8 * 60 * 60 * 1000
|
||||||
|
).toLocaleString()} \n==================================================`
|
||||||
|
);
|
||||||
|
//console.log(userCookie)
|
||||||
|
if (!userCookie?.length) return console.log(`没有找到CK哦`);
|
||||||
|
let index = 0;
|
||||||
|
let strSplitor = "#";
|
||||||
|
|
||||||
|
for (let user of userCookie) {
|
||||||
|
$.log(`\n🚀 user:【${index || ++index}】 start work\n`);
|
||||||
|
$.checkInId = user.split(strSplitor)[0];
|
||||||
|
$.sid = user.split(strSplitor)[1];
|
||||||
|
await signIn();
|
||||||
|
}
|
||||||
|
|
||||||
|
await $.sendMsg($.logs.join("\n"));
|
||||||
|
})()
|
||||||
|
.catch((e) => console.log(e))
|
||||||
|
.finally(() => $.done());
|
||||||
|
async function signIn() {
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
method: 'GET',
|
||||||
|
url: 'https://h5.youzan.com/wscump/checkin/checkinV2.json?checkinId=' + $.checkInId + '&app_id=&kdt_id=&access_token=',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220067 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android',
|
||||||
|
'Accept-Encoding': 'gzip,compress,br,deflate',
|
||||||
|
'charset': 'utf-8',
|
||||||
|
'content-type': 'application/json',
|
||||||
|
'extra-data': '{"is_weapp":1,"sid":"' + $.sid + '","version":"2.154.3.101","client":"weapp","bizEnv":"wsc","uuid":"","ftime":""}',
|
||||||
|
'referer': 'https://servicewechat.com/wx0451bbda59c220a8/95/page-frame.html'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
result?.code == 0 ? $.log(`签到成功`) : $.log(`签到失败`); console.log(JSON.stringify(result));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function checkEnv(userCookie) {
|
||||||
|
const envSplitor = ["&", "\n"];
|
||||||
|
//console.log(userCookie);
|
||||||
|
let userList = userCookie
|
||||||
|
.split(envSplitor.find((o) => userCookie.includes(o)) || "&")
|
||||||
|
.filter((n) => n);
|
||||||
|
console.log(`共找到${userList.length}个账号`);
|
||||||
|
return userList;
|
||||||
|
}
|
||||||
|
// prettier-ignore
|
||||||
|
function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`).join("&") } getURLParams(url) { const params = {}; const queryString = url.split("?")[1]; if (queryString) { const paramPairs = queryString.split("&"); paramPairs.forEach((pair) => { const [key, value] = pair.split("="); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === "object" } catch (e) { return false } } isJson(obj) { var isjson = typeof obj == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if (this.isNode()) { await notify.sendNotify(this.name, message) } else { this.msg(this.name, "", message) } } randomNumber(length) { const characters = "0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } randomString(length) { const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) { new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))) } return t } msg(title = t, subtitle = "", body = "", options) { const formatOptions = (options) => { if (!options) { return options } else if (typeof options === "string") { if (this.isQuanX()) { return { "open-url": options } } else { return undefined } } else if (typeof options === "object" && (options["open-url"] || options["media-url"])) { if (this.isQuanX()) { return options } else { return undefined } } else { return undefined } }; if (!this.isMute) { if (this.isQuanX()) { $notify(title, subtitle, body, formatOptions(options)) } } let logs = ["", "==============📣系统通知📣=============="]; logs.push(title); subtitle ? logs.push(subtitle) : ""; body ? logs.push(body) : ""; console.log(logs.join("\n")); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isQuanX(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) }
|
||||||
|
|
||||||
|
async function Request(options) {
|
||||||
|
if ($.isNode()) {
|
||||||
|
const axios = require("axios");
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await axios.request(options);
|
||||||
|
} catch (error) {
|
||||||
|
throw error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if ($.isQuanX()) {
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await $task.fetch(options);
|
||||||
|
} catch (error) {
|
||||||
|
throw error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return await Request(options);
|
||||||
|
}
|
||||||
139
巨量ip_Sign.py
Normal file
139
巨量ip_Sign.py
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
* 仅供学习交流,请在下载后的24小时内完全删除 请勿将任何内容用于商业或非法目的,否则后果自负。
|
||||||
|
* 巨量ip签到。每日签到领取1000免费IP
|
||||||
|
* 巨量ip注册地址 https://www.juliangip.com/user/reg?inviteCode=1017082
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
# # # # # # # # # # #
|
||||||
|
|
||||||
|
import json
|
||||||
|
import re
|
||||||
|
|
||||||
|
import requests
|
||||||
|
import urllib3
|
||||||
|
from urllib3.exceptions import InsecureRequestWarning
|
||||||
|
|
||||||
|
urllib3.disable_warnings(InsecureRequestWarning)
|
||||||
|
token = "填写token"
|
||||||
|
username = "填入你的巨量账号"
|
||||||
|
password = "填入你的巨量密码"
|
||||||
|
|
||||||
|
def jl_login(username, password):
|
||||||
|
url = "https://www.juliangip.com/login/go"
|
||||||
|
payload = f'type=password&username={username}&password={password}&sms_code='
|
||||||
|
headers = {
|
||||||
|
'Accept': 'application/json, text/javascript, */*; q=0.01',
|
||||||
|
'Accept-Encoding': 'gzip, deflate, br',
|
||||||
|
'Accept-Language': 'zh-CN,zh;q=0.9',
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
||||||
|
'Origin': 'https://www.juliangip.com',
|
||||||
|
'Referer': 'https://www.juliangip.com/user/login',
|
||||||
|
'Sec-Ch-Ua': '"Microsoft Edge";v="117", "Not;A=Brand";v="8", "Chromium";v="117"',
|
||||||
|
'Sec-Ch-Ua-Mobile': '?0',
|
||||||
|
'Sec-Ch-Ua-Platform': '"Windows"',
|
||||||
|
'Sec-Fetch-Dest': 'empty',
|
||||||
|
'Sec-Fetch-Mode': 'cors',
|
||||||
|
'Sec-Fetch-Site': 'same-origin',
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 Edg/117.0.2045.43',
|
||||||
|
'X-Requested-With': 'XMLHttpRequest'
|
||||||
|
}
|
||||||
|
|
||||||
|
response = requests.request("POST", url, headers=headers, data=payload, verify=False)
|
||||||
|
if response.status_code == 200:
|
||||||
|
return "_JSID=" + response.cookies.get("_JSID")
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def jl_users(tk):
|
||||||
|
url = "https://www.juliangip.com/users/"
|
||||||
|
headers = {
|
||||||
|
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
|
||||||
|
'Accept-Language': 'zh-CN,zh;q=0.9',
|
||||||
|
'Sec-Ch-Ua': '"Microsoft Edge";v="117", "Not;A=Brand";v="8", "Chromium";v="117"',
|
||||||
|
'Sec-Ch-Ua-Mobile': '?0',
|
||||||
|
'Sec-Ch-Ua-Platform': '"Windows"',
|
||||||
|
'Sec-Fetch-Dest': 'empty',
|
||||||
|
'Sec-Fetch-Mode': 'cors',
|
||||||
|
"Cookie": tk,
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 Edg/117.0.2045.43',
|
||||||
|
}
|
||||||
|
response = requests.get(url, headers=headers, verify=False)
|
||||||
|
if response.status_code == 200:
|
||||||
|
return re.findall("const tx =new TencentCaptcha\('(\d+)'", response.text)
|
||||||
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
def getcode(aid):
|
||||||
|
url = "http://119.96.239.11:8888/api/getcode"
|
||||||
|
headers = {
|
||||||
|
"Content-Type": "application/json"
|
||||||
|
}
|
||||||
|
data = {
|
||||||
|
"timeout": "90", # 超时时间 请确保http请求超时>该参数,否则识别成功但连接已断开失败
|
||||||
|
"type": "tencent-turing", # 类型
|
||||||
|
"appid": aid, # 抓包所得aid/appid/id参数 tencent[aid/appid] netease[id]
|
||||||
|
"token": token, # 用户token 用于识别区分用户
|
||||||
|
"developeraccount": "" # 软件开发者用户名 //可空
|
||||||
|
}
|
||||||
|
response = requests.post(url, headers=headers, verify=False, timeout=90, data=json.dumps(data))
|
||||||
|
if response.status_code == 200:
|
||||||
|
if response.json()['status'] == 200:
|
||||||
|
return response.json()
|
||||||
|
else:
|
||||||
|
print(response.json())
|
||||||
|
return {}
|
||||||
|
return {}
|
||||||
|
|
||||||
|
|
||||||
|
def getFree(tk, js):
|
||||||
|
headers = {
|
||||||
|
"Host": "www.juliangip.com",
|
||||||
|
"Cookie": tk,
|
||||||
|
"sec-ch-ua": "\"Microsoft Edge\";v=\"117\", \"Not;A=Brand\";v=\"8\", \"Chromium\";v=\"117\"",
|
||||||
|
"accept": "*/*",
|
||||||
|
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
|
||||||
|
"x-requested-with": "XMLHttpRequest",
|
||||||
|
"sec-ch-ua-mobile": "?0",
|
||||||
|
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 Edg/117.0.2045.43",
|
||||||
|
"sec-ch-ua-platform": "\"Windows\"",
|
||||||
|
"origin": "https://www.juliangip.com",
|
||||||
|
"sec-fetch-site": "same-origin",
|
||||||
|
"sec-fetch-mode": "cors",
|
||||||
|
"sec-fetch-dest": "empty",
|
||||||
|
"referer": "https://www.juliangip.com/users/",
|
||||||
|
"accept-language": "zh-CN,zh;q=0.9"
|
||||||
|
}
|
||||||
|
data_js = json.loads(js['data']['code'])
|
||||||
|
data = {
|
||||||
|
"randStr": data_js['randstr'],
|
||||||
|
"ticket": data_js["ticket"]
|
||||||
|
}
|
||||||
|
url = "https://www.juliangip.com/users/getFree"
|
||||||
|
response = requests.post(url, headers=headers, data=data,
|
||||||
|
verify=False) # 注意:verify=False 用于禁用SSL验证,如果需要SSL验证,请删除这个参数
|
||||||
|
if response.status_code == 200:
|
||||||
|
print(response.json())
|
||||||
|
else:
|
||||||
|
print(response.text)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
tk = jl_login(username, password)
|
||||||
|
if not tk:
|
||||||
|
print("登录失败")
|
||||||
|
return
|
||||||
|
aid = jl_users(tk)
|
||||||
|
if not aid:
|
||||||
|
print("获取aid失败")
|
||||||
|
return
|
||||||
|
js = getcode(aid[0])
|
||||||
|
if not js:
|
||||||
|
print("获取打码平台失败")
|
||||||
|
return
|
||||||
|
getFree(tk, js)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
118
微信小程序虔金E站.js
Normal file
118
微信小程序虔金E站.js
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
/*
|
||||||
|
------------------------------------------
|
||||||
|
@Author: sm
|
||||||
|
@Date: 2024.06.07 19:15
|
||||||
|
@Description: 微信小程序虔金E站 每日签到
|
||||||
|
------------------------------------------
|
||||||
|
变量名qianjin
|
||||||
|
变量值https://www.xrservice.cn/请求头Headers中Homing-Auth的值 去掉Bearer 多账号&或换行
|
||||||
|
[Script]
|
||||||
|
http-response
|
||||||
|
|
||||||
|
[MITM]
|
||||||
|
hostname =
|
||||||
|
|
||||||
|
⚠️【免责声明】
|
||||||
|
------------------------------------------
|
||||||
|
1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
|
||||||
|
2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。
|
||||||
|
3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。
|
||||||
|
4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。
|
||||||
|
5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。
|
||||||
|
6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。
|
||||||
|
7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。
|
||||||
|
*/
|
||||||
|
|
||||||
|
const $ = new Env("微信小程序虔金E站");
|
||||||
|
let ckName = `qianjin`;
|
||||||
|
let userCookie = checkEnv(
|
||||||
|
($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""
|
||||||
|
);
|
||||||
|
const notify = $.isNode() ? require("./sendNotify") : "";
|
||||||
|
|
||||||
|
!(async () => {
|
||||||
|
console.log(
|
||||||
|
`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
|
||||||
|
new Date().getTime() +
|
||||||
|
new Date().getTimezoneOffset() * 60 * 1000 +
|
||||||
|
8 * 60 * 60 * 1000
|
||||||
|
).toLocaleString()} \n==================================================`
|
||||||
|
);
|
||||||
|
//console.log(userCookie)
|
||||||
|
if (!userCookie?.length) return console.log(`没有找到CK哦`);
|
||||||
|
let index = 0;
|
||||||
|
//let strSplitor = "#";
|
||||||
|
|
||||||
|
for (let user of userCookie) {
|
||||||
|
$.log(`\n🚀 user:【${index || ++index}】 start work\n`);
|
||||||
|
$.ck = user
|
||||||
|
//$.ckStatus = false;
|
||||||
|
await signIn()
|
||||||
|
}
|
||||||
|
|
||||||
|
await $.sendMsg($.logs.join("\n"));
|
||||||
|
})()
|
||||||
|
.catch((e) => console.log(e))
|
||||||
|
.finally(() => $.done());
|
||||||
|
async function signIn() {
|
||||||
|
let config = {
|
||||||
|
method: 'POST',
|
||||||
|
url: 'https://www.xrservice.cn/rayo-gz-fes-back/blade-signin/signin-user/submit',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220067 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx7bda09dcc9affced',
|
||||||
|
'Accept': 'application/json, text/plain, */*',
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'sec-ch-ua': '"Chromium";v="122", "Not(A:Brand";v="24", "Android WebView";v="122"',
|
||||||
|
'Homing-Auth': 'Bearer '+$.ck,
|
||||||
|
'sec-ch-ua-mobile': '?1',
|
||||||
|
//'Authorization': 'Basic aG9taW5nLXd4bHA6UEhPU2J6SEVoRWhkRW4xYWlDSmhnYmJadVQ=',
|
||||||
|
'sec-ch-ua-platform': '"Android"',
|
||||||
|
'Origin': 'https://www.xrservice.cn',
|
||||||
|
'X-Requested-With': 'com.tencent.mm',
|
||||||
|
'Sec-Fetch-Site': 'same-origin',
|
||||||
|
'Sec-Fetch-Mode': 'cors',
|
||||||
|
'Sec-Fetch-Dest': 'empty',
|
||||||
|
'Referer': 'https://www.xrservice.cn/rayo-gz-fes-h5/',
|
||||||
|
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7'
|
||||||
|
},
|
||||||
|
data: JSON.stringify({})
|
||||||
|
};
|
||||||
|
let { data: result } = await Request(config);
|
||||||
|
result?.code == 200 ? $.log(`签到成功`) : $.log(`签到失败`); console.log(JSON.stringify(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function checkEnv(userCookie) {
|
||||||
|
const envSplitor = ["&", "\n"];
|
||||||
|
//console.log(userCookie);
|
||||||
|
let userList = userCookie
|
||||||
|
.split(envSplitor.find((o) => userCookie.includes(o)) || "&")
|
||||||
|
.filter((n) => n);
|
||||||
|
console.log(`共找到${userList.length}个账号`);
|
||||||
|
return userList;
|
||||||
|
}
|
||||||
|
// prettier-ignore
|
||||||
|
function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`).join("&") } getURLParams(url) { const params = {}; const queryString = url.split("?")[1]; if (queryString) { const paramPairs = queryString.split("&"); paramPairs.forEach((pair) => { const [key, value] = pair.split("="); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === "object" } catch (e) { return false } } isJson(obj) { var isjson = typeof obj == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if (this.isNode()) { await notify.sendNotify(this.name, message) } else { this.msg(this.name, "", message) } } randomNumber(length) { const characters = "0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } randomString(length) { const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) { new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))) } return t } msg(title = t, subtitle = "", body = "", options) { const formatOptions = (options) => { if (!options) { return options } else if (typeof options === "string") { if (this.isQuanX()) { return { "open-url": options } } else { return undefined } } else if (typeof options === "object" && (options["open-url"] || options["media-url"])) { if (this.isQuanX()) { return options } else { return undefined } } else { return undefined } }; if (!this.isMute) { if (this.isQuanX()) { $notify(title, subtitle, body, formatOptions(options)) } } let logs = ["", "==============📣系统通知📣=============="]; logs.push(title); subtitle ? logs.push(subtitle) : ""; body ? logs.push(body) : ""; console.log(logs.join("\n")); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isQuanX(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) }
|
||||||
|
|
||||||
|
async function Request(options) {
|
||||||
|
if ($.isNode()) {
|
||||||
|
const axios = require("axios");
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await axios.request(options);
|
||||||
|
} catch (error) {
|
||||||
|
throw error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if ($.isQuanX()) {
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await $task.fetch(options);
|
||||||
|
} catch (error) {
|
||||||
|
throw error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return await Request(options);
|
||||||
|
}
|
||||||
571
慕思.js
Normal file
571
慕思.js
Normal file
@@ -0,0 +1,571 @@
|
|||||||
|
/**
|
||||||
|
* 慕思
|
||||||
|
* const $ = new Env("慕思");
|
||||||
|
* cron 10 6,15 * * * 慕思.js
|
||||||
|
* 活动入口:https://pic.imgdb.cn/item/64eaffc4661c6c8e54806be6.jpg
|
||||||
|
* Author by Huansheng1
|
||||||
|
* ========= 青龙--配置文件 ===========
|
||||||
|
* # 项目名称
|
||||||
|
* export mshy='api_token#openId'
|
||||||
|
* 自己抓包 请求头里的 api_token,请求包里的 openId
|
||||||
|
* 抓包后不要打开小程序避免刷新了token,有效期待测试,如出现 “Token有误” 则是 token过期了请重新抓取
|
||||||
|
* 多账号可用 换行、&、@ 符号隔开,支持新建多个同名环境变量来设置多账号
|
||||||
|
* 奖励:签到每天得积分,积分兑换实物
|
||||||
|
* ====================================
|
||||||
|
*/
|
||||||
|
const $ = new Env("慕思");
|
||||||
|
const utils = require("./utils")
|
||||||
|
let envParams = 'mshy';
|
||||||
|
|
||||||
|
let envSplitor = ['\n', '@', '&']
|
||||||
|
|
||||||
|
let processEnvParams = ($.isNode() ? process.env[envParams] : $.getdata(envParams)) || '';
|
||||||
|
|
||||||
|
let initedJobForTokens = []
|
||||||
|
let currentUserIndex = 0
|
||||||
|
|
||||||
|
class JobTask {
|
||||||
|
constructor(str) {
|
||||||
|
this.requestUA = generateRandomUA();
|
||||||
|
this.index = ++currentUserIndex
|
||||||
|
this.valid = false;
|
||||||
|
try {
|
||||||
|
[this.activedAuthToken, this.openId] = str;
|
||||||
|
} catch (error) {
|
||||||
|
console.log('参数不完整:自己抓包 请求头里的 api_token,请求包里的 openId')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async taskApi (fn, method, url, body, moreHeaders = {}) {
|
||||||
|
let result = null
|
||||||
|
try {
|
||||||
|
let urlObject = {
|
||||||
|
url: url,
|
||||||
|
headers: {
|
||||||
|
'Accept': '*/*',
|
||||||
|
'Accept-Language': 'zh-CN,zh',
|
||||||
|
'Connection': 'keep-alive',
|
||||||
|
'Host': 'atom.musiyoujia.com',
|
||||||
|
'Referer': 'https://servicewechat.com/wx03527497c5369a2c/94/page-frame.html',
|
||||||
|
'Sec-Fetch-Dest': 'empty',
|
||||||
|
'Sec-Fetch-Mode': 'cors',
|
||||||
|
'Sec-Fetch-Site': 'cross-site',
|
||||||
|
'User-Agent': this.requestUA || 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF XWEB/8379',
|
||||||
|
'api_client_code': '65',
|
||||||
|
'api_token': this.activedAuthToken,
|
||||||
|
'api_version': '1.0.0',
|
||||||
|
'xweb_xhr': '1',
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
...moreHeaders
|
||||||
|
},
|
||||||
|
timeout: 60000,
|
||||||
|
}
|
||||||
|
if (this.requestUA) {
|
||||||
|
urlObject.headers['User-Agent'] = this.requestUA
|
||||||
|
}
|
||||||
|
if (body) {
|
||||||
|
urlObject.body = body
|
||||||
|
// urlObject.headers['Content-Length'] = body?.length
|
||||||
|
}
|
||||||
|
// console.log('urlObject:', urlObject);
|
||||||
|
await httpRequest(method, urlObject).then(async (ret) => {
|
||||||
|
if (ret.resp?.statusCode == 200) {
|
||||||
|
if (ret.resp?.body) {
|
||||||
|
result = JSON.parse(ret.resp.body)
|
||||||
|
} else {
|
||||||
|
console.log(`账号[${this.index}]调用${method}[${fn}]出错,返回为空`)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log(`账号[${this.index}]调用${method}[${fn}]出错,返回状态码[${ret.resp?.statusCode || ''}]`, '返回结果:', ret.resp?.body || ret?.err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
} finally {
|
||||||
|
return Promise.resolve(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async GetUserInfo () {
|
||||||
|
try {
|
||||||
|
let fn = 'GetUserInfo'
|
||||||
|
let method = 'post'
|
||||||
|
let url = `https://atom.musiyoujia.com/member/wechatlogin/selectuserinfo`;
|
||||||
|
const timestamp = new Date().getTime();
|
||||||
|
let moreHeaders = {
|
||||||
|
'api_timestamp': timestamp,
|
||||||
|
'api_sign': utils?.MD5_Encrypt(`api_client_code=65&api_version=1.0.0&api_timestamp=${timestamp}`)?.toUpperCase()
|
||||||
|
}
|
||||||
|
let body = `{"appId":"wx03527497c5369a2c","appType":"WECHAT_MINI_PROGRAM","openId":"${this.openId}"}`;
|
||||||
|
await this.taskApi(fn, method, url, body, moreHeaders).then(async (result) => {
|
||||||
|
if (result?.msg === "success") {
|
||||||
|
this.valid = true;
|
||||||
|
this.customId = result?.data.resMemberInfo.memberId;
|
||||||
|
console.log(`账号[${this.index}] 查询个人信息成功,积分:${result?.data?.memberInfo?.pointInfo?.point}`)
|
||||||
|
} else {
|
||||||
|
console.log(`账号[${this.index}] 查询个人信息失败:${result?.msg || JSON.stringify(result)}`)
|
||||||
|
this.valid = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async GetJob () {
|
||||||
|
try {
|
||||||
|
let fn = 'GetJob'
|
||||||
|
let method = 'post'
|
||||||
|
let url = `https://atom.musiyoujia.com/member/memberbehavior/getBehaviorInfos`;
|
||||||
|
let body = `{"appId":"wx03527497c5369a2c","appType":"WECHAT_MINI_PROGRAM","behaviorIds":[1,2,10203,10204,10205,5],"sourceChannel":"会员小程序","source":"${this.customId}","openId":"${this.openId}"}`;
|
||||||
|
const timestamp = new Date().getTime();
|
||||||
|
let moreHeaders = {
|
||||||
|
'api_timestamp': timestamp,
|
||||||
|
'api_sign': utils?.MD5_Encrypt(`api_token=${this.activedAuthToken}&api_client_code=65&api_version=1.0.0&api_timestamp=${timestamp}`)?.toUpperCase()
|
||||||
|
}
|
||||||
|
await this.taskApi(fn, method, url, body, moreHeaders).then(async (result) => {
|
||||||
|
if (result?.msg === "success") {
|
||||||
|
this.isSigned = result?.data[0].acts['每天已获得积分次数'] === 1;
|
||||||
|
console.log(`账号[${this.index}] 获取任务列表成功,${this.isSigned ? '已签到' : '未签到'}`)
|
||||||
|
} else {
|
||||||
|
console.log(`账号[${this.index}] 获取任务列表失败:${result?.msg || JSON.stringify(result)}`)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async Sign () {
|
||||||
|
try {
|
||||||
|
let fn = 'Sign'
|
||||||
|
let method = 'post'
|
||||||
|
let url = `https://atom.musiyoujia.com/member/memberbehavior/add`;
|
||||||
|
const currentDate = new Date();
|
||||||
|
const year = currentDate.getFullYear();
|
||||||
|
const month = currentDate.getMonth() + 1;
|
||||||
|
const day = currentDate.getDate();
|
||||||
|
let body = `{"appId":"wx03527497c5369a2c","appType":"WECHAT_MINI_PROGRAM","osType":"windows","model":"microsoft","browser":"微信小程序","platform":"1","sourceType":"5","sourceChannel":"会员小程序","siteId":"","visitorId":"","deviceId":"","spotId":"","campaignId":"","deviceType":"","eventLabel":"","eventValue":"","eventAttr2":"${`${year}.${month}.${day}`}","eventAttr3":"","eventAttr4":"","eventAttr5":"","eventAttr6":"","googleCampaignName":"","googleCampaignSource":"","googleCampaignMedium":"","googleCampaignContent":"","memberType":"DeRUCCI","customId":"${this.customId}","locationUrl":"/pages/user/signIn","url":"/pages/user/signIn","pageTitle":"每日签到","logType":"event","behaviorIds":[1,3],"eventCategory":"用户签到","eventAction":"签到","eventAttr1":2,"openId":"${this.openId}"}`;
|
||||||
|
const timestamp = new Date().getTime();
|
||||||
|
let moreHeaders = {
|
||||||
|
'api_timestamp': timestamp,
|
||||||
|
'api_sign': utils?.MD5_Encrypt(`api_token=${this.activedAuthToken}&api_client_code=65&api_version=1.0.0&api_timestamp=${timestamp}`)?.toUpperCase()
|
||||||
|
}
|
||||||
|
await this.taskApi(fn, method, url, body, moreHeaders).then(async (result) => {
|
||||||
|
if (result?.msg === "success") {
|
||||||
|
console.log(`账号[${this.index}] 签到成功,获得积分:${result?.data?.point}`)
|
||||||
|
} else {
|
||||||
|
console.log(`账号[${this.index}] 签到失败:${result?.msg || JSON.stringify(result)}`)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async doTask () {
|
||||||
|
try {
|
||||||
|
console.log(`\n============= 账号[${this.index}] 开始获取任务=============`);
|
||||||
|
await this.GetJob();
|
||||||
|
if (!this.isSigned) {
|
||||||
|
console.log(`\n============= 账号[${this.index}] 开始执行 签到任务=============`);
|
||||||
|
await this.Sign();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
!(async () => {
|
||||||
|
if (typeof $request !== "undefined") {
|
||||||
|
await GetRewrite()
|
||||||
|
} else {
|
||||||
|
if (!(await checkEnv())) return;
|
||||||
|
|
||||||
|
console.log('\n================ 开始执行 ================')
|
||||||
|
for (let user of initedJobForTokens) {
|
||||||
|
console.log(`----------- 执行 第 [${user.index}] 个账号 -----------`)
|
||||||
|
await user.GetUserInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
let validUserList = initedJobForTokens.filter(x => x.valid)
|
||||||
|
|
||||||
|
if (initedJobForTokens.length > 0) {
|
||||||
|
console.log('\n================ 任务队列构建完毕 ================')
|
||||||
|
for (let user of initedJobForTokens) {
|
||||||
|
console.log(`----------- 账号[${user.index}] -----------`)
|
||||||
|
await user.doTask();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log('\n====幻生提示:无可用账号,请检查配置============ 任务结束 ================')
|
||||||
|
}
|
||||||
|
|
||||||
|
await $.showmsg();
|
||||||
|
}
|
||||||
|
})()
|
||||||
|
.catch((e) => console.log(e))
|
||||||
|
.finally(() => $.done())
|
||||||
|
|
||||||
|
async function GetRewrite () {
|
||||||
|
}
|
||||||
|
|
||||||
|
async function checkEnv () {
|
||||||
|
if (processEnvParams) {
|
||||||
|
let splitor = envSplitor[0];
|
||||||
|
for (let sp of envSplitor) {
|
||||||
|
if (processEnvParams.indexOf(sp) > -1) {
|
||||||
|
splitor = sp;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (let token of processEnvParams.split(splitor)) {
|
||||||
|
if (token) initedJobForTokens.push(new JobTask(token?.split('#')))
|
||||||
|
}
|
||||||
|
userCount = initedJobForTokens.length
|
||||||
|
} else {
|
||||||
|
console.log('未找到 配置信息,请检查是否配置 变量:', envParams)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`共找到${userCount}个账号`)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
function generateRandomUA () {
|
||||||
|
var androidVersion = Math.floor(Math.random() * 6) + 8; // 生成 Android 版本号 8-13 之间的随机数
|
||||||
|
var androidModels = [
|
||||||
|
"PBBM00", "SM-G975F", "Pixel 4", "OnePlus 7T", "Redmi Note 8 Pro",
|
||||||
|
"iPhone X", "Galaxy S10", "Huawei P30 Pro", "LG G8 ThinQ", "Sony Xperia 1",
|
||||||
|
"Moto G7", "Nokia 9 PureView", "Xiaomi Mi 9", "Google Pixel 3a", "OnePlus 6T",
|
||||||
|
"Redmi Note 7", "Samsung Galaxy A50", "Huawei Mate 20 Pro", "LG V40 ThinQ", "Sony Xperia XZ3",
|
||||||
|
"Moto Z4", "Nokia 7.1", "Xiaomi Mi Mix 3", "Google Pixel 2", "OnePlus 5T",
|
||||||
|
"Redmi Note 6 Pro", "Samsung Galaxy A70", "Huawei P20 Pro", "LG G7 ThinQ", "Sony Xperia XZ2",
|
||||||
|
"Moto G6", "Nokia 6.1", "Xiaomi Mi 8", "Google Pixel", "OnePlus 5",
|
||||||
|
"Redmi Note 5 Pro", "Samsung Galaxy A30", "Huawei Mate 10 Pro", "LG V30", "Sony Xperia XZ1",
|
||||||
|
"Moto X4", "Nokia 5.1", "Xiaomi Mi 6", "Google Pixel XL", "OnePlus 3T",
|
||||||
|
"Redmi Note 4", "Samsung Galaxy A20", "Huawei P10 Plus", "LG G6", "Sony Xperia XZ",
|
||||||
|
"Moto G5 Plus", "Nokia 3.1", "Xiaomi Mi 5", "Google Pixel 3", "OnePlus 3",
|
||||||
|
"Redmi Note 3", "Samsung Galaxy A10", "Huawei Mate 9", "LG V20", "Sony Xperia X Compact",
|
||||||
|
"Moto G4", "Nokia 2.2", "Xiaomi Mi 4", "Google Pixel 2 XL", "OnePlus 2",
|
||||||
|
"Redmi Note 2", "Samsung Galaxy A5", "Huawei P9", "LG G5", "Sony Xperia X",
|
||||||
|
"Moto E6", "Nokia 1", "Xiaomi Mi 3", "Google Pixel 4", "OnePlus One",
|
||||||
|
"Redmi Note", "Samsung Galaxy A3", "Huawei P8", "LG G4", "Sony Xperia Z5",
|
||||||
|
"Moto E5", "Nokia 3310", "Xiaomi Mi 2", "Google Pixel 4 XL", "OnePlus Nord"
|
||||||
|
]; // 常见的手机型号
|
||||||
|
|
||||||
|
var chromeVersion = "Chrome/" + (Math.floor(Math.random() * 30) + 50) + ".0." + (Math.floor(Math.random() * 1000) + 100); // 生成 Chrome 版本号 50.0.100-79.0.999 之间的随机数
|
||||||
|
|
||||||
|
var ua = "Mozilla/5.0 (Linux; Android " + androidVersion + "; " + androidModels[Math.floor(Math.random() * androidModels.length)] + " Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 " + chromeVersion + " Mobile Safari/537.36;xsb_wangchao;xsb_wangchao;5.3.1;native_app";
|
||||||
|
|
||||||
|
return ua;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 无参数加密:请求地址+时间戳+A749380BBD5A4D93B55B4BE245A42988+Token
|
||||||
|
// 示例数据:https://api.ikbang.cn/v2/iclick-new/signIn/sign1692923683034A749380BBD5A4D93B55B4BE245A4298839D21A3B3EFF817154C47470BF13E62CF05F956446D53C359688A094E91A9B1F2A67065862923551F147C32E3AFAF778
|
||||||
|
// 如果请求URL有参数则是 在时间戳 和 盐 之间增加 stringify后的参数(POST)
|
||||||
|
|
||||||
|
async function httpRequest (method, url) {
|
||||||
|
httpErr = null, httpReq = null, httpResp = null;
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
$.send(method, url, async (err, req, resp) => {
|
||||||
|
httpErr = err, httpReq = req, httpResp = resp;
|
||||||
|
resolve({ err, req, resp })
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function Env (name, env) {
|
||||||
|
"undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0);
|
||||||
|
return new class {
|
||||||
|
constructor(name, env) {
|
||||||
|
this.name = name
|
||||||
|
this.notifyStr = ''
|
||||||
|
this.startTime = (new Date).getTime()
|
||||||
|
Object.assign(this, env)
|
||||||
|
console.log(`${this.name} 开始运行:\n`)
|
||||||
|
}
|
||||||
|
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
|
||||||
|
}
|
||||||
|
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
|
||||||
|
}
|
||||||
|
send (m, t, e = (() => { })) {
|
||||||
|
if (m != 'get' && m != 'post' && m != 'put' && m != 'delete') {
|
||||||
|
console.log(`无效的http方法:${m}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (m == 'get' && t.headers) {
|
||||||
|
delete t.headers["Content-Type"];
|
||||||
|
delete t.headers["Content-Length"];
|
||||||
|
} else if (t.body && t.headers) {
|
||||||
|
if (!t.headers["Content-Type"]) t.headers["Content-Type"] = "application/x-www-form-urlencoded";
|
||||||
|
}
|
||||||
|
if (this.isSurge() || this.isLoon()) {
|
||||||
|
if (this.isSurge() && this.isNeedRewrite) {
|
||||||
|
t.headers = t.headers || {};
|
||||||
|
Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 });
|
||||||
|
}
|
||||||
|
let conf = {
|
||||||
|
method: m,
|
||||||
|
url: t.url,
|
||||||
|
headers: t.headers,
|
||||||
|
timeout: t.timeout,
|
||||||
|
data: t.body
|
||||||
|
};
|
||||||
|
if (m == 'get') delete conf.data
|
||||||
|
$axios(conf).then(t => {
|
||||||
|
const {
|
||||||
|
status: i,
|
||||||
|
request: q,
|
||||||
|
headers: r,
|
||||||
|
data: o
|
||||||
|
} = t;
|
||||||
|
e(null, q, {
|
||||||
|
statusCode: i,
|
||||||
|
headers: r,
|
||||||
|
body: o
|
||||||
|
});
|
||||||
|
}).catch(err => console.log(err))
|
||||||
|
} else if (this.isQuanX()) {
|
||||||
|
t.method = m.toUpperCase(), this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, {
|
||||||
|
hints: !1
|
||||||
|
})),
|
||||||
|
$task.fetch(t).then(t => {
|
||||||
|
const {
|
||||||
|
statusCode: i,
|
||||||
|
request: q,
|
||||||
|
headers: r,
|
||||||
|
body: o
|
||||||
|
} = t;
|
||||||
|
e(null, q, {
|
||||||
|
statusCode: i,
|
||||||
|
headers: r,
|
||||||
|
body: o
|
||||||
|
})
|
||||||
|
}, t => e(t))
|
||||||
|
} else if (this.isNode()) {
|
||||||
|
this.got = this.got ? this.got : require("got");
|
||||||
|
const {
|
||||||
|
url: s,
|
||||||
|
...i
|
||||||
|
} = t;
|
||||||
|
this.instance = this.got.extend({
|
||||||
|
followRedirect: false
|
||||||
|
});
|
||||||
|
this.instance[m](s, i).then(t => {
|
||||||
|
const {
|
||||||
|
statusCode: i,
|
||||||
|
request: q,
|
||||||
|
headers: r,
|
||||||
|
body: o
|
||||||
|
} = t;
|
||||||
|
e(null, q, {
|
||||||
|
statusCode: i,
|
||||||
|
headers: r,
|
||||||
|
body: o
|
||||||
|
})
|
||||||
|
}, t => {
|
||||||
|
const {
|
||||||
|
message: s,
|
||||||
|
request: q,
|
||||||
|
response: i
|
||||||
|
} = t;
|
||||||
|
e(s, q, i)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
time (t, x = null) {
|
||||||
|
let xt = x ? new Date(x) : new Date
|
||||||
|
let e = {
|
||||||
|
"M+": xt.getMonth() + 1,
|
||||||
|
"d+": xt.getDate(),
|
||||||
|
"h+": xt.getHours(),
|
||||||
|
"m+": xt.getMinutes(),
|
||||||
|
"s+": xt.getSeconds(),
|
||||||
|
"q+": Math.floor((xt.getMonth() + 3) / 3),
|
||||||
|
S: xt.getMilliseconds()
|
||||||
|
};
|
||||||
|
/(y+)/.test(t) && (t = t.replace(RegExp.$1, (xt.getFullYear() + "").substr(4 - RegExp.$1.length)));
|
||||||
|
for (let s in e)
|
||||||
|
new RegExp("(" + s + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? e[s] : ("00" + e[s]).substr(("" + e[s]).length)));
|
||||||
|
return t
|
||||||
|
}
|
||||||
|
async showmsg () {
|
||||||
|
if (!this.notifyStr) return;
|
||||||
|
let notifyBody = this.name + " 运行通知\n\n" + this.notifyStr
|
||||||
|
if ($.isNode()) {
|
||||||
|
var notify = require('./sendNotify');
|
||||||
|
console.log('\n============== 推送 ==============')
|
||||||
|
await notify.sendNotify(this.name, notifyBody);
|
||||||
|
} else {
|
||||||
|
this.msg(notifyBody);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
logAndNotify (str) {
|
||||||
|
console.log(str)
|
||||||
|
this.notifyStr += str
|
||||||
|
this.notifyStr += '\n'
|
||||||
|
}
|
||||||
|
logAndNotifyWithTime (str) {
|
||||||
|
let t = '[' + this.time('hh:mm:ss.S') + ']' + str
|
||||||
|
console.log(t)
|
||||||
|
this.notifyStr += t
|
||||||
|
this.notifyStr += '\n'
|
||||||
|
}
|
||||||
|
logWithTime (str) {
|
||||||
|
console.log('[' + this.time('hh:mm:ss.S') + ']' + str)
|
||||||
|
}
|
||||||
|
msg (e = t, s = "", i = "", r) {
|
||||||
|
const o = t => {
|
||||||
|
if (!t)
|
||||||
|
return t;
|
||||||
|
if ("string" == typeof t)
|
||||||
|
return this.isLoon() ? t : this.isQuanX() ? {
|
||||||
|
"open-url": t
|
||||||
|
}
|
||||||
|
: this.isSurge() ? {
|
||||||
|
url: t
|
||||||
|
}
|
||||||
|
: void 0;
|
||||||
|
if ("object" == typeof t) {
|
||||||
|
if (this.isLoon()) {
|
||||||
|
let e = t.openUrl || t.url || t["open-url"],
|
||||||
|
s = t.mediaUrl || t["media-url"];
|
||||||
|
return {
|
||||||
|
openUrl: e,
|
||||||
|
mediaUrl: s
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.isQuanX()) {
|
||||||
|
let e = t["open-url"] || t.url || t.openUrl,
|
||||||
|
s = t["media-url"] || t.mediaUrl;
|
||||||
|
return {
|
||||||
|
"open-url": e,
|
||||||
|
"media-url": s
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.isSurge()) {
|
||||||
|
let e = t.url || t.openUrl || t["open-url"];
|
||||||
|
return {
|
||||||
|
url: e
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r)));
|
||||||
|
let h = ["", "============== 系统通知 =============="];
|
||||||
|
h.push(e),
|
||||||
|
s && h.push(s),
|
||||||
|
i && h.push(i),
|
||||||
|
console.log(h.join("\n"))
|
||||||
|
}
|
||||||
|
getMin (a, b) {
|
||||||
|
return ((a < b) ? a : b)
|
||||||
|
}
|
||||||
|
getMax (a, b) {
|
||||||
|
return ((a < b) ? b : a)
|
||||||
|
}
|
||||||
|
padStr (num, length, padding = '0') {
|
||||||
|
let numStr = String(num)
|
||||||
|
let numPad = (length > numStr.length) ? (length - numStr.length) : 0
|
||||||
|
let retStr = ''
|
||||||
|
for (let i = 0; i < numPad; i++) {
|
||||||
|
retStr += padding
|
||||||
|
}
|
||||||
|
retStr += numStr
|
||||||
|
return retStr;
|
||||||
|
}
|
||||||
|
json2str (obj, c, encodeUrl = false) {
|
||||||
|
let ret = []
|
||||||
|
for (let keys of Object.keys(obj).sort()) {
|
||||||
|
let v = obj[keys]
|
||||||
|
if (v && encodeUrl) v = encodeURIComponent(v)
|
||||||
|
ret.push(keys + '=' + v)
|
||||||
|
}
|
||||||
|
return ret.join(c);
|
||||||
|
}
|
||||||
|
str2json (str, decodeUrl = false) {
|
||||||
|
let ret = {}
|
||||||
|
for (let item of str.split('&')) {
|
||||||
|
if (!item) continue;
|
||||||
|
let idx = item.indexOf('=')
|
||||||
|
if (idx == -1) continue;
|
||||||
|
let k = item.substr(0, idx)
|
||||||
|
let v = item.substr(idx + 1)
|
||||||
|
if (decodeUrl) v = decodeURIComponent(v)
|
||||||
|
ret[k] = v
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
randomString (len, charset = 'abcdef0123456789') {
|
||||||
|
let str = '';
|
||||||
|
for (let i = 0; i < len; i++) {
|
||||||
|
str += charset.charAt(Math.floor(Math.random() * charset.length));
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
randomList (a) {
|
||||||
|
let idx = Math.floor(Math.random() * a.length)
|
||||||
|
return a[idx]
|
||||||
|
}
|
||||||
|
wait (t) {
|
||||||
|
return new Promise(e => setTimeout(e, t))
|
||||||
|
}
|
||||||
|
done (t = {}) {
|
||||||
|
const e = (new Date).getTime(),
|
||||||
|
s = (e - this.startTime) / 1e3;
|
||||||
|
console.log(`\n${this.name} 运行结束,共运行了 ${s} 秒!`)
|
||||||
|
if (this.isSurge() || this.isQuanX() || this.isLoon()) $done(t)
|
||||||
|
}
|
||||||
|
}(name, env)
|
||||||
|
}
|
||||||
217
所有女生小程序.js
Normal file
217
所有女生小程序.js
Normal file
@@ -0,0 +1,217 @@
|
|||||||
|
/*
|
||||||
|
------------------------------------------
|
||||||
|
@Author: smallfawn 860562056
|
||||||
|
@Date: 2024.06.10 14.14
|
||||||
|
@Description: 所有女生小程序
|
||||||
|
------------------------------------------
|
||||||
|
变量名wawo
|
||||||
|
变量值 https://7.wawo.cc/api/ 域名Headers请求头里面的authorization 去掉bearer 多账号&或换行或新建同名变量
|
||||||
|
[Script]
|
||||||
|
http-response
|
||||||
|
|
||||||
|
[MITM]
|
||||||
|
hostname =
|
||||||
|
|
||||||
|
⚠️【免责声明】
|
||||||
|
------------------------------------------
|
||||||
|
1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
|
||||||
|
2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。
|
||||||
|
3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。
|
||||||
|
4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。
|
||||||
|
5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。
|
||||||
|
6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。
|
||||||
|
7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。
|
||||||
|
*/
|
||||||
|
|
||||||
|
const $ = new Env("所有女生会员中心");
|
||||||
|
let ckName = `wawo`;
|
||||||
|
let userCookie = checkEnv(
|
||||||
|
($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""
|
||||||
|
);
|
||||||
|
const notify = $.isNode() ? require("./sendNotify") : "";
|
||||||
|
|
||||||
|
!(async () => {
|
||||||
|
console.log(
|
||||||
|
`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
|
||||||
|
new Date().getTime() +
|
||||||
|
new Date().getTimezoneOffset() * 60 * 1000 +
|
||||||
|
8 * 60 * 60 * 1000
|
||||||
|
).toLocaleString()} \n==================================================`
|
||||||
|
);
|
||||||
|
//console.log(userCookie)
|
||||||
|
if (!userCookie?.length) return console.log(`没有找到CK哦`);
|
||||||
|
let index = 1;
|
||||||
|
let strSplitor = "#";
|
||||||
|
|
||||||
|
for (let user of userCookie) {
|
||||||
|
$.log(`\n🚀 user:【${index}】 start work\n`);
|
||||||
|
index++
|
||||||
|
$.token = user
|
||||||
|
$.ckStatus = true;
|
||||||
|
await getPoints()
|
||||||
|
await signInInfo()
|
||||||
|
}
|
||||||
|
|
||||||
|
await $.sendMsg($.logs.join("\n"));
|
||||||
|
})()
|
||||||
|
.catch((e) => console.log(e))
|
||||||
|
.finally(() => $.done());
|
||||||
|
async function getPoints() {
|
||||||
|
const config =
|
||||||
|
{
|
||||||
|
url: 'https://7.wawo.cc/api/score/wx/score/queryAmount',
|
||||||
|
headers: {
|
||||||
|
"content-type": "application/json",
|
||||||
|
'accept': '*/*',
|
||||||
|
'accept-language': 'zh-CN,zh;q=0.9',
|
||||||
|
'authorization': 'bearer ' + $.token,
|
||||||
|
'content-type': 'application/json',
|
||||||
|
'sec-fetch-dest': 'empty',
|
||||||
|
'sec-fetch-mode': 'cors',
|
||||||
|
'sec-fetch-site': 'cross-site',
|
||||||
|
'xweb_xhr': '1',
|
||||||
|
"referer": `https://servicewechat.com/wx7d1403fe84339669/1038/page-frame.html`,
|
||||||
|
"user-agent": `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309092b) XWEB/8555`
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
|
||||||
|
if (result?.code == "000") {
|
||||||
|
$.log(`账号当前积分[${result.data}]`)
|
||||||
|
} else {
|
||||||
|
$.log(`账号积分查询失败[${result.message}]`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function signInInfo() {
|
||||||
|
const config =
|
||||||
|
{
|
||||||
|
url: 'https://7.wawo.cc/api/activity/wx/task/sign/signMsg',
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"content-type": "application/json",
|
||||||
|
'accept': '*/*',
|
||||||
|
'accept-language': 'zh-CN,zh;q=0.9',
|
||||||
|
'authorization': 'bearer ' + $.token,
|
||||||
|
'content-type': 'application/json',
|
||||||
|
'sec-fetch-dest': 'empty',
|
||||||
|
'sec-fetch-mode': 'cors',
|
||||||
|
'sec-fetch-site': 'cross-site',
|
||||||
|
'xweb_xhr': '1',
|
||||||
|
"referer": `https://servicewechat.com/wx7d1403fe84339669/1038/page-frame.html`,
|
||||||
|
"user-agent": `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309092b) XWEB/8555`
|
||||||
|
|
||||||
|
},
|
||||||
|
data: JSON.stringify({
|
||||||
|
"cardNo": "411886986591633408"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
|
||||||
|
if (result?.code == "000") {
|
||||||
|
if (result.data.signed !== 1) {
|
||||||
|
$.log(`未签到 ===> 签到ing`)
|
||||||
|
await signIn()
|
||||||
|
} else {
|
||||||
|
$.log(`已签到 ===> 跳过签到`)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$.log(`获取签到信息失败[${result.message}]`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function signIn() {
|
||||||
|
const config =
|
||||||
|
{
|
||||||
|
url: 'https://7.wawo.cc/api/activity/wx/task/sign/signIn',
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"content-type": "application/json",
|
||||||
|
'accept': '*/*',
|
||||||
|
'accept-language': 'zh-CN,zh;q=0.9',
|
||||||
|
'authorization': 'bearer ' + $.token,
|
||||||
|
'content-type': 'application/json',
|
||||||
|
'sec-fetch-dest': 'empty',
|
||||||
|
'sec-fetch-mode': 'cors',
|
||||||
|
'sec-fetch-site': 'cross-site',
|
||||||
|
'xweb_xhr': '1',
|
||||||
|
"referer": `https://servicewechat.com/wx7d1403fe84339669/1038/page-frame.html`,
|
||||||
|
"user-agent": `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309092b) XWEB/8555`
|
||||||
|
|
||||||
|
},
|
||||||
|
data: JSON.stringify({})
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
|
||||||
|
if (result?.code == "000") {
|
||||||
|
$.log(`签到成功`)
|
||||||
|
} else {
|
||||||
|
$.log(`签到失败[${result.message}]`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function done(taskId) {
|
||||||
|
const config =
|
||||||
|
{
|
||||||
|
url: 'https://7.wawo.cc/api/operate/wx/rewards/task/done?taskId=' + taskId,
|
||||||
|
method: "POST",
|
||||||
|
|
||||||
|
headers: {
|
||||||
|
"content-type": "application/json",
|
||||||
|
'accept': '*/*',
|
||||||
|
'accept-language': 'zh-CN,zh;q=0.9',
|
||||||
|
'authorization': 'bearer ' + $.token,
|
||||||
|
'content-type': 'application/json',
|
||||||
|
'sec-fetch-dest': 'empty',
|
||||||
|
'sec-fetch-mode': 'cors',
|
||||||
|
'sec-fetch-site': 'cross-site',
|
||||||
|
'xweb_xhr': '1',
|
||||||
|
"referer": `https://servicewechat.com/wx7d1403fe84339669/1038/page-frame.html`,
|
||||||
|
"user-agent": `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309092b) XWEB/8555`
|
||||||
|
|
||||||
|
},
|
||||||
|
data: JSON.stringify({ "taskId": taskId })
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
|
||||||
|
if (result?.code == "000") {
|
||||||
|
$.log(`任务成功`)
|
||||||
|
} else {
|
||||||
|
$.log(`任务失败[${result.message}]`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function checkEnv(userCookie) {
|
||||||
|
const envSplitor = ["&", "\n"];
|
||||||
|
//console.log(userCookie);
|
||||||
|
let userList = userCookie
|
||||||
|
.split(envSplitor.find((o) => userCookie.includes(o)) || "&")
|
||||||
|
.filter((n) => n);
|
||||||
|
console.log(`共找到${userList.length}个账号`);
|
||||||
|
return userList;
|
||||||
|
}
|
||||||
|
// prettier-ignore
|
||||||
|
function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`).join("&") } getURLParams(url) { const params = {}; const queryString = url.split("?")[1]; if (queryString) { const paramPairs = queryString.split("&"); paramPairs.forEach((pair) => { const [key, value] = pair.split("="); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === "object" } catch (e) { return false } } isJson(obj) { var isjson = typeof obj == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if (this.isNode()) { await notify.sendNotify(this.name, message) } else { this.msg(this.name, "", message) } } randomNumber(length) { const characters = "0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } randomString(length) { const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) { new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))) } return t } msg(title = t, subtitle = "", body = "", options) { const formatOptions = (options) => { if (!options) { return options } else if (typeof options === "string") { if (this.isQuanX()) { return { "open-url": options } } else { return undefined } } else if (typeof options === "object" && (options["open-url"] || options["media-url"])) { if (this.isQuanX()) { return options } else { return undefined } } else { return undefined } }; if (!this.isMute) { if (this.isQuanX()) { $notify(title, subtitle, body, formatOptions(options)) } } let logs = ["", "==============📣系统通知📣=============="]; logs.push(title); subtitle ? logs.push(subtitle) : ""; body ? logs.push(body) : ""; console.log(logs.join("\n")); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isQuanX(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) }
|
||||||
|
|
||||||
|
async function Request(options) {
|
||||||
|
if ($.isNode()) {
|
||||||
|
const axios = require("axios");
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await axios.request(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if ($.isQuanX()) {
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await $task.fetch(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return await Request(options);
|
||||||
|
}
|
||||||
13
星火学院新.py
Normal file
13
星火学院新.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
'''
|
||||||
|
复制微信打开:https://mx.qrurl.net/s/24211Mky3iJ
|
||||||
|
一天一次
|
||||||
|
每日任务/签到/学习时长增加
|
||||||
|
积分兑换实物卡券
|
||||||
|
变量名:xhxy
|
||||||
|
填入token,多账号换行或&
|
||||||
|
自行抓包token
|
||||||
|
自动抓包软群文件有
|
||||||
|
'''
|
||||||
|
project = 'fireAcademy'
|
||||||
|
import lzma, base64
|
||||||
|
exec(lzma.decompress(base64.b64decode('/Td6WFoAAATm1rRGAgAhARYAAAB0L+Wj4APbASldADSbSme4Ujxz98E0ClwvVjo94gxrJSFdUXCaQNLKTdOsYdLothMkppmNAscozSJk4tdIc96jCFo3keWoy3EcDTbT1ZSwlKaqPKcVyS4no4oaysCKPQ79xk32HCrwl40UCbK6RnfKil4L4YOYIEUuIcpQoUlOvw1+PX1qdn4C/HrQiwXK31ZFmFqXZAFi3R/ZzruxVdnXMRAHX+2zWVgBxbUL5haj4QC0K/kptlSQDkhXGaUH3e/N6KO+QpKWAhOVw9gDR0jAR0c338RXd2AO4D9scmiI5JV9eQi5/NMhtfW5GlluRWqpsJ71rlMDBjggQVFGtkaJvy9jjfa214dkFEkfU4qdKs8ONZKMTdreCOmVHwIV+XydAmlEfhA0yH5kx/50x5hc2wtXUAAAAABCT7Iye8/dnwABxQLcBwAAHhh9kbHEZ/sCAAAAAARZWg==')))
|
||||||
187
波司登.js
Normal file
187
波司登.js
Normal file
@@ -0,0 +1,187 @@
|
|||||||
|
/*
|
||||||
|
------------------------------------------
|
||||||
|
@Author: smallfawn 860562056
|
||||||
|
@Date: 2024.06.09 10.04
|
||||||
|
@Description: 波司登小程序 每日签到
|
||||||
|
------------------------------------------
|
||||||
|
变量名bosideng
|
||||||
|
变量值 抓https://gwuop.bsdits.cn/points-mall/ 请求头Headers中x-access-token的值和
|
||||||
|
https://gbpapihost.bsdits.cn/v3/projects/bfe7825ce8dd5cec/collect POST请求中请求体的gioId或deviceId或userId
|
||||||
|
|
||||||
|
两个值拼接# 例如89f...........#o15uuuuu_mf-SSS
|
||||||
|
多账号&或换行或新建同名变量
|
||||||
|
如果找不到第二个值 那么请进入签到页面找到https://gwuop.bsdits.cn/points-mall/front/member/ 开头的 /activities/1/records结尾的 中间的就是第二个值
|
||||||
|
[Script]
|
||||||
|
http-response
|
||||||
|
|
||||||
|
[MITM]
|
||||||
|
hostname =
|
||||||
|
|
||||||
|
⚠️【免责声明】
|
||||||
|
------------------------------------------
|
||||||
|
1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
|
||||||
|
2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。
|
||||||
|
3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。
|
||||||
|
4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。
|
||||||
|
5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。
|
||||||
|
6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。
|
||||||
|
7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。
|
||||||
|
*/
|
||||||
|
|
||||||
|
const $ = new Env("波司登小程序");
|
||||||
|
let ckName = `bosideng`;
|
||||||
|
let userCookie = checkEnv(
|
||||||
|
($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""
|
||||||
|
);
|
||||||
|
const notify = $.isNode() ? require("./sendNotify") : "";
|
||||||
|
|
||||||
|
!(async () => {
|
||||||
|
console.log(
|
||||||
|
`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
|
||||||
|
new Date().getTime() +
|
||||||
|
new Date().getTimezoneOffset() * 60 * 1000 +
|
||||||
|
8 * 60 * 60 * 1000
|
||||||
|
).toLocaleString()} \n==================================================`
|
||||||
|
);
|
||||||
|
//console.log(userCookie)
|
||||||
|
if (!userCookie?.length) return console.log(`没有找到CK哦`);
|
||||||
|
let index = 1;
|
||||||
|
let strSplitor = "#";
|
||||||
|
|
||||||
|
for (let user of userCookie) {
|
||||||
|
$.log(`\n🚀 user:【${index}】 start work\n`);
|
||||||
|
index++
|
||||||
|
$.token = user.split(strSplitor)[0]
|
||||||
|
$.union_id = user.split(strSplitor)[1]
|
||||||
|
$.ckStatus = true;
|
||||||
|
await records()
|
||||||
|
}
|
||||||
|
|
||||||
|
await $.sendMsg($.logs.join("\n"));
|
||||||
|
})()
|
||||||
|
.catch((e) => console.log(e))
|
||||||
|
.finally(() => $.done());
|
||||||
|
function getTime() {
|
||||||
|
// 创建Date对象
|
||||||
|
const now = new Date();
|
||||||
|
// 获取年、月、日、时、分、秒,并格式化为两位数
|
||||||
|
const year = now.getFullYear();
|
||||||
|
const month = String(now.getMonth() + 1).padStart(2, '0'); // getMonth返回的是0-11,所以需要+1
|
||||||
|
const day = String(now.getDate()).padStart(2, '0');
|
||||||
|
const hours = String(now.getHours()).padStart(2, '0');
|
||||||
|
const minutes = String(now.getMinutes()).padStart(2, '0');
|
||||||
|
const seconds = String(now.getSeconds()).padStart(2, '0');
|
||||||
|
const timestampStr = `${year}${month}${day}${hours}${minutes}${seconds}`;
|
||||||
|
return timestampStr
|
||||||
|
// 调用函数并打印结果
|
||||||
|
}
|
||||||
|
function MD5(data) {
|
||||||
|
let crypto = require('crypto')
|
||||||
|
return crypto.createHash('md5').update(data).digest('hex')
|
||||||
|
}
|
||||||
|
async function records() {
|
||||||
|
let time = getTime()
|
||||||
|
let nonce = $.uuid()
|
||||||
|
let text = `${$.union_id}${$.token}${time}${nonce}`
|
||||||
|
let config = {
|
||||||
|
method: 'GET',
|
||||||
|
url: `https://gwuop.bsdits.cn/points-mall/front/member/${$.union_id}/activities/1/records`,
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220089 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android',
|
||||||
|
'Accept-Encoding': 'gzip,compress,br,deflate',
|
||||||
|
'charset': 'utf-8',
|
||||||
|
'x-nonce': nonce,
|
||||||
|
'x-datadog-sampling-priority': '1',
|
||||||
|
'x-timestamp': time,
|
||||||
|
'x-datadog-origin': 'rum',
|
||||||
|
'bgno': 'BOSIDENG',
|
||||||
|
'x-signature': MD5(text).toUpperCase(),
|
||||||
|
'content-type': 'application/json',
|
||||||
|
'x-login-type': 'MiniProgram',
|
||||||
|
'x-access-token': $.token,
|
||||||
|
'Referer': 'https://servicewechat.com/wx3f8f90e766e5c545/355/page-frame.html'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result.code == 200) {
|
||||||
|
if (result.result.isSigned !== 1) {
|
||||||
|
$.log(`未签到 ===> 签到ing`)
|
||||||
|
await signIn()
|
||||||
|
} else {
|
||||||
|
$.log(`已签到 ===> 什么都不做`)
|
||||||
|
}
|
||||||
|
$.log(`🎉 签到信息查询成功,当前签到${result.result.signedDay}天 本次签到获得积分[${result.result.records[0].rewardPoints}]`)
|
||||||
|
} else {
|
||||||
|
$.log(`❌ 签到信息查询失败,原因:${result.message}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function signIn() {
|
||||||
|
let data = JSON.stringify({});
|
||||||
|
let time = getTime()
|
||||||
|
let nonce = $.uuid()
|
||||||
|
let text = `${$.union_id}${$.token}${time}${nonce}`
|
||||||
|
let config = {
|
||||||
|
method: 'POST',
|
||||||
|
url: 'https://gwuop.bsdits.cn/points-mall/front/points/',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220089 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android',
|
||||||
|
'Accept-Encoding': 'gzip,compress,br,deflate',
|
||||||
|
'charset': 'utf-8',
|
||||||
|
'x-nonce': nonce,
|
||||||
|
'x-datadog-sampling-priority': '1',
|
||||||
|
'x-timestamp': time,
|
||||||
|
'x-datadog-origin': 'rum',
|
||||||
|
'bgno': 'BOSIDENG',
|
||||||
|
'x-signature': MD5(text).toUpperCase(),
|
||||||
|
'content-type': 'application/json',
|
||||||
|
'x-login-type': 'MiniProgram',
|
||||||
|
'x-access-token': $.token,
|
||||||
|
'Referer': 'https://servicewechat.com/wx3f8f90e766e5c545/355/page-frame.html'
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
};
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result.code == 200) {
|
||||||
|
$.log(result)
|
||||||
|
$.log(`🎉 签到成功`)
|
||||||
|
} else {
|
||||||
|
$.log(`❌ 签到失败,原因:${result.message}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function checkEnv(userCookie) {
|
||||||
|
const envSplitor = ["&", "\n"];
|
||||||
|
console.log(userCookie);
|
||||||
|
let userList = userCookie
|
||||||
|
.split(envSplitor.find((o) => userCookie.includes(o)) || "&")
|
||||||
|
.filter((n) => n);
|
||||||
|
console.log(`共找到${userList.length}个账号`);
|
||||||
|
return userList;
|
||||||
|
}
|
||||||
|
// prettier-ignore
|
||||||
|
function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`).join("&") } getURLParams(url) { const params = {}; const queryString = url.split("?")[1]; if (queryString) { const paramPairs = queryString.split("&"); paramPairs.forEach((pair) => { const [key, value] = pair.split("="); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === "object" } catch (e) { return false } } isJson(obj) { var isjson = typeof obj == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if (this.isNode()) { await notify.sendNotify(this.name, message) } else { this.msg(this.name, "", message) } } randomNumber(length) { const characters = "0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } randomString(length) { const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) { new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))) } return t } msg(title = t, subtitle = "", body = "", options) { const formatOptions = (options) => { if (!options) { return options } else if (typeof options === "string") { if (this.isQuanX()) { return { "open-url": options } } else { return undefined } } else if (typeof options === "object" && (options["open-url"] || options["media-url"])) { if (this.isQuanX()) { return options } else { return undefined } } else { return undefined } }; if (!this.isMute) { if (this.isQuanX()) { $notify(title, subtitle, body, formatOptions(options)) } } let logs = ["", "==============📣系统通知📣=============="]; logs.push(title); subtitle ? logs.push(subtitle) : ""; body ? logs.push(body) : ""; console.log(logs.join("\n")); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isQuanX(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) }
|
||||||
|
|
||||||
|
async function Request(options) {
|
||||||
|
if ($.isNode()) {
|
||||||
|
const axios = require("axios");
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await axios.request(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if ($.isQuanX()) {
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await $task.fetch(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return await Request(options);
|
||||||
|
}
|
||||||
504
海天美味馆.js
Normal file
504
海天美味馆.js
Normal file
@@ -0,0 +1,504 @@
|
|||||||
|
/*
|
||||||
|
------------------------------------------
|
||||||
|
@Author: smallfawn
|
||||||
|
@Date: 2024.06.11 17:33
|
||||||
|
@Description: 海天美味馆小程序 每日签到+ 抽奖(端午)6.27结束
|
||||||
|
------------------------------------------
|
||||||
|
自己先去抽一次奖 签个到 把新手任务过了 别上来就跑 黑号不管 没写评论 不然一封封一堆
|
||||||
|
变量名:haday
|
||||||
|
变量值 https://cmallapi.haday.cn/buyer-api/ 请求头Headers中的Authorization和uuid #连接
|
||||||
|
多账号&或换行或新建同名变量
|
||||||
|
[Script]
|
||||||
|
http-response
|
||||||
|
|
||||||
|
[MITM]
|
||||||
|
hostname =
|
||||||
|
|
||||||
|
⚠️【免责声明】
|
||||||
|
------------------------------------------
|
||||||
|
1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
|
||||||
|
2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。
|
||||||
|
3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。
|
||||||
|
4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。
|
||||||
|
5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。
|
||||||
|
6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。
|
||||||
|
7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。
|
||||||
|
*/
|
||||||
|
|
||||||
|
const $ = new Env("海天美味馆小程序");
|
||||||
|
let ckName = `haday`;
|
||||||
|
let userCookie = checkEnv(
|
||||||
|
($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""
|
||||||
|
);
|
||||||
|
const notify = $.isNode() ? require("./sendNotify") : "";
|
||||||
|
|
||||||
|
!(async () => {
|
||||||
|
console.log(
|
||||||
|
`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
|
||||||
|
new Date().getTime() +
|
||||||
|
new Date().getTimezoneOffset() * 60 * 1000 +
|
||||||
|
8 * 60 * 60 * 1000
|
||||||
|
).toLocaleString()} \n==================================================`
|
||||||
|
);
|
||||||
|
//console.log(userCookie)
|
||||||
|
if (!userCookie?.length) return console.log(`没有找到CK哦`);
|
||||||
|
let index = 1;
|
||||||
|
let strSplitor = "#";
|
||||||
|
|
||||||
|
for (let user of userCookie) {
|
||||||
|
$.log(`\n🚀 user:【${index}】 start work\n`);
|
||||||
|
index++
|
||||||
|
$.token = user.split(strSplitor)[0];
|
||||||
|
$.uuid = user.split(strSplitor)[1];
|
||||||
|
$.ckStatus = true;
|
||||||
|
$.activity_code = null
|
||||||
|
$.canUse = 0
|
||||||
|
await getActivityInfo()
|
||||||
|
await $.wait(3000)
|
||||||
|
|
||||||
|
if ($.activity_code) {
|
||||||
|
await userInfo()
|
||||||
|
}
|
||||||
|
await task_1()
|
||||||
|
await $.wait(3000)
|
||||||
|
|
||||||
|
await task_2()
|
||||||
|
await $.wait(3000)
|
||||||
|
|
||||||
|
await lotteryInfo()
|
||||||
|
await $.wait(3000)
|
||||||
|
|
||||||
|
await getLotteryNum()
|
||||||
|
for (let i = 0; i < $.canUse; i++) {
|
||||||
|
await $.wait(3000)
|
||||||
|
|
||||||
|
await lottery()
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await $.sendMsg($.logs.join("\n"));
|
||||||
|
})()
|
||||||
|
.catch((e) => console.log(e))
|
||||||
|
.finally(() => $.done());
|
||||||
|
async function getActivityInfo() {
|
||||||
|
let config = {
|
||||||
|
url: `https://cmallapi.haday.cn/buyer-api/sign/activity/code?activityCode=`,
|
||||||
|
method: "GET",
|
||||||
|
headers: {
|
||||||
|
"Accept": "*/*",
|
||||||
|
"Accept-Encoding": "gzip, deflate, br",
|
||||||
|
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||||
|
"Authorization": $.token,
|
||||||
|
"Connection": "keep-alive",
|
||||||
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
|
"envVersion": "release",
|
||||||
|
"Host": "cmallapi.haday.cn",
|
||||||
|
"Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html",
|
||||||
|
"Sec-Fetch-Dest": "empty",
|
||||||
|
"Sec-Fetch-Mode": "cors",
|
||||||
|
"Sec-Fetch-Site": "cross-site",
|
||||||
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309092b) XWEB/8555",
|
||||||
|
"uuid": $.uuid,
|
||||||
|
"xweb_xhr": "1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.code == 403) {
|
||||||
|
$.log(`获取活动信息失败,原因:CK可能过期`)
|
||||||
|
}
|
||||||
|
if ("activity_code" in result) {
|
||||||
|
$.log(`获取活动信息成功,活动ID:${result.activity_code}`)
|
||||||
|
$.activity_code = result.activity_code
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function signIn() {
|
||||||
|
let data = { "activity_code": $.activity_code, "fill_date": "" }
|
||||||
|
let config = {
|
||||||
|
url: `https://cmallapi.haday.cn/buyer-api/sign/activity/sign`,
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Accept": "*/*",
|
||||||
|
"Accept-Encoding": "gzip, deflate, br",
|
||||||
|
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||||
|
"Authorization": $.token,
|
||||||
|
"Connection": "keep-alive",
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"envVersion": "release",
|
||||||
|
"Host": "cmallapi.haday.cn",
|
||||||
|
"Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html",
|
||||||
|
"Sec-Fetch-Dest": "empty",
|
||||||
|
"Sec-Fetch-Mode": "cors",
|
||||||
|
"Sec-Fetch-Site": "cross-site",
|
||||||
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309092b) XWEB/8555",
|
||||||
|
"uuid": $.uuid,
|
||||||
|
"xweb_xhr": "1"
|
||||||
|
},
|
||||||
|
data: JSON.stringify(data)
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result.is_sign == true) {
|
||||||
|
$.log(`签到成功`)
|
||||||
|
} else {
|
||||||
|
$.log(`签到失败 [${result.message}]`)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
async function userInfo() {
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
url: `https://cmallapi.haday.cn/buyer-api/sign/activity/member/info?activityCode=${$.activity_code}`,
|
||||||
|
method: "GET",
|
||||||
|
headers: {
|
||||||
|
"Accept": "*/*",
|
||||||
|
"Accept-Encoding": "gzip, deflate, br",
|
||||||
|
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||||
|
"Authorization": $.token,
|
||||||
|
"Connection": "keep-alive",
|
||||||
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
|
"envVersion": "release",
|
||||||
|
"Host": "cmallapi.haday.cn",
|
||||||
|
"Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html",
|
||||||
|
"Sec-Fetch-Dest": "empty",
|
||||||
|
"Sec-Fetch-Mode": "cors",
|
||||||
|
"Sec-Fetch-Site": "cross-site",
|
||||||
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309092b) XWEB/8555",
|
||||||
|
"uuid": $.uuid,
|
||||||
|
"xweb_xhr": "1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.is_sign !== true) {
|
||||||
|
$.log(`${result.member_id}未签到,开始签到`)
|
||||||
|
await signIn()
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
$.log(`当前累计签到[${result.sign_day_num}]`)
|
||||||
|
}
|
||||||
|
//浏览页面
|
||||||
|
async function task_1() {
|
||||||
|
let data = {}
|
||||||
|
let config = {
|
||||||
|
url: `https://cmallapi.haday.cn/buyer-api/members/browsePage`,
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Accept": "*/*",
|
||||||
|
"Accept-Encoding": "gzip, deflate, br",
|
||||||
|
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||||
|
"Authorization": $.token,
|
||||||
|
"Connection": "keep-alive",
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"envVersion": "release",
|
||||||
|
"Host": "cmallapi.haday.cn",
|
||||||
|
"Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html",
|
||||||
|
"Sec-Fetch-Dest": "empty",
|
||||||
|
"Sec-Fetch-Mode": "cors",
|
||||||
|
"Sec-Fetch-Site": "cross-site",
|
||||||
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309092b) XWEB/8555",
|
||||||
|
"uuid": $.uuid,
|
||||||
|
"xweb_xhr": "1"
|
||||||
|
},
|
||||||
|
data: JSON.stringify(data)
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.code == 200) {
|
||||||
|
$.log(`浏览界面 操作成功`)
|
||||||
|
} else {
|
||||||
|
$.log(`浏览界面 操作失败[${JSON.stringify(result)}]`)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
//浏览社区
|
||||||
|
async function task_2() {
|
||||||
|
let data = {}
|
||||||
|
let config = {
|
||||||
|
url: `https://cmallapi.haday.cn/buyer-api/members/commnity/brosing/duration/add?seconds=100`,
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Accept": "*/*",
|
||||||
|
"Accept-Encoding": "gzip, deflate, br",
|
||||||
|
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||||
|
"Authorization": $.token,
|
||||||
|
"Connection": "keep-alive",
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"envVersion": "release",
|
||||||
|
"Host": "cmallapi.haday.cn",
|
||||||
|
"Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html",
|
||||||
|
"Sec-Fetch-Dest": "empty",
|
||||||
|
"Sec-Fetch-Mode": "cors",
|
||||||
|
"Sec-Fetch-Site": "cross-site",
|
||||||
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309092b) XWEB/8555",
|
||||||
|
"uuid": $.uuid,
|
||||||
|
"xweb_xhr": "1"
|
||||||
|
},
|
||||||
|
data: JSON.stringify(data)
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.statusCode == 200) {
|
||||||
|
$.log(`浏览社区 操作成功`)
|
||||||
|
} else {
|
||||||
|
$.log(`浏览社区 操作失败 貌似是正常的 [${result}]`)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
async function getLotteryNum() {
|
||||||
|
let config = {
|
||||||
|
url: `https://cmallapi.haday.cn/buyer-api/lucky/activity/opporturnity?activityCode=jfcj0527`,
|
||||||
|
method: "GET",
|
||||||
|
headers: {
|
||||||
|
"Accept": "*/*",
|
||||||
|
"Accept-Encoding": "gzip, deflate, br",
|
||||||
|
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||||
|
"Authorization": $.token,
|
||||||
|
"Connection": "keep-alive",
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"envVersion": "release",
|
||||||
|
"Host": "cmallapi.haday.cn",
|
||||||
|
"Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html",
|
||||||
|
"Sec-Fetch-Dest": "empty",
|
||||||
|
"Sec-Fetch-Mode": "cors",
|
||||||
|
"Sec-Fetch-Site": "cross-site",
|
||||||
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309092b) XWEB/8555",
|
||||||
|
"uuid": $.uuid,
|
||||||
|
"xweb_xhr": "1"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result.can_use > 0) {
|
||||||
|
$.canUse = result.can_use
|
||||||
|
$.log(`当前剩余抽奖次数:${result.can_use}`)
|
||||||
|
} else {
|
||||||
|
$.log(`当前剩余抽奖次数0`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function lottery() {
|
||||||
|
let config = {
|
||||||
|
url: `https://cmallapi.haday.cn/buyer-api/lucky/activity/extract?activityCode=jfcj0527`,
|
||||||
|
method: "GET",
|
||||||
|
headers: {
|
||||||
|
"Accept": "*/*",
|
||||||
|
"Accept-Encoding": "gzip, deflate, br",
|
||||||
|
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||||
|
"Authorization": $.token,
|
||||||
|
"Connection": "keep-alive",
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"envVersion": "release",
|
||||||
|
"Host": "cmallapi.haday.cn",
|
||||||
|
"Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html",
|
||||||
|
"Sec-Fetch-Dest": "empty",
|
||||||
|
"Sec-Fetch-Mode": "cors",
|
||||||
|
"Sec-Fetch-Site": "cross-site",
|
||||||
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309092b) XWEB/8555",
|
||||||
|
"uuid": $.uuid,
|
||||||
|
"xweb_xhr": "1"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result.lucky_record_vo) {
|
||||||
|
$.log(`抽奖获得:${result.lucky_record_vo.prize_name}`)
|
||||||
|
} else {
|
||||||
|
$.log(result.message)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
async function lotteryInfo() {
|
||||||
|
let config = {
|
||||||
|
url: `https://cmallapi.haday.cn/buyer-api/lucky/task/package/jfcj0527`,
|
||||||
|
method: "GET",
|
||||||
|
headers: {
|
||||||
|
"Accept": "*/*",
|
||||||
|
"Accept-Encoding": "gzip, deflate, br",
|
||||||
|
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||||
|
"Authorization": $.token,
|
||||||
|
"Connection": "keep-alive",
|
||||||
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
|
"envVersion": "release",
|
||||||
|
"Host": "cmallapi.haday.cn",
|
||||||
|
"Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html",
|
||||||
|
"Sec-Fetch-Dest": "empty",
|
||||||
|
"Sec-Fetch-Mode": "cors",
|
||||||
|
"Sec-Fetch-Site": "cross-site",
|
||||||
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309092b) XWEB/8555",
|
||||||
|
"uuid": $.uuid,
|
||||||
|
"xweb_xhr": "1"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.member_id) {
|
||||||
|
|
||||||
|
for (let i of result.task_list) {
|
||||||
|
if (i.today_obtained_task_number < i.today_available_task_number) {
|
||||||
|
if (i.task_key == 'LOGIN') {
|
||||||
|
await $.wait(3000)
|
||||||
|
|
||||||
|
await lottery_task_login()
|
||||||
|
}
|
||||||
|
if (i.task_key == 'POINT_EXCHANGE') {
|
||||||
|
for (let j = 0; j < i.today_available_task_number; j++) {
|
||||||
|
await $.wait(3000)
|
||||||
|
await lottery_task_exchange()
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (i.task_key == 'BROWSE_PAGE_TASK') {
|
||||||
|
await $.wait(3000)
|
||||||
|
|
||||||
|
await lottery_task_see(i.link)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$.log(`获取抽奖信息 操作失败[${JSON.stringify(result)}]`)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
//抽奖登录 领取次数
|
||||||
|
async function lottery_task_login() {
|
||||||
|
let data = {}
|
||||||
|
let config = {
|
||||||
|
url: `https://cmallapi.haday.cn/buyer-api/lucky/task/getLoginOpporturnity/jfcj0527`,
|
||||||
|
method: "PUT",
|
||||||
|
headers: {
|
||||||
|
"Accept": "*/*",
|
||||||
|
"Accept-Encoding": "gzip, deflate, br",
|
||||||
|
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||||
|
"Authorization": $.token,
|
||||||
|
"Connection": "keep-alive",
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"envVersion": "release",
|
||||||
|
"Host": "cmallapi.haday.cn",
|
||||||
|
"Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html",
|
||||||
|
"Sec-Fetch-Dest": "empty",
|
||||||
|
"Sec-Fetch-Mode": "cors",
|
||||||
|
"Sec-Fetch-Site": "cross-site",
|
||||||
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309092b) XWEB/8555",
|
||||||
|
"uuid": $.uuid,
|
||||||
|
"xweb_xhr": "1"
|
||||||
|
},
|
||||||
|
data: JSON.stringify(data)
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
$.log(result)
|
||||||
|
|
||||||
|
}
|
||||||
|
async function lottery_task_exchange() {
|
||||||
|
let config = {
|
||||||
|
url: `https://cmallapi.haday.cn/buyer-api/lucky/activity/redeem?activityCode=jfcj0527`,
|
||||||
|
method: "GET",
|
||||||
|
headers: {
|
||||||
|
"Accept": "*/*",
|
||||||
|
"Accept-Encoding": "gzip, deflate, br",
|
||||||
|
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||||
|
"Authorization": $.token,
|
||||||
|
"Connection": "keep-alive",
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"envVersion": "release",
|
||||||
|
"Host": "cmallapi.haday.cn",
|
||||||
|
"Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html",
|
||||||
|
"Sec-Fetch-Dest": "empty",
|
||||||
|
"Sec-Fetch-Mode": "cors",
|
||||||
|
"Sec-Fetch-Site": "cross-site",
|
||||||
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309092b) XWEB/8555",
|
||||||
|
"uuid": $.uuid,
|
||||||
|
"xweb_xhr": "1"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.member_id) {
|
||||||
|
$.log(`兑换次数成功`)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$.log(`兑换次数失败`)
|
||||||
|
$.log(result)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
//浏览页面
|
||||||
|
async function lottery_task_see(link) {
|
||||||
|
let config_start = {
|
||||||
|
url: `https://cmallapi.haday.cn/buyer-api/lucky/task/browse/page/start/jfcj0527?pageUrl=${link}`,
|
||||||
|
method: "GET",
|
||||||
|
headers: {
|
||||||
|
"Accept": "*/*",
|
||||||
|
"Accept-Encoding": "gzip, deflate, br",
|
||||||
|
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||||
|
"Authorization": $.token,
|
||||||
|
"Connection": "keep-alive",
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"envVersion": "release",
|
||||||
|
"Host": "cmallapi.haday.cn",
|
||||||
|
"Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html",
|
||||||
|
"Sec-Fetch-Dest": "empty",
|
||||||
|
"Sec-Fetch-Mode": "cors",
|
||||||
|
"Sec-Fetch-Site": "cross-site",
|
||||||
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309092b) XWEB/8555",
|
||||||
|
"uuid": $.uuid,
|
||||||
|
"xweb_xhr": "1"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
let { data: result_start } = await Request(config_start)
|
||||||
|
let config_end = {
|
||||||
|
url: `https://cmallapi.haday.cn/buyer-api/lucky/task/browse/page/start/jfcj0527?pageUrl=${link}`,
|
||||||
|
method: "GET",
|
||||||
|
headers: {
|
||||||
|
"Accept": "*/*",
|
||||||
|
"Accept-Encoding": "gzip, deflate, br",
|
||||||
|
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||||
|
"Authorization": $.token,
|
||||||
|
"Connection": "keep-alive",
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"envVersion": "release",
|
||||||
|
"Host": "cmallapi.haday.cn",
|
||||||
|
"Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html",
|
||||||
|
"Sec-Fetch-Dest": "empty",
|
||||||
|
"Sec-Fetch-Mode": "cors",
|
||||||
|
"Sec-Fetch-Site": "cross-site",
|
||||||
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309092b) XWEB/8555",
|
||||||
|
"uuid": $.uuid,
|
||||||
|
"xweb_xhr": "1"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
let { data: result_end } = await Request(config_end)
|
||||||
|
$.log(`浏览页面完成`)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function checkEnv(userCookie) {
|
||||||
|
const envSplitor = ["&", "\n"];
|
||||||
|
//console.log(userCookie);
|
||||||
|
let userList = userCookie
|
||||||
|
.split(envSplitor.find((o) => userCookie.includes(o)) || "&")
|
||||||
|
.filter((n) => n);
|
||||||
|
console.log(`共找到${userList.length}个账号`);
|
||||||
|
return userList;
|
||||||
|
}
|
||||||
|
// prettier-ignore
|
||||||
|
function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`).join("&") } getURLParams(url) { const params = {}; const queryString = url.split("?")[1]; if (queryString) { const paramPairs = queryString.split("&"); paramPairs.forEach((pair) => { const [key, value] = pair.split("="); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === "object" } catch (e) { return false } } isJson(obj) { var isjson = typeof obj == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if (this.isNode()) { await notify.sendNotify(this.name, message) } else { this.msg(this.name, "", message) } } randomNumber(length) { const characters = "0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } randomString(length) { const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) { new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))) } return t } msg(title = t, subtitle = "", body = "", options) { const formatOptions = (options) => { if (!options) { return options } else if (typeof options === "string") { if (this.isQuanX()) { return { "open-url": options } } else { return undefined } } else if (typeof options === "object" && (options["open-url"] || options["media-url"])) { if (this.isQuanX()) { return options } else { return undefined } } else { return undefined } }; if (!this.isMute) { if (this.isQuanX()) { $notify(title, subtitle, body, formatOptions(options)) } } let logs = ["", "==============📣系统通知📣=============="]; logs.push(title); subtitle ? logs.push(subtitle) : ""; body ? logs.push(body) : ""; console.log(logs.join("\n")); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isQuanX(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) }
|
||||||
|
|
||||||
|
async function Request(options) {
|
||||||
|
if ($.isNode()) {
|
||||||
|
const axios = require("axios");
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await axios.request(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if ($.isQuanX()) {
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await $task.fetch(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return await Request(options);
|
||||||
|
}
|
||||||
167
爱玛会员俱乐部.js
Normal file
167
爱玛会员俱乐部.js
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
/*
|
||||||
|
------------------------------------------
|
||||||
|
@Author: smallfawn 860562056
|
||||||
|
@Date: 2024.06.08 10.25
|
||||||
|
@Description: 爱玛会员俱乐部 小程序
|
||||||
|
------------------------------------------
|
||||||
|
变量名 aima
|
||||||
|
变量值 https://scrm.aimatech.com/aima 请求头Headers中access-token的值 多账号&或换行或新建同名变量
|
||||||
|
[Script]
|
||||||
|
http-response
|
||||||
|
|
||||||
|
[MITM]
|
||||||
|
hostname =
|
||||||
|
|
||||||
|
⚠️【免责声明】
|
||||||
|
------------------------------------------
|
||||||
|
1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
|
||||||
|
2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。
|
||||||
|
3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。
|
||||||
|
4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。
|
||||||
|
5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。
|
||||||
|
6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。
|
||||||
|
7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。
|
||||||
|
*/
|
||||||
|
|
||||||
|
const $ = new Env("爱玛会员俱乐部");
|
||||||
|
let ckName = `aima`;
|
||||||
|
let userCookie = checkEnv(
|
||||||
|
($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""
|
||||||
|
);
|
||||||
|
const notify = $.isNode() ? require("./sendNotify") : "";
|
||||||
|
|
||||||
|
!(async () => {
|
||||||
|
console.log(
|
||||||
|
`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
|
||||||
|
new Date().getTime() +
|
||||||
|
new Date().getTimezoneOffset() * 60 * 1000 +
|
||||||
|
8 * 60 * 60 * 1000
|
||||||
|
).toLocaleString()} \n==================================================`
|
||||||
|
);
|
||||||
|
//console.log(userCookie)
|
||||||
|
if (!userCookie?.length) return console.log(`没有找到CK哦`);
|
||||||
|
let index = 1;
|
||||||
|
let strSplitor = "#";
|
||||||
|
|
||||||
|
for (let user of userCookie) {
|
||||||
|
$.log(`\n🚀 user:【${index}】 start work\n`);
|
||||||
|
index++
|
||||||
|
$.token = user
|
||||||
|
$.ckStatus = true;
|
||||||
|
await signInSearch()
|
||||||
|
}
|
||||||
|
|
||||||
|
await $.sendMsg($.logs.join("\n"));
|
||||||
|
})()
|
||||||
|
.catch((e) => console.log(e))
|
||||||
|
.finally(() => $.done());
|
||||||
|
function MD5(data) {
|
||||||
|
const crypto = require('crypto');
|
||||||
|
return crypto.createHash('md5').update(data).digest('hex');
|
||||||
|
}
|
||||||
|
async function signInSearch() {
|
||||||
|
let accessToken = $.token.substring(50, 80)
|
||||||
|
let nonce = $.uuid()
|
||||||
|
let time = (new Date).getTime()
|
||||||
|
let text = `App-IdscrmTime-Stamp${time}TraceLog-Id${nonce}Access-Token${accessToken}AimaScrm321_^`
|
||||||
|
let data = JSON.stringify({
|
||||||
|
"activityId": "100000893"
|
||||||
|
});
|
||||||
|
let config = {
|
||||||
|
method: 'POST',
|
||||||
|
url: 'https://scrm.aimatech.com/aima/wxclient/mkt/activities/sign:search',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220089 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android',
|
||||||
|
'Accept-Encoding': 'gzip,compress,br,deflate',
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'time-stamp': time,
|
||||||
|
'charset': 'utf-8',
|
||||||
|
'app-id': 'scrm',
|
||||||
|
'sign': MD5(text),
|
||||||
|
'access-token': $.token,
|
||||||
|
'tracelog-id': nonce,
|
||||||
|
'Referer': 'https://servicewechat.com/wx2dcfb409fd5ddfb4/162/page-frame.html'
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
};
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result.code == 200) {
|
||||||
|
if (result.content.signed !== 1) {
|
||||||
|
$.log(`未签到 ===> 签到ing`)
|
||||||
|
await signInJoin()
|
||||||
|
} else {
|
||||||
|
$.log(`已签到 ===> 什么都不做`)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$.log(`签到查询失败`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function signInJoin() {
|
||||||
|
let accessToken = $.token.substring(50, 80)
|
||||||
|
let nonce = $.uuid()
|
||||||
|
let time = (new Date).getTime()
|
||||||
|
let text = `App-IdscrmTime-Stamp${time}TraceLog-Id${nonce}Access-Token${accessToken}AimaScrm321_^`
|
||||||
|
let data = JSON.stringify({
|
||||||
|
"activityId": "100000893",
|
||||||
|
"activitySceneId": null
|
||||||
|
});
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
method: 'POST',
|
||||||
|
url: 'https://scrm.aimatech.com/aima/wxclient/mkt/activities/sign:join',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220089 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android',
|
||||||
|
'Accept-Encoding': 'gzip,compress,br,deflate',
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'time-stamp': time,
|
||||||
|
'charset': 'utf-8',
|
||||||
|
'app-id': 'scrm',
|
||||||
|
'sign': MD5(text),
|
||||||
|
'access-token': $.token,
|
||||||
|
'tracelog-id': nonce,
|
||||||
|
'Referer': 'https://servicewechat.com/wx2dcfb409fd5ddfb4/162/page-frame.html'
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
};
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result.code == 200) {
|
||||||
|
$.log(`签到成功`)
|
||||||
|
} else {
|
||||||
|
$.log(`签到失败 [${result.chnDesc}]`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkEnv(userCookie) {
|
||||||
|
const envSplitor = ["&", "\n"];
|
||||||
|
//console.log(userCookie);
|
||||||
|
let userList = userCookie
|
||||||
|
.split(envSplitor.find((o) => userCookie.includes(o)) || "&")
|
||||||
|
.filter((n) => n);
|
||||||
|
console.log(`共找到${userList.length}个账号`);
|
||||||
|
return userList;
|
||||||
|
}
|
||||||
|
// prettier-ignore
|
||||||
|
function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`).join("&") } getURLParams(url) { const params = {}; const queryString = url.split("?")[1]; if (queryString) { const paramPairs = queryString.split("&"); paramPairs.forEach((pair) => { const [key, value] = pair.split("="); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === "object" } catch (e) { return false } } isJson(obj) { var isjson = typeof obj == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if (this.isNode()) { await notify.sendNotify(this.name, message) } else { this.msg(this.name, "", message) } } randomNumber(length) { const characters = "0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } randomString(length) { const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) { new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))) } return t } msg(title = t, subtitle = "", body = "", options) { const formatOptions = (options) => { if (!options) { return options } else if (typeof options === "string") { if (this.isQuanX()) { return { "open-url": options } } else { return undefined } } else if (typeof options === "object" && (options["open-url"] || options["media-url"])) { if (this.isQuanX()) { return options } else { return undefined } } else { return undefined } }; if (!this.isMute) { if (this.isQuanX()) { $notify(title, subtitle, body, formatOptions(options)) } } let logs = ["", "==============📣系统通知📣=============="]; logs.push(title); subtitle ? logs.push(subtitle) : ""; body ? logs.push(body) : ""; console.log(logs.join("\n")); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isQuanX(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) }
|
||||||
|
|
||||||
|
async function Request(options) {
|
||||||
|
if ($.isNode()) {
|
||||||
|
const axios = require("axios");
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await axios.request(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if ($.isQuanX()) {
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await $task.fetch(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return await Request(options);
|
||||||
|
}
|
||||||
180
瑷尔博士.js
Normal file
180
瑷尔博士.js
Normal file
@@ -0,0 +1,180 @@
|
|||||||
|
/*
|
||||||
|
------------------------------------------
|
||||||
|
@Author: smallfawn 860562056
|
||||||
|
@Date: 2024.06.11 12:44
|
||||||
|
@Description: 瑷尔博士官方云商城小程序
|
||||||
|
------------------------------------------
|
||||||
|
变量名airboshi
|
||||||
|
变量值 https://xapi.weimob.com/api3/ 域名下的Headers请求头的X-WX-Token 多账号&或换行或新增同名变量
|
||||||
|
[Script]
|
||||||
|
http-response
|
||||||
|
|
||||||
|
[MITM]
|
||||||
|
hostname =
|
||||||
|
|
||||||
|
⚠️【免责声明】
|
||||||
|
------------------------------------------
|
||||||
|
1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
|
||||||
|
2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。
|
||||||
|
3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。
|
||||||
|
4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。
|
||||||
|
5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。
|
||||||
|
6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。
|
||||||
|
7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。
|
||||||
|
*/
|
||||||
|
|
||||||
|
const $ = new Env("瑷尔博士官方云商城");
|
||||||
|
let ckName = `airboshi`;
|
||||||
|
let userCookie = checkEnv(
|
||||||
|
($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""
|
||||||
|
);
|
||||||
|
const notify = $.isNode() ? require("./sendNotify") : "";
|
||||||
|
|
||||||
|
!(async () => {
|
||||||
|
console.log(
|
||||||
|
`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
|
||||||
|
new Date().getTime() +
|
||||||
|
new Date().getTimezoneOffset() * 60 * 1000 +
|
||||||
|
8 * 60 * 60 * 1000
|
||||||
|
).toLocaleString()} \n==================================================`
|
||||||
|
);
|
||||||
|
//console.log(userCookie)
|
||||||
|
if (!userCookie?.length) return console.log(`没有找到CK哦`);
|
||||||
|
let index = 1;
|
||||||
|
let strSplitor = "#";
|
||||||
|
|
||||||
|
for (let user of userCookie) {
|
||||||
|
$.log(`\n🚀 user:【${index}】 start work\n`);
|
||||||
|
index++
|
||||||
|
$.token = user
|
||||||
|
$.ckStatus = true;
|
||||||
|
await signIn()
|
||||||
|
}
|
||||||
|
|
||||||
|
await $.sendMsg($.logs.join("\n"));
|
||||||
|
})()
|
||||||
|
.catch((e) => console.log(e))
|
||||||
|
.finally(() => $.done());
|
||||||
|
async function signIn() {
|
||||||
|
const config = {
|
||||||
|
method: 'post',
|
||||||
|
url: 'https://xapi.weimob.com/api3/onecrm/mactivity/sign/misc/sign/activity/c/signMainInfo',
|
||||||
|
headers: {
|
||||||
|
"Accept": "*/*",
|
||||||
|
"Accept-Encoding": "gzip, deflate, br",
|
||||||
|
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||||
|
"Connection": "keep-alive",
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"Host": "xapi.weimob.com",
|
||||||
|
"Referer": "https://servicewechat.com/wx0399cf391f15b422/46/page-frame.html",
|
||||||
|
"Sec-Fetch-Dest": "empty",
|
||||||
|
"Sec-Fetch-Mode": "cors",
|
||||||
|
"Sec-Fetch-Site": "cross-site",
|
||||||
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309092b) XWEB/8555",
|
||||||
|
"X-WX-Token": $.token,
|
||||||
|
"xweb_xhr": "1"
|
||||||
|
},
|
||||||
|
data: JSON.stringify({
|
||||||
|
"appid": "wx0399cf391f15b422",
|
||||||
|
"basicInfo": {
|
||||||
|
"vid": 6015569623153,
|
||||||
|
"vidType": 2,
|
||||||
|
"bosId": 4021407433153,
|
||||||
|
"productId": 146,
|
||||||
|
"productInstanceId": 6351100153,
|
||||||
|
"productVersionId": "14026",
|
||||||
|
"merchantId": 2000150059153,
|
||||||
|
"tcode": "weimob",
|
||||||
|
"cid": 376411153
|
||||||
|
},
|
||||||
|
"extendInfo": {
|
||||||
|
"wxTemplateId": 7579,
|
||||||
|
"analysis": [],
|
||||||
|
"bosTemplateId": 1000001485,
|
||||||
|
"childTemplateIds": [
|
||||||
|
{
|
||||||
|
"customId": 90004,
|
||||||
|
"version": "crm@0.1.17"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"customId": 90002,
|
||||||
|
"version": "ec@43.9"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"customId": 90006,
|
||||||
|
"version": "hudong@0.0.205"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"customId": 90008,
|
||||||
|
"version": "cms@0.0.429"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"quickdeliver": {
|
||||||
|
"enable": false
|
||||||
|
},
|
||||||
|
"youshu": {
|
||||||
|
"enable": false
|
||||||
|
},
|
||||||
|
"source": 1,
|
||||||
|
"channelsource": 5,
|
||||||
|
"refer": "onecrm-signgift",
|
||||||
|
//"mpScene": 1256
|
||||||
|
},
|
||||||
|
"queryParameter": null,
|
||||||
|
"i18n": {
|
||||||
|
"language": "zh",
|
||||||
|
"timezone": "8"
|
||||||
|
},
|
||||||
|
"pid": "",
|
||||||
|
"storeId": "",
|
||||||
|
"customInfo": {
|
||||||
|
"source": 0,
|
||||||
|
//"wid": 11167663828
|
||||||
|
}
|
||||||
|
})
|
||||||
|
};
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.errcode == "0") {
|
||||||
|
$.log(`签到成功`);
|
||||||
|
} else {
|
||||||
|
$.log(`签到失败`)
|
||||||
|
$.log(JSON.stringify(result))
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function checkEnv(userCookie) {
|
||||||
|
const envSplitor = ["&", "\n"];
|
||||||
|
//console.log(userCookie);
|
||||||
|
let userList = userCookie
|
||||||
|
.split(envSplitor.find((o) => userCookie.includes(o)) || "&")
|
||||||
|
.filter((n) => n);
|
||||||
|
console.log(`共找到${userList.length}个账号`);
|
||||||
|
return userList;
|
||||||
|
}
|
||||||
|
// prettier-ignore
|
||||||
|
function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`).join("&") } getURLParams(url) { const params = {}; const queryString = url.split("?")[1]; if (queryString) { const paramPairs = queryString.split("&"); paramPairs.forEach((pair) => { const [key, value] = pair.split("="); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === "object" } catch (e) { return false } } isJson(obj) { var isjson = typeof obj == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if (this.isNode()) { await notify.sendNotify(this.name, message) } else { this.msg(this.name, "", message) } } randomNumber(length) { const characters = "0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } randomString(length) { const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) { new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))) } return t } msg(title = t, subtitle = "", body = "", options) { const formatOptions = (options) => { if (!options) { return options } else if (typeof options === "string") { if (this.isQuanX()) { return { "open-url": options } } else { return undefined } } else if (typeof options === "object" && (options["open-url"] || options["media-url"])) { if (this.isQuanX()) { return options } else { return undefined } } else { return undefined } }; if (!this.isMute) { if (this.isQuanX()) { $notify(title, subtitle, body, formatOptions(options)) } } let logs = ["", "==============📣系统通知📣=============="]; logs.push(title); subtitle ? logs.push(subtitle) : ""; body ? logs.push(body) : ""; console.log(logs.join("\n")); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isQuanX(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) }
|
||||||
|
|
||||||
|
async function Request(options) {
|
||||||
|
if ($.isNode()) {
|
||||||
|
const axios = require("axios");
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await axios.request(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if ($.isQuanX()) {
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await $task.fetch(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return await Request(options);
|
||||||
|
}
|
||||||
318
统一.js
Normal file
318
统一.js
Normal file
@@ -0,0 +1,318 @@
|
|||||||
|
/*
|
||||||
|
------------------------------------------
|
||||||
|
@Author: smallfawn 86056
|
||||||
|
@Date: 2024.06.08 09.46
|
||||||
|
@Description: 统一抽奖大集结
|
||||||
|
------------------------------------------
|
||||||
|
变量名 tongyi
|
||||||
|
变量值抓https://xapi.weimob.com/api3/ Headers中的x-wx-token的值 多账号&或换行 或新建同名变量
|
||||||
|
[Script]
|
||||||
|
http-response
|
||||||
|
|
||||||
|
[MITM]
|
||||||
|
hostname =
|
||||||
|
|
||||||
|
⚠️【免责声明】
|
||||||
|
------------------------------------------
|
||||||
|
1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
|
||||||
|
2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。
|
||||||
|
3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。
|
||||||
|
4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。
|
||||||
|
5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。
|
||||||
|
6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。
|
||||||
|
7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。
|
||||||
|
*/
|
||||||
|
|
||||||
|
const $ = new Env("统一抽奖大集结");
|
||||||
|
let ckName = `tongyi`;
|
||||||
|
let userCookie = checkEnv(
|
||||||
|
($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""
|
||||||
|
);
|
||||||
|
const notify = $.isNode() ? require("./sendNotify") : "";
|
||||||
|
|
||||||
|
!(async () => {
|
||||||
|
console.log(
|
||||||
|
`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
|
||||||
|
new Date().getTime() +
|
||||||
|
new Date().getTimezoneOffset() * 60 * 1000 +
|
||||||
|
8 * 60 * 60 * 1000
|
||||||
|
).toLocaleString()} \n==================================================`
|
||||||
|
);
|
||||||
|
//console.log(userCookie)
|
||||||
|
if (!userCookie?.length) return console.log(`没有找到CK哦`);
|
||||||
|
let index = 1;
|
||||||
|
let strSplitor = "#";
|
||||||
|
|
||||||
|
for (let user of userCookie) {
|
||||||
|
$.log(`\n🚀 user:【${index}】 start work\n`);
|
||||||
|
index++
|
||||||
|
$.ckStatus = true;
|
||||||
|
$.token = user
|
||||||
|
let activityIds = [{ name: `小明同学`, id: 20001389211 }, { name: `雅马哈`, id: 20001390387 }, { name: `周末`, id: 20001403008 }]
|
||||||
|
for (let activity of activityIds) {
|
||||||
|
$.log(`当前玩的是[${activity.name}]`)
|
||||||
|
for (let i = 0; i < 5; i++) {
|
||||||
|
await lightCard(activity.id)
|
||||||
|
$.log(`本次抽奖结束延迟5s`)
|
||||||
|
await $.wait(5000)
|
||||||
|
}
|
||||||
|
$.log(`游戏结束延迟5s`)
|
||||||
|
await $.wait(5000)
|
||||||
|
}
|
||||||
|
await draw()
|
||||||
|
}
|
||||||
|
|
||||||
|
await $.sendMsg($.logs.join("\n"));
|
||||||
|
})()
|
||||||
|
.catch((e) => console.log(e))
|
||||||
|
.finally(() => $.done());
|
||||||
|
async function lightCard(activityId) {
|
||||||
|
|
||||||
|
let data = JSON.stringify({
|
||||||
|
"appid": "wx532ecb3bdaaf92f9",
|
||||||
|
"basicInfo": {
|
||||||
|
"vid": 6013753979957,
|
||||||
|
"vidType": 2,
|
||||||
|
"bosId": 4020112618957,
|
||||||
|
"productId": 165646,
|
||||||
|
"productInstanceId": 3169913957,
|
||||||
|
"productVersionId": "16233",
|
||||||
|
"merchantId": 2000020692957,
|
||||||
|
"tcode": "weimob",
|
||||||
|
"cid": 176205957
|
||||||
|
},
|
||||||
|
"extendInfo": {
|
||||||
|
"wxTemplateId": 7593,
|
||||||
|
"analysis": [],
|
||||||
|
"bosTemplateId": 1000001511,
|
||||||
|
"childTemplateIds": [
|
||||||
|
{
|
||||||
|
"customId": 90004,
|
||||||
|
"version": "crm@0.1.21"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"customId": 90002,
|
||||||
|
"version": " ec@46.4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"customId": 90006,
|
||||||
|
"version": "hudong@0.0.208"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"customId": 90008,
|
||||||
|
"version": "cms@0.0.439"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"customId": 90060,
|
||||||
|
"version": "elearning@0.1.1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"quickdeliver": {
|
||||||
|
"enable": false
|
||||||
|
},
|
||||||
|
"youshu": {
|
||||||
|
"enable": false
|
||||||
|
},
|
||||||
|
"source": 1,
|
||||||
|
"channelsource": 5,
|
||||||
|
"refer": "hd-card-home",
|
||||||
|
"mpScene": 1005
|
||||||
|
},
|
||||||
|
"queryParameter": null,
|
||||||
|
"i18n": {
|
||||||
|
"language": "zh",
|
||||||
|
"timezone": "8"
|
||||||
|
},
|
||||||
|
"pid": "4020112618957",
|
||||||
|
"storeId": "0",
|
||||||
|
"activityId": activityId, //////////////////////////////////////////
|
||||||
|
"source": 1,
|
||||||
|
"_version": "2.9.2",
|
||||||
|
"appletVersion": 280,
|
||||||
|
"_transformBasicInfo": true,
|
||||||
|
"v": "76e04a82cc9efce6e19336bfddab891410029744",
|
||||||
|
"operationSource": 4,
|
||||||
|
"vid": 6013753979957,
|
||||||
|
"vidType": 2,
|
||||||
|
"bosId": 4020112618957,
|
||||||
|
"productId": 165646,
|
||||||
|
"productInstanceId": 3169913957,
|
||||||
|
"productVersionId": "16233",
|
||||||
|
"merchantId": 2000020692957,
|
||||||
|
"tcode": "weimob",
|
||||||
|
"cid": 176205957,
|
||||||
|
"vidTypes": [
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"openid": "oBk224mM4QEh5M3dNtocB9ZU6foQ"
|
||||||
|
});
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
method: 'POST',
|
||||||
|
url: 'https://xapi.weimob.com/api3/interactive/qianxi/amasscard/api/lightCard',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220067 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android',
|
||||||
|
'Accept-Encoding': 'gzip,compress,br,deflate',
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'charset': 'utf-8',
|
||||||
|
'x-wx-token': $.token,
|
||||||
|
'Referer': 'https://servicewechat.com/wx532ecb3bdaaf92f9/195/page-frame.html',
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
};
|
||||||
|
let { data: result } = await Request(config);
|
||||||
|
if (result.errcode == '0') {
|
||||||
|
$.log(`抽卡成功[${result.data.cardId}]`)
|
||||||
|
} else {
|
||||||
|
$.log(`抽卡失败`)
|
||||||
|
$.log(JSON.stringify(result))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function draw() {
|
||||||
|
let data = JSON.stringify({
|
||||||
|
"appid": "wx532ecb3bdaaf92f9",
|
||||||
|
"basicInfo": {
|
||||||
|
"vid": 6013753979957,
|
||||||
|
"vidType": 2,
|
||||||
|
"bosId": 4020112618957,
|
||||||
|
"productId": 222,
|
||||||
|
"productInstanceId": 3169919957,
|
||||||
|
"productVersionId": "12004",
|
||||||
|
"merchantId": 2000020692957,
|
||||||
|
"tcode": "weimob",
|
||||||
|
"cid": 176205957
|
||||||
|
},
|
||||||
|
"extendInfo": {
|
||||||
|
"wxTemplateId": 7593,
|
||||||
|
"analysis": [],
|
||||||
|
"bosTemplateId": 1000001511,
|
||||||
|
"childTemplateIds": [
|
||||||
|
{
|
||||||
|
"customId": 90004,
|
||||||
|
"version": "crm@0.1.21"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"customId": 90002,
|
||||||
|
"version": " ec@46.4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"customId": 90006,
|
||||||
|
"version": "hudong@0.0.208"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"customId": 90008,
|
||||||
|
"version": "cms@0.0.439"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"customId": 90060,
|
||||||
|
"version": "elearning@0.1.1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"quickdeliver": {
|
||||||
|
"enable": false
|
||||||
|
},
|
||||||
|
"youshu": {
|
||||||
|
"enable": false
|
||||||
|
},
|
||||||
|
"source": 1,
|
||||||
|
"channelsource": 5,
|
||||||
|
"refer": "hd-lego-index",
|
||||||
|
"mpScene": 1005
|
||||||
|
},
|
||||||
|
"queryParameter": null,
|
||||||
|
"i18n": {
|
||||||
|
"language": "zh",
|
||||||
|
"timezone": "8"
|
||||||
|
},
|
||||||
|
"pid": "4020112618957",
|
||||||
|
"storeId": "0",
|
||||||
|
"_transformBasicInfo": true,
|
||||||
|
"_requrl": "/orchestration/mobile/activity/draw/play",
|
||||||
|
"templateId": 767,
|
||||||
|
"templateKey": "bigwheel",
|
||||||
|
"activityId": "30000041622",
|
||||||
|
"bussinessType": 1,
|
||||||
|
"channel": 1,
|
||||||
|
"channelType": 1,
|
||||||
|
"source": 1,
|
||||||
|
"_version": "2.5.4",
|
||||||
|
"activityIdentity": "20",
|
||||||
|
"openId": "oBk224mM4QEh5M3dNtocB9ZU6foQ",
|
||||||
|
"wid": 11165796601,
|
||||||
|
"appId": "wx532ecb3bdaaf92f9",
|
||||||
|
"playSourceCode": "lcode",
|
||||||
|
"vid": 6013753979957,
|
||||||
|
"vidType": 2,
|
||||||
|
"bosId": 4020112618957,
|
||||||
|
"productId": 222,
|
||||||
|
"productInstanceId": 3169919957,
|
||||||
|
"productVersionId": "12004",
|
||||||
|
"merchantId": 2000020692957,
|
||||||
|
"tcode": "weimob",
|
||||||
|
"cid": 176205957,
|
||||||
|
"vidTypes": [
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"openid": "oBk224mM4QEh5M3dNtocB9ZU6foQ"
|
||||||
|
});
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
method: 'POST',
|
||||||
|
url: 'https://xapi.weimob.com/api3/orchestration/mobile/activity/draw/play',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220067 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android',
|
||||||
|
'Accept-Encoding': 'gzip,compress,br,deflate',
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'charset': 'utf-8',
|
||||||
|
'x-wx-token': $.token,
|
||||||
|
'Referer': 'https://servicewechat.com/wx532ecb3bdaaf92f9/195/page-frame.html',
|
||||||
|
'Cookie': 'rprm_cuid=7849974103hl3bid9hbo'
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
};
|
||||||
|
let { data: result } = await Request(config);
|
||||||
|
if (result.errcode == '0') {
|
||||||
|
$.log(`抽奖成功[${result.data.cardId}]`)
|
||||||
|
} else if (result.errcode == "100200003") {
|
||||||
|
$.log(`抽奖失败 次数不够`)
|
||||||
|
} else {
|
||||||
|
$.log(`抽奖失败`)
|
||||||
|
$.log(JSON.stringify(result))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function checkEnv(userCookie) {
|
||||||
|
const envSplitor = ["&", "\n"];
|
||||||
|
console.log(userCookie);
|
||||||
|
let userList = userCookie
|
||||||
|
.split(envSplitor.find((o) => userCookie.includes(o)) || "&")
|
||||||
|
.filter((n) => n);
|
||||||
|
console.log(`共找到${userList.length}个账号`);
|
||||||
|
return userList;
|
||||||
|
}
|
||||||
|
// prettier-ignore
|
||||||
|
function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`).join("&") } getURLParams(url) { const params = {}; const queryString = url.split("?")[1]; if (queryString) { const paramPairs = queryString.split("&"); paramPairs.forEach((pair) => { const [key, value] = pair.split("="); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === "object" } catch (e) { return false } } isJson(obj) { var isjson = typeof obj == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if (this.isNode()) { await notify.sendNotify(this.name, message) } else { this.msg(this.name, "", message) } } randomNumber(length) { const characters = "0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } randomString(length) { const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) { new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))) } return t } msg(title = t, subtitle = "", body = "", options) { const formatOptions = (options) => { if (!options) { return options } else if (typeof options === "string") { if (this.isQuanX()) { return { "open-url": options } } else { return undefined } } else if (typeof options === "object" && (options["open-url"] || options["media-url"])) { if (this.isQuanX()) { return options } else { return undefined } } else { return undefined } }; if (!this.isMute) { if (this.isQuanX()) { $notify(title, subtitle, body, formatOptions(options)) } } let logs = ["", "==============📣系统通知📣=============="]; logs.push(title); subtitle ? logs.push(subtitle) : ""; body ? logs.push(body) : ""; console.log(logs.join("\n")); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isQuanX(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) }
|
||||||
|
|
||||||
|
async function Request(options) {
|
||||||
|
if ($.isNode()) {
|
||||||
|
const axios = require("axios");
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await axios.request(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if ($.isQuanX()) {
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await $task.fetch(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return await Request(options);
|
||||||
|
}
|
||||||
159
臭宝乐园.js
Normal file
159
臭宝乐园.js
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
/*
|
||||||
|
------------------------------------------
|
||||||
|
@Author: smallfawn
|
||||||
|
@Date: 2024.06.09 12.51
|
||||||
|
@Description: 臭宝乐园小程序 签到换螺蛳粉
|
||||||
|
------------------------------------------
|
||||||
|
变量名choubao
|
||||||
|
变量值 https://cbxcx.weinian.com.cn/wnuser 请求头Headers中authorization的值 多账号&或换行或新建同名变量
|
||||||
|
[Script]
|
||||||
|
http-response
|
||||||
|
|
||||||
|
[MITM]
|
||||||
|
hostname =
|
||||||
|
|
||||||
|
⚠️【免责声明】
|
||||||
|
------------------------------------------
|
||||||
|
1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
|
||||||
|
2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。
|
||||||
|
3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。
|
||||||
|
4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。
|
||||||
|
5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。
|
||||||
|
6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。
|
||||||
|
7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。
|
||||||
|
*/
|
||||||
|
|
||||||
|
const $ = new Env("臭宝乐园");
|
||||||
|
let ckName = `choubao`;
|
||||||
|
let userCookie = checkEnv(
|
||||||
|
($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""
|
||||||
|
);
|
||||||
|
const notify = $.isNode() ? require("./sendNotify") : "";
|
||||||
|
|
||||||
|
!(async () => {
|
||||||
|
console.log(
|
||||||
|
`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
|
||||||
|
new Date().getTime() +
|
||||||
|
new Date().getTimezoneOffset() * 60 * 1000 +
|
||||||
|
8 * 60 * 60 * 1000
|
||||||
|
).toLocaleString()} \n==================================================`
|
||||||
|
);
|
||||||
|
//console.log(userCookie)
|
||||||
|
if (!userCookie?.length) return console.log(`没有找到CK哦`);
|
||||||
|
let index = 1;
|
||||||
|
let strSplitor = "#";
|
||||||
|
|
||||||
|
for (let user of userCookie) {
|
||||||
|
$.log(`\n🚀 user:【${index}】 start work\n`);
|
||||||
|
index++
|
||||||
|
$.token = user
|
||||||
|
$.ckFlag = true;
|
||||||
|
await getUserInfo()
|
||||||
|
if ($.ckFlag) {
|
||||||
|
await signInCheck()
|
||||||
|
await $.wait(3000)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
await $.sendMsg($.logs.join("\n"));
|
||||||
|
})()
|
||||||
|
.catch((e) => console.log(e))
|
||||||
|
.finally(() => $.done());
|
||||||
|
|
||||||
|
async function signInCheck() {
|
||||||
|
let config = {
|
||||||
|
method: 'POST',
|
||||||
|
url: 'https://cbxcx.weinian.com.cn/wnuser/v1/memberUser/checkSignNum',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220089 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android',
|
||||||
|
'Accept-Encoding': 'gzip,compress,br,deflate',
|
||||||
|
'authorization': $.token,
|
||||||
|
'charset': 'utf-8',
|
||||||
|
'content-type': 'application/json',
|
||||||
|
'Referer': 'https://servicewechat.com/wx2206cca563f6f937/82/page-frame.html'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.status == 200) {
|
||||||
|
await signIn()
|
||||||
|
}else{
|
||||||
|
$.log(`获取签到状态[${result.msg}]`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function signIn() {
|
||||||
|
let config = {
|
||||||
|
method: 'POST',
|
||||||
|
url: 'https://cbxcx.weinian.com.cn/wnuser/v1/memberUser/daySign',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220089 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android',
|
||||||
|
'Accept-Encoding': 'gzip,compress,br,deflate',
|
||||||
|
'authorization': $.token,
|
||||||
|
'charset': 'utf-8',
|
||||||
|
'content-type': 'application/json',
|
||||||
|
'Referer': 'https://servicewechat.com/wx2206cca563f6f937/82/page-frame.html'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.status == 200) {
|
||||||
|
$.log(`签到成功`)
|
||||||
|
} else {
|
||||||
|
$.log(`签到失败【${result.msg}】`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function getUserInfo() {
|
||||||
|
let config = {
|
||||||
|
method: 'POST',
|
||||||
|
url: 'https://cbxcx.weinian.com.cn/wnuser/v1/memberUser/getMemberUser',
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220089 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android',
|
||||||
|
'Accept-Encoding': 'gzip,compress,br,deflate',
|
||||||
|
'authorization': $.token,
|
||||||
|
'charset': 'utf-8',
|
||||||
|
'content-type': 'application/json',
|
||||||
|
'Referer': 'https://servicewechat.com/wx2206cca563f6f937/82/page-frame.html'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.status == 200) {
|
||||||
|
$.log(`[${result.data.nickName}] 嗦粉币[${result.data.points}]`)
|
||||||
|
} else {
|
||||||
|
$.log(`获取用户信息失败【${result.msg}】`)
|
||||||
|
$.ckFlag = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkEnv(userCookie) {
|
||||||
|
const envSplitor = ["&", "\n"];
|
||||||
|
//console.log(userCookie);
|
||||||
|
let userList = userCookie
|
||||||
|
.split(envSplitor.find((o) => userCookie.includes(o)) || "&")
|
||||||
|
.filter((n) => n);
|
||||||
|
console.log(`共找到${userList.length}个账号`);
|
||||||
|
return userList;
|
||||||
|
}
|
||||||
|
// prettier-ignore
|
||||||
|
function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`).join("&") } getURLParams(url) { const params = {}; const queryString = url.split("?")[1]; if (queryString) { const paramPairs = queryString.split("&"); paramPairs.forEach((pair) => { const [key, value] = pair.split("="); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === "object" } catch (e) { return false } } isJson(obj) { var isjson = typeof obj == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if (this.isNode()) { await notify.sendNotify(this.name, message) } else { this.msg(this.name, "", message) } } randomNumber(length) { const characters = "0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } randomString(length) { const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) { new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))) } return t } msg(title = t, subtitle = "", body = "", options) { const formatOptions = (options) => { if (!options) { return options } else if (typeof options === "string") { if (this.isQuanX()) { return { "open-url": options } } else { return undefined } } else if (typeof options === "object" && (options["open-url"] || options["media-url"])) { if (this.isQuanX()) { return options } else { return undefined } } else { return undefined } }; if (!this.isMute) { if (this.isQuanX()) { $notify(title, subtitle, body, formatOptions(options)) } } let logs = ["", "==============📣系统通知📣=============="]; logs.push(title); subtitle ? logs.push(subtitle) : ""; body ? logs.push(body) : ""; console.log(logs.join("\n")); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isQuanX(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) }
|
||||||
|
|
||||||
|
async function Request(options) {
|
||||||
|
if ($.isNode()) {
|
||||||
|
const axios = require("axios");
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await axios.request(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if ($.isQuanX()) {
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await $task.fetch(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return await Request(options);
|
||||||
|
}
|
||||||
253
逑美And薇诺娜专柜小程序.js
Normal file
253
逑美And薇诺娜专柜小程序.js
Normal file
@@ -0,0 +1,253 @@
|
|||||||
|
/*
|
||||||
|
------------------------------------------
|
||||||
|
@Author: SMALLFAWN
|
||||||
|
@Date: 2024.06.10 13:34
|
||||||
|
@Description: 逑美小程序&薇诺娜专柜商城(薇诺娜旗下小程序)
|
||||||
|
------------------------------------------
|
||||||
|
变量名qiumei_weinuona
|
||||||
|
变量值 逑美小程序https://api.qiumeiapp.com/common-activity 域名下POST请求体 Body中appUserToken的值
|
||||||
|
薇诺娜专柜商城小程序https://api.qiumeiapp.com/zg-activity/ 域名下POST请求体 Body中appUserToken的值
|
||||||
|
两个值用#连接 多账号&或换行或新建同名变量
|
||||||
|
|
||||||
|
[Script]
|
||||||
|
http-response
|
||||||
|
|
||||||
|
[MITM]
|
||||||
|
hostname =
|
||||||
|
|
||||||
|
⚠️【免责声明】
|
||||||
|
------------------------------------------
|
||||||
|
1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
|
||||||
|
2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。
|
||||||
|
3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。
|
||||||
|
4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。
|
||||||
|
5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。
|
||||||
|
6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。
|
||||||
|
7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。
|
||||||
|
*/
|
||||||
|
|
||||||
|
const $ = new Env("逑美/薇诺娜专柜小程序");
|
||||||
|
let ckName = `qiumei_weinuona`;
|
||||||
|
let userCookie = checkEnv(
|
||||||
|
($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""
|
||||||
|
);
|
||||||
|
const notify = $.isNode() ? require("./sendNotify") : "";
|
||||||
|
|
||||||
|
!(async () => {
|
||||||
|
console.log(
|
||||||
|
`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
|
||||||
|
new Date().getTime() +
|
||||||
|
new Date().getTimezoneOffset() * 60 * 1000 +
|
||||||
|
8 * 60 * 60 * 1000
|
||||||
|
).toLocaleString()} \n==================================================`
|
||||||
|
);
|
||||||
|
//console.log(userCookie)
|
||||||
|
if (!userCookie?.length) return console.log(`没有找到CK哦`);
|
||||||
|
let index = 1;
|
||||||
|
let strSplitor = "#";
|
||||||
|
|
||||||
|
for (let user of userCookie) {
|
||||||
|
$.log(`\n🚀 user:【${index}】 start work\n`);
|
||||||
|
index++
|
||||||
|
$.token = user.split(strSplitor)[0]
|
||||||
|
$.token1 = user.split(strSplitor)[1]
|
||||||
|
$.ckStatus = false;
|
||||||
|
$.batchCode = null
|
||||||
|
await getWmcMemberInfo()
|
||||||
|
|
||||||
|
if ($.ckStatus) {
|
||||||
|
await getSigninBatch()
|
||||||
|
if ($.batchCode) {
|
||||||
|
await getUserSigninInfo()
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($.token1){
|
||||||
|
await userSignin1()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
await $.sendMsg($.logs.join("\n"));
|
||||||
|
})()
|
||||||
|
.catch((e) => console.log(e))
|
||||||
|
.finally(() => $.done());
|
||||||
|
|
||||||
|
async function userSignin() {
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
url: "https://api.qiumeiapp.com/common-activity/signin/userSignin",
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
'accept': '*/*',
|
||||||
|
'accept-language': 'zh-CN,zh;q=0.9',
|
||||||
|
'content-type': 'application/json',
|
||||||
|
'sec-fetch-dest': 'empty',
|
||||||
|
'sec-fetch-mode': 'cors',
|
||||||
|
'sec-fetch-site': 'cross-site',
|
||||||
|
'xweb_xhr': '1',
|
||||||
|
'Referer': 'https://servicewechat.com/wx30cc0fb02a84eb74/215/page-frame.html',
|
||||||
|
'Referrer-Policy': 'unsafe-url'
|
||||||
|
},
|
||||||
|
data: JSON.stringify({
|
||||||
|
appUserToken: $.token,
|
||||||
|
batchCode: $.batchCode
|
||||||
|
})
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.code == 200) {
|
||||||
|
$.log(`签到成功[${result.data.prizeName}]`)
|
||||||
|
} else {
|
||||||
|
$.log(`签到失败[${result.msg}]`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function userSignin1() {
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
url: "https://api.qiumeiapp.com/zg-activity/zg-daily/zgSigninNew",
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
'accept': '*/*',
|
||||||
|
'accept-language': 'zh-CN,zh;q=0.9',
|
||||||
|
'content-type': 'application/json',
|
||||||
|
'sec-fetch-dest': 'empty',
|
||||||
|
'sec-fetch-mode': 'cors',
|
||||||
|
'sec-fetch-site': 'cross-site',
|
||||||
|
'xweb_xhr': '1',
|
||||||
|
'Referer': 'https://servicewechat.com/wx250394ab3f680bfa/554/page-frame.html',
|
||||||
|
'Referrer-Policy': 'unsafe-url'
|
||||||
|
},
|
||||||
|
data: JSON.stringify({
|
||||||
|
appUserToken: $.token1,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.code == 200) {
|
||||||
|
$.log(`薇诺娜专柜/ 签到成功`)
|
||||||
|
} else {
|
||||||
|
$.log(`薇诺娜专柜/ 签到失败[${result.msg}]`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function getUserSigninInfo() {
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
url: "https://api.qiumeiapp.com/common-activity/signin/getUserSigninInfo",
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
'accept': '*/*',
|
||||||
|
'accept-language': 'zh-CN,zh;q=0.9',
|
||||||
|
'content-type': 'application/json',
|
||||||
|
'sec-fetch-dest': 'empty',
|
||||||
|
'sec-fetch-mode': 'cors',
|
||||||
|
'sec-fetch-site': 'cross-site',
|
||||||
|
'xweb_xhr': '1',
|
||||||
|
'Referer': 'https://servicewechat.com/wx30cc0fb02a84eb74/215/page-frame.html',
|
||||||
|
'Referrer-Policy': 'unsafe-url'
|
||||||
|
},
|
||||||
|
data: JSON.stringify({
|
||||||
|
appUserToken: $.token,
|
||||||
|
batchCode: $.batchCode
|
||||||
|
})
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.code == 200) {
|
||||||
|
if (result.data.runningDays !== 1) {
|
||||||
|
$.log(`未签到 ===> 签到ing`)
|
||||||
|
await userSignin()
|
||||||
|
} else {
|
||||||
|
$.log(`已签到 ===> 跳过签到`)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$.log(`获取签到信息失败[${result.msg}]`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function getWmcMemberInfo() {
|
||||||
|
let config = {
|
||||||
|
url: "https://api.qiumeiapp.com/qmxcx/10001/getWmcMemberInfo",
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
'accept': '*/*',
|
||||||
|
'accept-language': 'zh-CN,zh;q=0.9',
|
||||||
|
'content-type': 'application/json',
|
||||||
|
'sec-fetch-dest': 'empty',
|
||||||
|
'sec-fetch-mode': 'cors',
|
||||||
|
'sec-fetch-site': 'cross-site',
|
||||||
|
'xweb_xhr': '1',
|
||||||
|
'Referer': 'https://servicewechat.com/wx30cc0fb02a84eb74/215/page-frame.html',
|
||||||
|
'Referrer-Policy': 'unsafe-url'
|
||||||
|
},
|
||||||
|
data: JSON.stringify({
|
||||||
|
appUserToken: $.token,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.code == 200) {
|
||||||
|
$.log(`[${result.data.mobile}] 积分[${result.data.winonaPoint}}]`)
|
||||||
|
$.ckStatus = true
|
||||||
|
} else {
|
||||||
|
$.log(`获取用户信息失败[${result.msg}]`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function getSigninBatch() {
|
||||||
|
|
||||||
|
let config = {
|
||||||
|
url: "https://api.qiumeiapp.com/common-activity/signin/getSigninBatch",
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
'accept': '*/*',
|
||||||
|
'accept-language': 'zh-CN,zh;q=0.9',
|
||||||
|
'content-type': 'application/json',
|
||||||
|
'sec-fetch-dest': 'empty',
|
||||||
|
'sec-fetch-mode': 'cors',
|
||||||
|
'sec-fetch-site': 'cross-site',
|
||||||
|
'xweb_xhr': '1',
|
||||||
|
'Referer': 'https://servicewechat.com/wx30cc0fb02a84eb74/215/page-frame.html',
|
||||||
|
'Referrer-Policy': 'unsafe-url'
|
||||||
|
},
|
||||||
|
data: JSON.stringify({
|
||||||
|
appId: "wmcenter-1b60-11e8-98b9-7cd30ae08066"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
let { data: result } = await Request(config)
|
||||||
|
if (result?.code == 200) {
|
||||||
|
$.log(`本次签到batchCode为[${result.data.signinBatchCode}]`)
|
||||||
|
$.batchCode = result.data.signinBatchCode
|
||||||
|
} else {
|
||||||
|
$.log(`获取签到batchCode失败[${result.msg}]`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkEnv(userCookie) {
|
||||||
|
const envSplitor = ["&", "\n"];
|
||||||
|
//console.log(userCookie);
|
||||||
|
let userList = userCookie
|
||||||
|
.split(envSplitor.find((o) => userCookie.includes(o)) || "&")
|
||||||
|
.filter((n) => n);
|
||||||
|
console.log(`共找到${userList.length}个账号`);
|
||||||
|
return userList;
|
||||||
|
}
|
||||||
|
// prettier-ignore
|
||||||
|
function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`).join("&") } getURLParams(url) { const params = {}; const queryString = url.split("?")[1]; if (queryString) { const paramPairs = queryString.split("&"); paramPairs.forEach((pair) => { const [key, value] = pair.split("="); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === "object" } catch (e) { return false } } isJson(obj) { var isjson = typeof obj == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if (this.isNode()) { await notify.sendNotify(this.name, message) } else { this.msg(this.name, "", message) } } randomNumber(length) { const characters = "0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } randomString(length) { const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) { new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))) } return t } msg(title = t, subtitle = "", body = "", options) { const formatOptions = (options) => { if (!options) { return options } else if (typeof options === "string") { if (this.isQuanX()) { return { "open-url": options } } else { return undefined } } else if (typeof options === "object" && (options["open-url"] || options["media-url"])) { if (this.isQuanX()) { return options } else { return undefined } } else { return undefined } }; if (!this.isMute) { if (this.isQuanX()) { $notify(title, subtitle, body, formatOptions(options)) } } let logs = ["", "==============📣系统通知📣=============="]; logs.push(title); subtitle ? logs.push(subtitle) : ""; body ? logs.push(body) : ""; console.log(logs.join("\n")); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isQuanX(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) }
|
||||||
|
|
||||||
|
async function Request(options) {
|
||||||
|
if ($.isNode()) {
|
||||||
|
const axios = require("axios");
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await axios.request(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if ($.isQuanX()) {
|
||||||
|
Request = async (options) => {
|
||||||
|
try {
|
||||||
|
return await $task.fetch(options);
|
||||||
|
} catch (error) {
|
||||||
|
return error && error.error ? error.error : "请求失败";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return await Request(options);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user