mirror of
https://github.com/smallfawn/QLScriptPublic.git
synced 2025-12-17 23:35:02 +08:00
Update mxbc.js
This commit is contained in:
43
mxbc.js
43
mxbc.js
@@ -31,7 +31,7 @@ let userCount = 0;
|
|||||||
|
|
||||||
async function start() {
|
async function start() {
|
||||||
|
|
||||||
await notice()
|
await getNotice()
|
||||||
console.log('\n================== 用户CK ==================\n');
|
console.log('\n================== 用户CK ==================\n');
|
||||||
taskall = [];
|
taskall = [];
|
||||||
for (let user of userList) {
|
for (let user of userList) {
|
||||||
@@ -207,28 +207,31 @@ function getSHA256withRSA(content) {
|
|||||||
|
|
||||||
return sign64u;
|
return sign64u;
|
||||||
}
|
}
|
||||||
async function notice() {
|
/**
|
||||||
|
* 获取远程通知
|
||||||
|
*/
|
||||||
|
async function getNotice() {
|
||||||
try {
|
try {
|
||||||
let options = {
|
const urls = [
|
||||||
url: `https://ghproxy.com/https://raw.githubusercontent.com/smallfawn/api/main/notice.json`,
|
"https://ghproxy.com/https://raw.githubusercontent.com/smallfawn/Note/main/Notice.json",
|
||||||
headers: {
|
"https://fastly.jsdelivr.net/gh/smallfawn/Note@main/Notice.json",
|
||||||
'User-Agent': ''
|
"https://cdn.jsdelivr.net/gh/smallfawn/Note@main/Notice.json",
|
||||||
},
|
"https://gitee.com/smallfawn/Note/raw/master/Notice.json"
|
||||||
}
|
];
|
||||||
//console.log(options);
|
let notice = null;
|
||||||
let result = await httpRequest(options);
|
for (const url of urls) {
|
||||||
//console.log(result);
|
const options = {
|
||||||
if (result) {
|
url,
|
||||||
if ('notice' in result) {
|
headers: { "User-Agent": "" }
|
||||||
DoubleLog(`${result.notice}`);
|
};
|
||||||
} else {
|
const result = await httpRequest(options);
|
||||||
options.url = `https://gitee.com/smallfawn/api/raw/master/notice.json`
|
if (result && "notice" in result) {
|
||||||
result = await httpRequest(options);
|
notice = result.notice.replace(/\\n/g, '\n');
|
||||||
if ('notice' in result) {
|
break;
|
||||||
DoubleLog(`${result.notice}`);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
if (notice) {
|
||||||
|
DoubleLog(notice);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
|||||||
Reference in New Issue
Block a user