Files
3288588344-toulu/浩阅免费小说.js
2024-07-09 12:06:37 +08:00

1 line
12 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
掌阅科技旗下 浩阅免费小说- 刷金币+查提现
运行空白请安装 jsrsasign 依赖
有问题联系3288588344
频道https://pd.qq.com/s/672fku8ge
一日五毛 已去掉所有验证
变量 hyck 无需抓包 打开我的 个人信息 账号id 填到变量内
分割方式 回车或者@
*/
const m = B9("【浩阅】 - 刷金币+查提现"),
U = require("crypto-js"),
V = require("got"),
u = 18000,
B0 = 3,
B1 = ["\n", "@"],
B2 = "hyck",
B3 = process.env[B2] || "",
B4 = console;
let B5 = process.env.mode || 1;
const B6 = 50;
B4.log("神秘代码: aHR0cHM6Ly90Lm1lLytJUjZQNnZlUzdsODVNemcx");
class B7 {
constructor(C) {
this.bk = 0;
if (C) {
this.ck = C;
}
this.index = m.userIdx++;
const f = {
limit: 3
};
const Q = {
retry: f,
timeout: u,
followRedirect: false
};
this.got = V.extend(Q);
}
async Task() {
try {
await this.qq();
await this.rewardedvideo(100178);
await this.newpage();
} catch (r) {}
}
async rewardedvideo(N) {
var r = m.ts(13),
x = {
method: "POST",
url: "https://saad.ms.zhangyue.net/rewarded-video/report?app_id=10116&zysid=205210080a2cee512e7b85ac461fccb6&usr=" + this.ck + "&rgt=&p1=ffffffffffffffffffffffff&pc=10&p2=319003&p3=17811671&p4=501671&p5=19&p6=&p7=__38CF19C02B8960D63DE543A54C3E2F8676CE0169CB0944658C3E55E69B2053B4&p9=3&p12=&p16=ONEPLUS+A6000&p21=31310&p22=10&p25=78116&p26=29&p28=94CF37C06B4780D89DE529A52C9E6F4818CE0387CB0722854C9E55E87B6059B2&p29=zyd70f8a&p30=__&p31=__2c117b4f57e3ccbf&p33=com.chaozh.cata.bkyd&bookId=null&chapterId=null&appId=&id=" + N + "&ext=",
headers: {
"User-Agent": "Apifox/1.0.0 (https://www.apifox.cn)",
"content-type": "application/x-www-form-urlencoded",
Accept: "*/*",
Host: "saad.ms.zhangyue.net",
Connection: "keep-alive"
},
form: {
usr: this.ck,
sign: this.SHA1_RSA("position=WELFARE_VIDEOCOIN_VIDEO&timestamp=" + r + "&usr=" + this.ck),
position: "WELFARE_VIDEOCOIN_VIDEO",
timestamp: r
}
};
let {
result: f
} = await this.request(x);
if (f.code == 0) {
console.log(this.x, "刷视频成功", f.msg);
} else {
console.log(this.x, "刷视频失败", f.msg);
}
}
async newpage() {
let f = {
fn: "查询",
method: "get",
url: "https://ah2.zhangyue.com/zytc/public/index.php?usr=" + this.ck + "&p1=ffffffffffffffffffffffff&p2=319003&p3=17811671&p4=501671&p5=19&p7=__38CF19C02B8960D63DE543A54C3E2F8676CE0169CB0944658C3E55E69B2053B4&p9=3&p16=ONEPLUS%20A6000&p21=31310&p22=10&p25=78116&p26=29&p28=94CF37C06B4780D89DE529A52C9E6F4818CE0387CB0722854C9E55E87B6059B2&p29=zyd70f8a&p30=__&p31=__2c117b4f57e3ccbf&p33=com.chaozh.cata.bkyd&zysid=0bc274841007e85d6243eaac2fc45e76&pca=GoldCoin.Index&ca=GoldCoin.TransferList&launch=newpage"
},
{
result: Q
} = await this.request(f);
try {
var A = Q?.["match"](/default_font(\W+)/g)[0]?.["split"](">")[1]?.["replace"]("</", "");
console.log(this.x, A);
} catch (n) {
var A = Q?.["match"](/class="item_info">([^s]\D+\S+)/g);
var F = Q?.["match"](/class="item_time">([^span]\D+\S+\s+\S+)/g);
for (var w of A) for (var k of ["class=\"item_info\"><span>", "</span><span class=\"record_gold\">", "</span></div><div"]) w = w.replace(k, "");
console.log(this.x, w);
for (var s of F) {
s = s.replace("class=\"item_time\">", "").replace("<span", "").replace("</div></li>", "");
console.log(this.x, s);
}
}
}
SHA1_RSA(N) {
this.pw = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMZTFP4Vy+hdNhXTPB5TnaIv8AFY\n 9vcpJS7tDUNCjr9luRAWyNFP8+VAdVQ++Kg7Q72w8BrfknFnOATQ7NZgkkgy76AI0DD95fLEXv0m\n uYNMr3v2WDivNPPg0heij91+wYe4bhevQAZ5Vjdo0LcphX4eeE6VeNjJXzTkKZCbEMWpAgMBAAEC\n gYEAuBGAWFquiBmLCzKkh5kfotpPLVD+1mLvyd/mAVkS1/13h8E93VcRjOMIgop3ityGgNZp4udC\n KdKdIYsvZcD3wjsiwBkzMS8WQCWK8ZlDf+5lylMdUpU3p7x1cntYEwAhH4Mh2ff/Zqx/2PN5WdDD\n AFwH0Uae9iPcLp07enUs9IkCQQD0wjQ05gvaJAC9ZN+UAFmvyENFMvHBofjQmyi8cGlRwyOKTkvA\n ut9lCTVdbuRgdKCSx37xLOwWB6l5q3RXsTRXAkEAz27rrkIHs+I0TqFU82BUAO3RVIv0VW18QQFt\n i2n/UL37hDh40YQoFNZbnhA6QryaG+5wLXdlxhPvAV3dTEGV/wJAGWc2p+7geAmYkg+wLNpEdLwi\n T0JUWTaIbo5MEhLQu423WJl7v0sl+ISWJ1ZlGaXBLLrL8BgrgLXW3yvubVOVDQJAHOG/1PqCogw7\n 5jrWXjCqYZq7S79U3NQquc5eF0xB7VcWfxlx0RJKlmQmS4LM6d/iwULYwavfMs4xuAn+txBmtwJA\n VOhDYDmJpdmtMXoDR2bcG55BBeGvjKKSZKxo+R7SVRAXektv8I97j+4rnzB1SYL0R+1NoMat+Cl4\n VKCsC7+OAA==";
this.Sha_Rsa = require("jsrsasign");
let C = this.Sha_Rsa.KEYUTIL.getKey("-----BEGIN PRIVATE KEY-----\n" + this.getNewline(this.pw, 76) + "\n-----END PRIVATE KEY-----");
const r = {
alg: "SHA1withRSA"
};
let x = new this.Sha_Rsa.KJUR.crypto.Signature(r);
x.init(C);
x.updateString(N);
let f = x.sign(),
A = this.Sha_Rsa.hex2b64(f);
return A;
}
getNewline(G, C) {
let f = new String(G),
Q = 0,
A = "";
for (let F = 0, w = f.length; F < w; F++) {
let k = f.charCodeAt(F);
k >= 1 && k <= 126 || 65376 <= k && k <= 65439 ? Q += 1 : Q += 2;
A += f.charAt(F);
Q >= C && (A += "\n", Q = 0);
}
return A;
}
async request(C) {
var f = null,
Q = 0,
A = C.fn || C.url;
C.method = C?.["method"]?.["toUpperCase"]() || "GET";
while (Q++ < B0) {
try {
await this.got(C).then(c => {
f = c;
}, c => {
f = c.response;
});
if ((f?.["statusCode"] / 100 | 0) <= 4) {
break;
}
} catch (l) {
"TimeoutError" == l.name ? this.log("[" + A + "]请求超时,重试第" + Q + "次") : this.log("[" + A + "]请求错误(" + l.message + "),重试第" + Q + "次");
}
}
const F = {
statusCode: -1,
headers: null,
result: null
};
if (f == null) {
return Promise.resolve(F);
}
let {
statusCode: w,
headers: k,
body: s
} = f;
if (s) {
try {
s = JSON.parse(s);
} catch {}
}
const b = {
statusCode: w,
headers: k,
result: s
};
return Promise.resolve(b);
}
async userTask() {
try {
await this.Task();
} catch (i) {}
}
qq() {
if (B5) {
const r = {
time: true,
sp: true,
console: false
};
m.log("账号[" + m.padStr(this.index, m.userCount.toString().length) + "]", r);
this.x = "";
} else {
this.x = "账号[" + m.padStr(this.index, m.userCount.toString().length) + "]";
}
}
}
!(async () => {
m.read_env(B7);
B4.log("共找到" + m.userCount + "个账号");
if (B5) {
for (const r of m.userList) await r.userTask();
} else {
await m.threadTask("userTask", B6);
}
})().catch(i => m.log(i)).finally(() => m.exitNow());
function B8(i = {}) {
console.log(i);
}
function B9(i) {
return new class {
constructor(G) {
this.name = G;
this.startTime = Date.now();
const f = {
time: true
};
this.log("[" + this.name + "]开始运行\n", f);
this.notifyStr = [];
this.notifyFlag = true;
this.userIdx = -1;
this.userList = [];
this.userCount = 0;
}
log(G, C = {}) {
let f = {
console: true
};
Object.assign(f, C);
if (f.time) {
let Q = f.fmt || "hh:mm:ss";
G = "[" + this.time(Q) + "]" + G;
}
if (f.sp) {
console.log("\n-------------- " + G + " --------------");
}
if (f.notify) {
this.notifyStr.push(G);
}
if (f.console) {
console.log(G);
}
}
read_env(G) {
let r = B3,
x = B1.filter(Q => r.includes(Q)),
f = x.length > 0 ? x[0] : B1[0];
for (let Q of r.split(f).filter(A => !!A)) {
this.userList.push(new G(Q));
}
this.userCount = this.userList.length;
if (!this.userCount) {
this.log("未找到变量,请检查变量" + B2);
return false;
}
try {
if (!B5) {
console.log("\n并发运行 ");
}
if (B5) {
console.log("\n顺序运行 ");
}
} catch (k) {}
return true;
}
EncryptCrypto(G, C, r, x, f, Q) {
return U[G].encrypt(U.enc.Utf8.parse(x), U.enc.Utf8.parse(f), {
mode: U.mode[C],
padding: U.pad[r],
iv: U.enc.Utf8.parse(Q)
}).ciphertext.toString(U.enc.Base64);
}
DecryptCrypto(G, C, r, x, f, Q) {
return U[G].decrypt({
ciphertext: U.enc.Base64.parse(x)
}, U.enc.Utf8.parse(f), {
mode: U.mode[C],
padding: U.pad[r],
iv: U.enc.Utf8.parse(Q)
}).toString(U.enc.Utf8);
}
async threads(G, C, r = {}) {
while (C.idx < m.userList.length) {
let Q = m.userList[C.idx++];
await Q[G](r);
}
}
async threadTask(G, C) {
let r = [];
let f = {
idx: 0
};
while (C--) {
r.push(this.threads(G, f));
}
await Promise.all(r);
}
randomarr(G) {
return [...Array(G)].map((r, x) => x + 1);
}
time(G, C = null) {
let Q = C ? new Date(C) : new Date(),
A = {
"M+": Q.getMonth() + 1,
"d+": Q.getDate(),
"h+": Q.getHours(),
"m+": Q.getMinutes(),
"s+": Q.getSeconds(),
"q+": Math.floor((Q.getMonth() + 3) / 3),
S: this.padStr(Q.getMilliseconds(), 3)
};
/(y+)/.test(G) && (G = G.replace(RegExp.$1, (Q.getFullYear() + "").substr(4 - RegExp.$1.length)));
for (let F in A) new RegExp("(" + F + ")").test(G) && (G = G.replace(RegExp.$1, 1 == RegExp.$1.length ? A[F] : ("00" + A[F]).substr(("" + A[F]).length)));
return G;
}
async showmsg() {
if (!this.notifyFlag) {
return;
}
if (!this.notifyStr.length) {
return;
}
var G = require("./sendNotify");
this.log("\n============== 推送 ==============");
await G.sendNotify(this.name, this.notifyStr.join("\n"));
}
padStr(G, C, r = {}) {
let Q = r.padding || "0",
A = r.mode || "l",
F = String(G),
w = C > F.length ? C - F.length : 0,
k = "";
for (let s = 0; s < w; s++) {
k += Q;
}
if (A == "r") {
F = F + k;
} else {
F = k + F;
}
return F;
}
json2str(G, C, r = false) {
let x = [];
for (let f of Object.keys(G).sort()) {
let A = G[f];
if (A && r) {
A = encodeURIComponent(A);
}
x.push(f + "=" + A);
}
return x.join(C);
}
getmd5(G, C = 0) {
if (C >= 1) {
return U.MD5(G).toString().toUpperCase();
} else {
return U.MD5(G).toString();
}
}
str2json(G, C = false) {
let r = {};
for (let x of G.split("&")) {
if (!x) {
continue;
}
let Q = x.indexOf("=");
if (Q == -1) {
continue;
}
let A = x.substr(0, Q),
F = x.substr(Q + 1);
if (C) {
F = decodeURIComponent(F);
}
r[A] = F;
}
return r;
}
randomPattern(G, C = "abcdef0123456789") {
let r = "";
for (let x of G) {
if (x == "x") {
r += C.charAt(Math.floor(Math.random() * C.length));
} else {
x == "X" ? r += C.charAt(Math.floor(Math.random() * C.length)).toUpperCase() : r += x;
}
}
return r;
}
randomString(G, C = "abcdefghijk0123456789") {
let x = "";
for (let f = 0; f < G; f++) {
x += C.charAt(Math.floor(Math.random() * C.length));
}
return x;
}
ts(G) {
if (G == 10) {
let r = Math.round(new Date().getTime() / 1000).toString();
return r;
} else {
let f = new Date().getTime();
return f;
}
}
randomNum(G) {
return m.randomString(G, "01234567890");
}
randomList(G) {
let C = Math.floor(Math.random() * G.length);
return G[C];
}
wait(G) {
G = G * 1000;
return new Promise(C => setTimeout(C, G));
}
async exitNow() {
let G = Date.now(),
C = (G - this.startTime) / 1000;
this.log("");
const r = {
time: true
};
this.log("[" + this.name + "]运行结束,共运行了" + C + "秒", r);
process.exit(0);
}
}(i);
}