This commit is contained in:
smallfawn
2023-06-30 13:56:29 +08:00
parent 48d3ad9346
commit 628c328ed4
4 changed files with 1090 additions and 1090 deletions

66
alyp.js
View File

@@ -37,33 +37,33 @@ class UserInfo {
if (tgLogFlag) { if (tgLogFlag) {
try { try {
this.mopenid = str.split("##")[0] this.mopenid = str.split("##")[0]
this.chatId = str.split("##")[1] this.chatId = str.split("##")[1]
this.ck = str this.ck = str
} catch (error) { } catch (error) {
console.log(error) console.log(error)
} }
} }
} }
async refresh() { async refresh() {
let name = "更新token"; let name = "更新token";
let options = { let options = {
method: "post", method: "post",
url: `https://auth.aliyundrive.com/v2/account/token`, url: `https://auth.aliyundrive.com/v2/account/token`,
headers: { headers: {
"Host": "auth.aliyundrive.com", "Host": "auth.aliyundrive.com",
"accept": "application/json", "accept": "application/json",
"content-type": "application/json; charset\u003dUTF-8", "content-type": "application/json; charset\u003dUTF-8",
}, },
body: `{"grant_type":"refresh_token","refresh_token":"${this.ck}"}` body: `{"grant_type":"refresh_token","refresh_token":"${this.ck}"}`
}; };
// console.log(options); // console.log(options);
let res = await httpRequest(options); let res = await httpRequest(options);
// console.log(res); // console.log(res);
if (res.status == 'enabled') { if (res.status == 'enabled') {
this.token = res.access_token this.token = res.access_token
this.nick_name= res.nick_name this.nick_name = res.nick_name
// this.cusLog(`账号 ${this.index} ${name}: 更新token `) // this.cusLog(`账号 ${this.index} ${name}: 更新token `)
await this.sign() await this.sign()
} else this.cusLog(`账号[${this.nick_name}] ${name} 失败 ❌ 了呢`), console.log(res); } else this.cusLog(`账号[${this.nick_name}] ${name} 失败 ❌ 了呢`), console.log(res);
} }
async sign() { async sign() {
@@ -72,42 +72,42 @@ class UserInfo {
method: "post", method: "post",
url: `https://member.aliyundrive.com/v1/activity/sign_in_list`, url: `https://member.aliyundrive.com/v1/activity/sign_in_list`,
headers: { headers: {
"Host": "member.aliyundrive.com", "Host": "member.aliyundrive.com",
"authorization": `Bearer ${this.token}`, "authorization": `Bearer ${this.token}`,
"accept": "application/json", "accept": "application/json",
"Content-Type": "application/json; charset\u003dUTF-8", "Content-Type": "application/json; charset\u003dUTF-8",
}, },
body: `{"isReward":false}` body: `{"isReward":false}`
}; };
// console.log(options); // console.log(options);
let res = await httpRequest(options); let res = await httpRequest(options);
// console.log(res); // console.log(res);
if (res.success == true) { if (res.success == true) {
this.id = res.result.signInCount this.id = res.result.signInCount
var o = this.id - 1 var o = this.id - 1
this.cusLog(`账号 [${this.nick_name} ] \n ${name}: 成功 \n ${res.result.signInLogs[o].calendarChinese} \n ${res.result.signInLogs[o].reward.notice} `) this.cusLog(`账号 [${this.nick_name} ] \n ${name}: 成功 \n ${res.result.signInLogs[o].calendarChinese} \n ${res.result.signInLogs[o].reward.notice} `)
await this.reward() await this.reward()
} else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res); } else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res);
} }
async reward() { async reward() {
let name = "领取"; let name = "领取";
let options = { let options = {
method: "post", method: "post",
url: `https://member.aliyundrive.com/v1/activity/sign_in_reward`, url: `https://member.aliyundrive.com/v1/activity/sign_in_reward`,
headers: { headers: {
"Host": "member.aliyundrive.com", "Host": "member.aliyundrive.com",
"authorization": `Bearer ${this.token}`, "authorization": `Bearer ${this.token}`,
"accept": "application/json", "accept": "application/json",
"Content-Type": "application/json; charset\u003dUTF-8", "Content-Type": "application/json; charset\u003dUTF-8",
}, },
body: `{"signInDay":${this.id}}` body: `{"signInDay":${this.id}}`
}; };
// console.log(options); // console.log(options);
let res = await httpRequest(options); let res = await httpRequest(options);
// console.log(res); // console.log(res);
if (res.success == true) { if (res.success == true) {
this.cusLog(` ${res.result.description} `) this.cusLog(` ${res.result.description} `)
} else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res); } else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res);
} }
@@ -157,7 +157,7 @@ class UserInfo {
// 入口 // 入口
!(async () => { !(async () => {
const notify = require("./sendNotify"); const notify = require("./sendNotify");
// $.doubleLog(await $.yiyan()); // $.doubleLog(await $.yiyan());
let users = await getUsers(CK_NAME, async (index, element) => { let users = await getUsers(CK_NAME, async (index, element) => {
let userInfo = new UserInfo(index, element); let userInfo = new UserInfo(index, element);
return userInfo; return userInfo;

1718
htx.js

File diff suppressed because it is too large Load Diff

266
jetta.js
View File

@@ -36,12 +36,12 @@ let result = '';
status = (status = $.getval("JETTA_tokenstatus") || "1") > 1 ? `${status}` : ""; // 账号扩展字符 status = (status = $.getval("JETTA_tokenstatus") || "1") > 1 ? `${status}` : ""; // 账号扩展字符
let JETTA_tokenArr = []; let JETTA_tokenArr = [];
let JETTA_token = $.isNode() let JETTA_token = $.isNode()
? process.env.JETTA_token
? process.env.JETTA_token ? process.env.JETTA_token
: "" ? process.env.JETTA_token
: $.getdata("JETTA_token") : ""
? $.getdata("JETTA_token") : $.getdata("JETTA_token")
: ""; ? $.getdata("JETTA_token")
: "";
let JETTA_tokens = ""; let JETTA_tokens = "";
let tz = $.getval("JETTA_tokentz") || "1"; let tz = $.getval("JETTA_tokentz") || "1";
let host = `https://yuasg.com`; let host = `https://yuasg.com`;
@@ -49,68 +49,68 @@ $.message = "";
//开始运行 //开始运行
!(async () => { !(async () => {
if (typeof $request !== "undefined") { if (typeof $request !== "undefined") {
jdck() jdck()
} else {
if (!$.isNode()) {
JETTA_tokenArr.push($.getdata("JETTA_token"));
let count = $.getval("JETTA_tokencount") || "1";
for (let i = 2; i <= count; i++) {
JETTA_tokenArr.push($.getdata(`JETTA_token${i}`));
}
if (!JETTA_tokenArr[0]) {
$.log(`\n【傻吊提示】你没有填写ck跑个嘚`);
$.message += `\n【傻吊提示】你没有填写ck跑个嘚`;
} else {
console.log(
`-------------共${JETTA_tokenArr.length}个账号-------------\n`
);
}
for (let i = 0; i < JETTA_tokenArr.length; i++) {
if (JETTA_tokenArr[i]) {
JETTA_token = JETTA_tokenArr[i];
$.index = i + 1;
console.log(`\n开始【捷达 账户 ${$.index}`);
await hbxxh();
await getUserInfo();
}
}
} else { } else {
if (process.env.JETTA_token && process.env.JETTA_token.indexOf("@") > -1) { if (!$.isNode()) {
JETTA_tokenArr = process.env.JETTA_token.split("@"); JETTA_tokenArr.push($.getdata("JETTA_token"));
console.log(`您选择的是用"@"隔开\n`); let count = $.getval("JETTA_tokencount") || "1";
} else { for (let i = 2; i <= count; i++) {
JETTA_tokens = [process.env.JETTA_token]; JETTA_tokenArr.push($.getdata(`JETTA_token${i}`));
} }
Object.keys(JETTA_tokens).forEach((item) => { if (!JETTA_tokenArr[0]) {
if (JETTA_tokens[item]) { $.log(`\n【傻吊提示】你没有填写ck跑个嘚`);
JETTA_tokenArr.push(JETTA_tokens[item]); $.message += `\n【傻吊提示】你没有填写ck跑个嘚`;
} else {
console.log(
`-------------共${JETTA_tokenArr.length}个账号-------------\n`
);
}
for (let i = 0; i < JETTA_tokenArr.length; i++) {
if (JETTA_tokenArr[i]) {
JETTA_token = JETTA_tokenArr[i];
$.index = i + 1;
console.log(`\n开始【捷达 账户 ${$.index}`);
await hbxxh();
await getUserInfo();
}
}
} else {
if (process.env.JETTA_token && process.env.JETTA_token.indexOf("@") > -1) {
JETTA_tokenArr = process.env.JETTA_token.split("@");
console.log(`您选择的是用"@"隔开\n`);
} else {
JETTA_tokens = [process.env.JETTA_token];
}
Object.keys(JETTA_tokens).forEach((item) => {
if (JETTA_tokens[item]) {
JETTA_tokenArr.push(JETTA_tokens[item]);
}
});
if (!JETTA_tokenArr[0]) {
$.log(`\n【傻吊提示】你没有填写ck跑个嘚`);
$.message += `\n【傻吊提示】你没有填写ck跑个嘚`;
} else {
console.log(
`-------------共${JETTA_tokenArr.length}个账号-------------\n`
);
}
for (let k = 0; k < JETTA_tokenArr.length; k++) {
JETTA_token = JETTA_tokenArr[k];
$.index = k + 1;
console.log(`\n开始【捷达 账户 ${$.index}`);
await hbxxh();
await getUserInfo();
}
} }
});
if (!JETTA_tokenArr[0]) {
$.log(`\n【傻吊提示】你没有填写ck跑个嘚`);
$.message += `\n【傻吊提示】你没有填写ck跑个嘚`;
} else {
console.log(
`-------------共${JETTA_tokenArr.length}个账号-------------\n`
);
}
for (let k = 0; k < JETTA_tokenArr.length; k++) {
JETTA_token = JETTA_tokenArr[k];
$.index = k + 1;
console.log(`\n开始【捷达 账户 ${$.index}`);
await hbxxh();
await getUserInfo();
}
} }
} message(); //通知
message(); //通知
})() })()
.catch((e) => $.logErr(e)) .catch((e) => $.logErr(e))
.finally(() => $.done()); .finally(() => $.done());
function jdck() { function jdck() {
if ($request.url.indexOf("getUserInfo") > -1) { if ($request.url.indexOf("getUserInfo") > -1) {
@@ -127,103 +127,103 @@ function jdck() {
} }
//红包小银行 //红包小银行
function hbxxh(timeout = 0) { function hbxxh(timeout = 0) {
return new Promise((resolve) => { return new Promise((resolve) => {
let url = { let url = {
url: `https://service-yy.jconnect.faw-vw.com/redpackbank/prize/getPrize`, url: `https://service-yy.jconnect.faw-vw.com/redpackbank/prize/getPrize`,
headers: { headers: {
"Host": "service-yy.jconnect.faw-vw.com", "Host": "service-yy.jconnect.faw-vw.com",
"pragma": "no-cache", "pragma": "no-cache",
"cache-control": "no-cache", "cache-control": "no-cache",
"accept": "application/json, text/plain, */*", "accept": "application/json, text/plain, */*",
"origin": "https://serviceui-yy-ui.jconnect.faw-vw.com", "origin": "https://serviceui-yy-ui.jconnect.faw-vw.com",
"sec-fetch-dest": "empty", "sec-fetch-dest": "empty",
"token": `${JETTA_token}`, "token": `${JETTA_token}`,
}, },
}; };
$.get( $.get(
url, url,
async (err, resp, data) => { async (err, resp, data) => {
try { try {
data = JSON.parse(data); data = JSON.parse(data);
if (data.status == 'SUCCEED') { if (data.status == 'SUCCEED') {
console.log("\n【获得】: " + data.data.todayPrize); console.log("\n【获得】: " + data.data.todayPrize);
$.message += "\n【获得】: " + data.data.data.data.todayPrize+'元' $.message += "\n【获得】: " + data.data.data.data.todayPrize + '元'
} else { } else {
console.log('\n【 ' + data.errorMessage + '】') console.log('\n【 ' + data.errorMessage + '】')
$.message +='\n红包小银行【 '+ data.errorMessage + '】' $.message += '\n红包小银行【 ' + data.errorMessage + '】'
} }
} catch (e) { } catch (e) {
} finally { } finally {
resolve(); resolve();
} }
}, },
timeout timeout
); );
}); });
} }
function getUserInfo(timeout = 0) { function getUserInfo(timeout = 0) {
return new Promise((resolve) => { return new Promise((resolve) => {
let url = { let url = {
url: `https://service-yy.jconnect.faw-vw.com/redpackbank/user/getUserInfo`, url: `https://service-yy.jconnect.faw-vw.com/redpackbank/user/getUserInfo`,
headers: { headers: {
"Host": "service-yy.jconnect.faw-vw.com", "Host": "service-yy.jconnect.faw-vw.com",
"pragma": "no-cache", "pragma": "no-cache",
"cache-control": "no-cache", "cache-control": "no-cache",
"accept": "application/json, text/plain, */*", "accept": "application/json, text/plain, */*",
"origin": "https://serviceui-yy-ui.jconnect.faw-vw.com", "origin": "https://serviceui-yy-ui.jconnect.faw-vw.com",
"sec-fetch-dest": "empty", "sec-fetch-dest": "empty",
"token": `${JETTA_token}`, "token": `${JETTA_token}`,
}, },
}; };
$.get( $.get(
url, url,
async (err, resp, data) => { async (err, resp, data) => {
try { try {
data = JSON.parse(data); data = JSON.parse(data);
if (data.status == 'SUCCEED') { if (data.status == 'SUCCEED') {
console.log("\n【余额】: " + data.data.detail.allPrize); console.log("\n【余额】: " + data.data.detail.allPrize);
$.message +="\n【余额】: " + data.data.detail.allPrize+'元' $.message += "\n【余额】: " + data.data.detail.allPrize + '元'
} else { } else {
} }
} catch (e) { } catch (e) {
} finally { } finally {
resolve(); resolve();
} }
}, },
timeout timeout
); );
}); });
} }
//通知 //通知
async function message() { async function message() {
if (tz == 1) { if (tz == 1) {
$.msg($.name, "", $.message); $.msg($.name, "", $.message);
} }
if ($.isNode()) { if ($.isNode()) {
await notify.sendNotify($.name, $.message); await notify.sendNotify($.name, $.message);
} }
} }

38
ylnn.js
View File

@@ -30,7 +30,7 @@ let msg = ''
async function main(userInfo) { async function main(userInfo) {
await userInfo.sign() await userInfo.sign()
await userInfo.point() await userInfo.point()
@@ -55,48 +55,48 @@ class UserInfo {
async sign() { async sign() {
let name = "签到"; let name = "签到";
let options = { let options = {
method: "post", method: "post",
url: `https://msmarket.msx.digitalyili.com/gateway/api/member/daily/sign`, url: `https://msmarket.msx.digitalyili.com/gateway/api/member/daily/sign`,
headers: { headers: {
"Host": "msmarket.msx.digitalyili.com", "Host": "msmarket.msx.digitalyili.com",
"charset": "utf-8", "charset": "utf-8",
"content-type": "application/json", "content-type": "application/json",
"access-token": `${this.ck}` "access-token": `${this.ck}`
}, },
body: `{}` body: `{}`
}; };
// console.log(options); // console.log(options);
let res = await httpRequest(options); let res = await httpRequest(options);
// console.log(res); // console.log(res);
if (res.status == true) { if (res.status == true) {
this.cusLog(`账号 ${this.index} : 签到成功`) this.cusLog(`账号 ${this.index} : 签到成功`)
} else if (res.status == false) { } else if (res.status == false) {
this.cusLog(`账号 ${this.index} : ck过期 请重新抓取 access-token`) this.cusLog(`账号 ${this.index} : ck过期 请重新抓取 access-token`)
} else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res); } else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res);
} }
async point() { async point() {
let name = "个人信息"; let name = "个人信息";
let options = { let options = {
method: "get", method: "get",
url: `https://msmarket.msx.digitalyili.com/gateway/api/member/point`, url: `https://msmarket.msx.digitalyili.com/gateway/api/member/point`,
headers: { headers: {
"Host": "msmarket.msx.digitalyili.com", "Host": "msmarket.msx.digitalyili.com",
"charset": "utf-8", "charset": "utf-8",
"content-type": "application/json", "content-type": "application/json",
"access-token": `${this.ck}` "access-token": `${this.ck}`
} }
}; };
// console.log(options); // console.log(options);
let res = await httpRequest(options); let res = await httpRequest(options);
// console.log(res); // console.log(res);
if (res.status == true) { if (res.status == true) {
this.cusLog(`账号 ${this.index} 总积分 : ${res.data} `) this.cusLog(`账号 ${this.index} 总积分 : ${res.data} `)
} else if (res.status == false) { } else if (res.status == false) {
this.cusLog(`账号 ${this.index} : ck过期 请重新抓取 access-token`) this.cusLog(`账号 ${this.index} : ck过期 请重新抓取 access-token`)
} else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res); } else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res);