Collect authenticated Qinglong scripts batch
This commit is contained in:
58
脚本库/web版/抓包/17k/2023-03-01_17k_dfe209b3.js
Normal file
58
脚本库/web版/抓包/17k/2023-03-01_17k_dfe209b3.js
Normal file
@@ -0,0 +1,58 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/17k.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/17k.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/17k.js
|
||||
// # UploadedAt: 2023-03-01T15:17:32Z
|
||||
// # SHA256: dfe209b30bd8581cd2b2b80fac56de604614270edda9a410af9ccb054389cc3b
|
||||
// # Category: web版/抓包
|
||||
// # Evidence: web/H5关键词 + cookie/token/header
|
||||
//
|
||||
|
||||
//17k小说签到 app/网页cookie通用
|
||||
const axios = require("axios");
|
||||
const y7kck = config.y7k.cookie
|
||||
function get(url, method = "get", data = null) {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
let headers = { "cookie" : y7kck }
|
||||
if (method == "get") res = await axios.get(url, {
|
||||
headers
|
||||
});
|
||||
if (method == "post") res = await axios.post(url, data, {
|
||||
headers
|
||||
});
|
||||
resolve(res.data)
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
resolve("签到接口请求出错")
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
async function y7k() {
|
||||
my = "";signResult1 ="";signResult2 ="";
|
||||
//网页签到
|
||||
let res1 = await get("https://h5.17k.com/userSigninH5/saveUserSigninH5.html", "post", "0")
|
||||
signResult1 = res1.msg
|
||||
|
||||
//app任务 阅读30min
|
||||
let res2 =await get("http://api.17k.com/user/task/receive-prize","post","taskId=5&cpsOpid=0&_filterData=1&device_id=32536325221b1ba1&channel=0&_versions=1110&merchant=17Kyyb&platform=2&manufacturer=Xiaomi&clientType=1&appKey=4037465544&model=Redmi%20K30&cpsSource=0&brand=Redmi")
|
||||
console.log(res2.status.msg)
|
||||
|
||||
//app签到
|
||||
let signInfo = await get("http://api.17k.com/sign/user/info?access_token=1&clientType=1&cpsOpid=0&_filterData=1&channel=0&_versions=1070&merchant=17Kyyb&appKey=4037465544&cpsSource=0&platform=2")
|
||||
signResult2 =(signInfo.status.code == 0)?"签到成功":signInfo.status.msg
|
||||
|
||||
//查询
|
||||
let info = await get("http://api.17k.com/user/mine/merge?access_token=1&accountInfo=1&bindInfo=1&benefitsType=1&cpsOpid=0&_filterData=1&device_id=&channel=0&_versions=1230&merchant=17Khwyysd&platform=2&manufacturer=Xiaomi&clientType=1&width=1080&appKey=4037465544&cpsSource=0&youthModel=0&height=2175")
|
||||
if (info.status.code == 0 && info.data) {
|
||||
data = info.data
|
||||
my = `昵称:${data.nickname}\nK币:${data.accountInfo.balance}\nVIP:Lv${data.vipLevel}\n代金券:${data.accountInfo.totalBalance}\n推荐票:${data.cardInfo.recommendTicketCount}\napp签到:${signResult2}\nweb签到:${signResult1}`
|
||||
} else my = info.status.msg
|
||||
console.log(my)
|
||||
return "【17k小说】:"+my
|
||||
}
|
||||
|
||||
//y7k()
|
||||
module.exports = y7k;
|
||||
297
脚本库/web版/抓包/B站每日任务/2026-05-23_Bilibili_3f2f0084.py
Normal file
297
脚本库/web版/抓包/B站每日任务/2026-05-23_Bilibili_3f2f0084.py
Normal file
@@ -0,0 +1,297 @@
|
||||
# Source: https://github.com/CN-Grace/QinglongScripts/blob/main/Bilibili.py
|
||||
# Raw: https://raw.githubusercontent.com/CN-Grace/QinglongScripts/main/Bilibili.py
|
||||
# Repo: CN-Grace/QinglongScripts
|
||||
# Path: Bilibili.py
|
||||
# UploadedAt: 2026-05-23T15:48:24Z
|
||||
# SHA256: 3f2f0084618aefdba5d3f7361244ebec508c7db5a09cbe80d0b8170bb5d2d27f
|
||||
# Category: web版/抓包
|
||||
# Evidence: web/H5关键词 + cookie/token/header
|
||||
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
cron: 0 0 * * *
|
||||
new Env("B站每日任务")
|
||||
Bilibili 每日任务脚本
|
||||
- 漫画签到
|
||||
- 投币任务(支持指定投币数和投币来源)
|
||||
- 观看视频任务
|
||||
- 分享视频任务
|
||||
- 银瓜子兑换硬币(可选)
|
||||
- 获取今日经验、当前经验、预计升级天数
|
||||
"""
|
||||
|
||||
import os
|
||||
import time
|
||||
import requests
|
||||
|
||||
from utils import log_info, log_success, log_warning, log_error, beijing_time_str
|
||||
from notifier import send as notify_send
|
||||
|
||||
# ==================== 用户配置 ====================
|
||||
BILIBILI_COOKIE = os.environ.get("BILIBILI_COOKIE", "")
|
||||
COIN_NUM = int(os.environ.get("BILIBILI_COIN_NUM", "0"))
|
||||
COIN_TYPE = int(os.environ.get("BILIBILI_COIN_TYPE", "1"))
|
||||
SILVER2COIN = os.environ.get("BILIBILI_SILVER2COIN", "false").lower() == "true"
|
||||
|
||||
report_data = {}
|
||||
|
||||
|
||||
# ---------- Bilibili API ----------
|
||||
def get_nav(session):
|
||||
"""获取用户导航信息"""
|
||||
url = "https://api.bilibili.com/x/web-interface/nav"
|
||||
ret = session.get(url=url).json()
|
||||
data = ret.get("data", {})
|
||||
return data.get("uname"), data.get("mid"), data.get("isLogin"), data.get("money"), data.get("vipType"), data.get("level_info", {}).get("current_exp")
|
||||
|
||||
|
||||
def get_today_exp(session):
|
||||
"""获取今日经验明细"""
|
||||
url = "https://api.bilibili.com/x/member/web/exp/log?jsonp=jsonp"
|
||||
today = beijing_time_str("%Y-%m-%d")
|
||||
try:
|
||||
data_list = session.get(url=url).json().get("data", {}).get("list", [])
|
||||
return list(filter(lambda x: x["time"].split()[0] == today, data_list))
|
||||
except Exception:
|
||||
return []
|
||||
|
||||
|
||||
def manga_sign(session, platform="android"):
|
||||
"""漫画签到"""
|
||||
try:
|
||||
url = "https://manga.bilibili.com/twirp/activity.v1.Activity/ClockIn"
|
||||
ret = session.post(url=url, data={"platform": platform}).json()
|
||||
if ret["code"] == 0:
|
||||
return "✅ 签到成功"
|
||||
elif ret.get("msg") == "clockin clockin is duplicate":
|
||||
return "✅ 今天已经签到过了"
|
||||
else:
|
||||
msg = f"❌ 签到失败: {ret.get('msg', '未知错误')}"
|
||||
log_error(msg)
|
||||
return msg
|
||||
except Exception as e:
|
||||
msg = f"❌ 签到异常: {e!s}"
|
||||
log_error(msg)
|
||||
return msg
|
||||
|
||||
|
||||
def report_task(session, bili_jct, aid, cid, progres=300):
|
||||
"""上报视频观看进度"""
|
||||
url = "http://api.bilibili.com/x/v2/history/report"
|
||||
return session.post(url=url, data={"aid": aid, "cid": cid, "progres": progres, "csrf": bili_jct}).json()
|
||||
|
||||
|
||||
def share_task(session, bili_jct, aid):
|
||||
"""分享视频"""
|
||||
url = "https://api.bilibili.com/x/web-interface/share/add"
|
||||
return session.post(url=url, data={"aid": aid, "csrf": bili_jct}).json()
|
||||
|
||||
|
||||
def get_followings(session, uid, pn=1, ps=50, order="desc", order_type="attention"):
|
||||
"""获取关注的 up 主列表"""
|
||||
params = {"vmid": uid, "pn": pn, "ps": ps, "order": order, "order_type": order_type}
|
||||
return session.get(url="https://api.bilibili.com/x/relation/followings", params=params).json()
|
||||
|
||||
|
||||
def space_arc_search(session, uid, pn=1, ps=30, tid=0, order="pubdate", keyword=""):
|
||||
"""获取指定 up 主的视频投稿"""
|
||||
params = {"mid": uid, "pn": pn, "Ps": ps, "tid": tid, "order": order, "keyword": keyword}
|
||||
ret = session.get(url="https://api.bilibili.com/x/space/arc/search", params=params).json()
|
||||
data_list = [
|
||||
{"aid": one.get("aid"), "cid": 0, "title": one.get("title"), "owner": one.get("author")}
|
||||
for one in ret.get("data", {}).get("list", {}).get("vlist", [])[:2]
|
||||
]
|
||||
return data_list, 2
|
||||
|
||||
|
||||
def coin_add(session, bili_jct, aid, num=1, select_like=1):
|
||||
"""给视频投币"""
|
||||
url = "https://api.bilibili.com/x/web-interface/coin/add"
|
||||
return session.post(url=url, data={"aid": aid, "multiply": num, "select_like": select_like, "cross_domain": "true", "csrf": bili_jct}).json()
|
||||
|
||||
|
||||
def live_status(session):
|
||||
"""获取直播瓜子状态"""
|
||||
ret = session.get(url="https://api.live.bilibili.com/pay/v1/Exchange/getStatus").json()
|
||||
data = ret.get("data", {})
|
||||
return {"coin": data.get("coin", 0), "gold": data.get("gold", 0), "silver": data.get("silver", 0)}
|
||||
|
||||
|
||||
def get_region(session, rid=1, num=6):
|
||||
"""获取分区视频列表"""
|
||||
url = f"https://api.bilibili.com/x/web-interface/dynamic/region?ps={num}&rid={rid}"
|
||||
ret = session.get(url=url).json()
|
||||
return [{"aid": one.get("aid"), "cid": one.get("cid"), "title": one.get("title"), "owner": one.get("owner", {}).get("name")} for one in ret.get("data", {}).get("archives", [])]
|
||||
|
||||
|
||||
def silver2coin(session, bili_jct):
|
||||
"""银瓜子兑换硬币"""
|
||||
url = "https://api.live.bilibili.com/xlive/revenue/v1/wallet/silver2coin"
|
||||
return session.post(url=url, data={"csrf": bili_jct}).json()
|
||||
|
||||
|
||||
def main():
|
||||
global report_data
|
||||
report_data = {}
|
||||
|
||||
bilibili_cookie = {item.split("=")[0]: item.split("=")[1] for item in BILIBILI_COOKIE.split("; ")}
|
||||
bili_jct = bilibili_cookie.get("bili_jct")
|
||||
|
||||
session = requests.session()
|
||||
requests.utils.add_dict_to_cookiejar(session.cookies, bilibili_cookie)
|
||||
session.headers.update({
|
||||
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36 Edg/91.0.864.64",
|
||||
"Referer": "https://www.bilibili.com/",
|
||||
"accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
|
||||
"Connection": "keep-alive",
|
||||
})
|
||||
|
||||
uname, uid, is_login, coin, vip_type, current_exp = get_nav(session=session)
|
||||
if not is_login:
|
||||
log_error("登录失败,请检查 cookie")
|
||||
return "登录失败,请检查 cookie"
|
||||
|
||||
log_success(f"登录成功,用户名: {uname},UID: {uid},当前硬币: {coin}")
|
||||
report_data["账号"] = uname
|
||||
|
||||
# 漫画签到
|
||||
manhua_msg = manga_sign(session=session)
|
||||
log_info(f"漫画签到: {manhua_msg}")
|
||||
report_data["漫画签到"] = manhua_msg
|
||||
|
||||
# 获取分区视频列表
|
||||
aid_list = get_region(session=session)
|
||||
|
||||
# 计算今日已投币数
|
||||
today_exp_list = get_today_exp(session=session)
|
||||
coins_av_count = len(list(filter(lambda x: x.get("reason") == "视频投币奖励", today_exp_list)))
|
||||
need_coin_num = COIN_NUM - coins_av_count
|
||||
need_coin_num = need_coin_num if need_coin_num < coin else coin
|
||||
|
||||
log_info(f"今日已投币 {coins_av_count} 个,目标投币 {COIN_NUM} 个,还需投 {need_coin_num} 个")
|
||||
|
||||
# 根据 coin_type 选择投币来源
|
||||
if COIN_TYPE == 1:
|
||||
following_list = get_followings(session=session, uid=uid)
|
||||
count = 0
|
||||
for following in following_list.get("data", {}).get("list", []):
|
||||
mid = following.get("mid")
|
||||
if mid:
|
||||
tmplist, tmpcount = space_arc_search(session=session, uid=mid)
|
||||
aid_list += tmplist
|
||||
count += tmpcount
|
||||
if count > need_coin_num:
|
||||
log_info("已获取足够关注用户的视频")
|
||||
break
|
||||
else:
|
||||
aid_list += get_region(session=session)
|
||||
|
||||
# 投币循环
|
||||
success_count = 0
|
||||
if need_coin_num > 0:
|
||||
for one in aid_list[::-1]:
|
||||
ret = coin_add(session=session, aid=one.get("aid"), bili_jct=bili_jct)
|
||||
if ret.get("code") == 0:
|
||||
need_coin_num -= 1
|
||||
log_success(f"成功给《{one.get('title')}》投一个币")
|
||||
success_count += 1
|
||||
elif ret.get("code") == 34005:
|
||||
log_warning(f"投币《{one.get('title')}》失败: {ret.get('message')},继续下一个")
|
||||
continue
|
||||
else:
|
||||
log_error(f"投币《{one.get('title')}》失败: {ret.get('message')},跳过投币")
|
||||
break
|
||||
if need_coin_num <= 0:
|
||||
break
|
||||
coin_msg = f"今日成功投币 {success_count + coins_av_count}/{COIN_NUM} 个"
|
||||
else:
|
||||
coin_msg = f"今日成功投币 {coins_av_count}/{COIN_NUM} 个"
|
||||
log_info(coin_msg)
|
||||
report_data["投币任务"] = coin_msg
|
||||
|
||||
# 观看视频任务
|
||||
if aid_list:
|
||||
first = aid_list[0]
|
||||
report_ret = report_task(session=session, bili_jct=bili_jct, aid=first.get("aid"), cid=first.get("cid"))
|
||||
report_msg = f"✅ 观看《{first.get('title')}》300秒" if report_ret.get("code") == 0 else "❌ 观看任务失败"
|
||||
log_success(report_msg) if report_ret.get("code") == 0 else log_error(report_msg)
|
||||
|
||||
share_ret = share_task(session=session, bili_jct=bili_jct, aid=first.get("aid"))
|
||||
share_msg = f"✅ 分享《{first.get('title')}》成功" if share_ret.get("code") == 0 else "❌ 分享失败"
|
||||
log_success(share_msg) if share_ret.get("code") == 0 else log_error(share_msg)
|
||||
else:
|
||||
report_msg = "⚠️ 无视频可观看"; share_msg = "⚠️ 无视频可分享"
|
||||
log_warning(report_msg); log_warning(share_msg)
|
||||
report_data["观看视频"] = report_msg
|
||||
report_data["分享任务"] = share_msg
|
||||
|
||||
# 银瓜子兑换硬币
|
||||
s2c_msg = "⚪ 未开启兑换"
|
||||
if SILVER2COIN:
|
||||
silver2coin_ret = silver2coin(session=session, bili_jct=bili_jct)
|
||||
if silver2coin_ret.get("code") == 0:
|
||||
s2c_msg = "✅ 银瓜子兑换硬币成功"
|
||||
log_success(s2c_msg)
|
||||
else:
|
||||
s2c_msg = f"❌ 兑换失败: {silver2coin_ret.get('message', '未知错误')}"
|
||||
log_error(s2c_msg)
|
||||
report_data["瓜子兑换"] = s2c_msg
|
||||
|
||||
# 获取直播瓜子状态
|
||||
live_stats = live_status(session=session)
|
||||
report_data["硬币数量"] = live_stats["coin"]
|
||||
report_data["金瓜子数"] = live_stats["gold"]
|
||||
report_data["银瓜子数"] = live_stats["silver"]
|
||||
|
||||
# 再次获取用户信息,更新经验
|
||||
uname, uid, is_login, new_coin, vip_type, new_current_exp = get_nav(session=session)
|
||||
today_exp = sum(map(lambda x: x.get("delta", 0), get_today_exp(session=session)))
|
||||
update_data = (28800 - new_current_exp) // (today_exp if today_exp else 1) if today_exp else "未知"
|
||||
|
||||
report_data["今日经验"] = today_exp
|
||||
report_data["当前经验"] = new_current_exp
|
||||
report_data["升级还需"] = f"{update_data}天"
|
||||
|
||||
log_success("========== 任务执行汇总 ==========")
|
||||
for k, v in report_data.items():
|
||||
log_info(f"{k}: {v}")
|
||||
return report_data
|
||||
|
||||
|
||||
def build_report(data):
|
||||
"""构建签到报告"""
|
||||
lines = ["🎯 Bilibili 每日任务报告", "", f"👤 账号: {data.get('账号', '未知')}", ""]
|
||||
|
||||
tasks = [
|
||||
("📖 漫画签到", data.get("漫画签到", "")),
|
||||
("📺 观看视频", data.get("观看视频", "")),
|
||||
("🔗 分享任务", data.get("分享任务", "")),
|
||||
("💰 投币任务", data.get("投币任务", "")),
|
||||
("💱 瓜子兑换", data.get("瓜子兑换", "")),
|
||||
]
|
||||
for name, value in tasks:
|
||||
lines.append(f"{name}: {value}")
|
||||
|
||||
lines.append("")
|
||||
lines.append("📊 数据统计")
|
||||
lines.append(f"⭐ 今日经验: {data.get('今日经验', 0)}")
|
||||
lines.append(f"📈 当前经验: {data.get('当前经验', 0)}")
|
||||
lines.append(f"⏳ 升级还需: {data.get('升级还需', '未知')}")
|
||||
|
||||
lines.append("")
|
||||
lines.append("🥜 瓜子库存")
|
||||
lines.append(f"🪙 硬币数量: {data.get('硬币数量', 0)}")
|
||||
lines.append(f"✨ 金瓜子数: {data.get('金瓜子数', 0)}")
|
||||
lines.append(f"🥈 银瓜子数: {data.get('银瓜子数', 0)}")
|
||||
|
||||
lines.append("")
|
||||
lines.append("─" * 18)
|
||||
lines.append(f"🕒 执行时间: {beijing_time_str()}")
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
report = main()
|
||||
if report and isinstance(report, dict):
|
||||
tg_text = build_report(report)
|
||||
notify_send("Bilibili 每日任务报告", tg_text)
|
||||
141
脚本库/web版/抓包/NodeSeek签到/2026-05-23_Nodeseek_fe954847.py
Normal file
141
脚本库/web版/抓包/NodeSeek签到/2026-05-23_Nodeseek_fe954847.py
Normal file
@@ -0,0 +1,141 @@
|
||||
# Source: https://github.com/CN-Grace/QinglongScripts/blob/main/Nodeseek.py
|
||||
# Raw: https://raw.githubusercontent.com/CN-Grace/QinglongScripts/main/Nodeseek.py
|
||||
# Repo: CN-Grace/QinglongScripts
|
||||
# Path: Nodeseek.py
|
||||
# UploadedAt: 2026-05-23T15:48:24Z
|
||||
# SHA256: fe954847cd0f827c46a977716be00547e6496cf4df72f558542e5c846db4a19d
|
||||
# Category: web版/抓包
|
||||
# Evidence: web/H5关键词 + cookie/token/header
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
cron: 0 0 * * *
|
||||
new Env("NodeSeek签到")
|
||||
NodeSeek 论坛自动签到脚本
|
||||
- 使用 curl_cffi 模拟浏览器指纹
|
||||
- 支持随机延迟签到
|
||||
"""
|
||||
|
||||
import os
|
||||
import random
|
||||
import time
|
||||
from datetime import datetime
|
||||
from typing import Tuple
|
||||
|
||||
import requests
|
||||
from curl_cffi import requests as cffi_requests
|
||||
|
||||
from utils import log_info, log_success, log_warning, log_error, beijing_now, beijing_time_str
|
||||
from notifier import send as notify_send
|
||||
|
||||
# ==================== 用户配置 ====================
|
||||
NS_COOKIE = os.getenv("NS_COOKIE", "").strip()
|
||||
NS_RANDOM = os.getenv("NS_RANDOM", "true").strip().lower()
|
||||
NS_IMPERSONATE = os.getenv("NS_IMPERSONATE", "chrome110").strip()
|
||||
|
||||
|
||||
def _curl_post_json(url: str, headers: dict, timeout: int = 25):
|
||||
return cffi_requests.post(url, headers=headers, json={}, timeout=timeout, impersonate=NS_IMPERSONATE)
|
||||
|
||||
|
||||
def _normalize_random_flag(v: str) -> str:
|
||||
v = (v or "").strip().lower()
|
||||
return v if v in ("true", "false") else "true"
|
||||
|
||||
|
||||
def _sleep_jitter_before_checkin() -> int:
|
||||
"""签到前随机延迟 0~5 分钟"""
|
||||
delay_seconds = random.randint(0, 5 * 60)
|
||||
if delay_seconds <= 0:
|
||||
log_info("签到前随机延迟: 0s(跳过)")
|
||||
return 0
|
||||
minutes = delay_seconds // 60
|
||||
seconds = delay_seconds % 60
|
||||
log_info(f"签到前随机延迟: {minutes}m {seconds}s ...")
|
||||
time.sleep(delay_seconds)
|
||||
return delay_seconds
|
||||
|
||||
|
||||
def nodeseek_checkin(cookie: str, ns_random: str) -> Tuple[bool, str, str]:
|
||||
"""返回 (ok, status, message)"""
|
||||
if not cookie:
|
||||
return False, "invalid", "无有效 Cookie"
|
||||
|
||||
random_flag = _normalize_random_flag(ns_random)
|
||||
headers = {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0",
|
||||
"origin": "https://www.nodeseek.com",
|
||||
"referer": "https://www.nodeseek.com/board",
|
||||
"Content-Type": "application/json",
|
||||
"Cookie": cookie,
|
||||
}
|
||||
|
||||
url = f"https://www.nodeseek.com/api/attendance?random={random_flag}"
|
||||
try:
|
||||
start = datetime.now()
|
||||
r = _curl_post_json(url, headers=headers)
|
||||
elapsed_ms = int((datetime.now() - start).total_seconds() * 1000)
|
||||
|
||||
data = None
|
||||
try:
|
||||
data = r.json()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
msg = ""
|
||||
success_flag = None
|
||||
if isinstance(data, dict):
|
||||
msg = str(data.get("message") or "")
|
||||
success_flag = data.get("success")
|
||||
|
||||
if "鸡腿" in msg or bool(success_flag) is True:
|
||||
return True, "success", msg or "签到成功"
|
||||
if "已完成签到" in msg:
|
||||
return True, "already", msg
|
||||
if isinstance(data, dict) and data.get("status") == 404:
|
||||
return False, "invalid", msg or "Cookie 已失效"
|
||||
if getattr(r, "status_code", 0) >= 400:
|
||||
snippet = (r.text or "").strip()[:200]
|
||||
return False, "error", f"HTTP {r.status_code}: {snippet or '请求失败'}"
|
||||
return False, "fail", msg or "签到失败"
|
||||
except Exception as e:
|
||||
return False, "error", f"签到异常: {e}"
|
||||
|
||||
|
||||
def _format_result(ok: bool, status: str, message: str, elapsed_ms: int, delay_seconds: int) -> str:
|
||||
icon = "✅" if ok else "❌"
|
||||
delay_str = f"{delay_seconds // 60}m {delay_seconds % 60}s" if delay_seconds else "0s"
|
||||
lines = [
|
||||
f"{icon} 状态: {status}",
|
||||
f"🕒 时间: {beijing_time_str()} (UTC+8)",
|
||||
f"⏱️ 耗时: {elapsed_ms} ms",
|
||||
f"🕯️ 延迟: {delay_str} (签到前随机延迟)",
|
||||
f"📝 说明: {message}",
|
||||
]
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def main() -> int:
|
||||
log_info(f"NodeSeek 签到脚本启动(单账号)")
|
||||
|
||||
if not NS_COOKIE:
|
||||
content = _format_result(False, "invalid", "未配置 NS_COOKIE,无法签到。", 0, 0)
|
||||
print("\n" + content)
|
||||
notify_send("NodeSeek 签到结果", content)
|
||||
return 1
|
||||
|
||||
delay_seconds = _sleep_jitter_before_checkin()
|
||||
start = datetime.now()
|
||||
ok, status, message = nodeseek_checkin(NS_COOKIE, NS_RANDOM)
|
||||
elapsed_ms = int((datetime.now() - start).total_seconds() * 1000)
|
||||
|
||||
content = _format_result(ok, status, message, elapsed_ms, delay_seconds)
|
||||
title = f"NodeSeek 签到结果 @ {beijing_time_str()}"
|
||||
print("\n" + content)
|
||||
notify_send(title, content)
|
||||
return 0 if ok else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
File diff suppressed because one or more lines are too long
47
脚本库/web版/抓包/acdog/2021-04-16_acdog_6f2a1d7c.js
Normal file
47
脚本库/web版/抓包/acdog/2021-04-16_acdog_6f2a1d7c.js
Normal file
@@ -0,0 +1,47 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/acdog.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/acdog.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/acdog.js
|
||||
// # UploadedAt: 2021-04-16T00:43:18Z
|
||||
// # SHA256: 6f2a1d7c68045d9ac88c8f18c0c1f636c7f8b1b950882b61b4ed1bf2a24a12f6
|
||||
// # Category: web版/抓包
|
||||
// # Evidence: web/H5关键词 + cookie/token/header
|
||||
//
|
||||
|
||||
let header = {
|
||||
headers: {
|
||||
'referer': 'https://www.acgndog.com/category/qingxiaoshuo',
|
||||
'cookie': config.acdog.cookie }
|
||||
}
|
||||
const axios = require("axios")
|
||||
let result = "【次元🐕】:"
|
||||
async function getnonce() {
|
||||
var res = await axios.get('https://www.acgndog.com/wp-admin/admin-ajax.php?action=d2e5b56b75e2f3d4ab412a6d9561faee&%5Btype%5D=checkSigned&6bce68d6adeec8e9a3fb135daeb30b7f%5Btype%5D=checkUnread&7a2a6dd56f97c9a9a1b3bd5ade6d8f17%5Btype%5D=getUnreadCount', header)
|
||||
if (res.data.user.uid) {
|
||||
msg = "当前共" + res.data.customPoint.point + "狗爪 "
|
||||
nonce = res.data._nonce
|
||||
result += msg
|
||||
console.log(msg)
|
||||
await dailysign(nonce)
|
||||
} else {
|
||||
msg = "cookie已失效"
|
||||
result += msg
|
||||
console.log(msg)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
async function dailysign(nonce) {
|
||||
var res = await axios.get("https://www.acgndog.com/wp-admin/admin-ajax.php?_nonce=" + nonce + "&action=5ced0113734a2bc46ecf3f30b0685b7b&type=goSign", header)
|
||||
if (res.data.code == 0) {
|
||||
msg = res.data.msg
|
||||
} else {
|
||||
msg = "签到失败"
|
||||
console.log(res.data)
|
||||
|
||||
}
|
||||
console.log(msg)
|
||||
result += msg
|
||||
}
|
||||
|
||||
module.exports = getnonce
|
||||
54
脚本库/web版/抓包/aihao/2021-04-16_aihao_096bad64.js
Normal file
54
脚本库/web版/抓包/aihao/2021-04-16_aihao_096bad64.js
Normal file
@@ -0,0 +1,54 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/aihao.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/aihao.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/aihao.js
|
||||
// # UploadedAt: 2021-04-16T00:43:18Z
|
||||
// # SHA256: 096bad643c3f6c635572eea4ec218275001b9e4d8f0de7c26f3ca05b81db43a3
|
||||
// # Category: web版/抓包
|
||||
// # Evidence: web/H5关键词 + cookie/token/header
|
||||
//
|
||||
|
||||
const axios = require("axios");
|
||||
let result = "【爱好论坛】:";
|
||||
function aihao() {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
console.log("爱好论坛打卡开始...");
|
||||
let cookie = config.aihao.cookie;
|
||||
let header = { headers: { cookie: cookie } };
|
||||
for (i of [1, 2, 3, 4]) {
|
||||
str = ["上午打卡", "下午打卡", "晚上打卡", "全勤奖励"];
|
||||
data = `button${i}=`;
|
||||
res = await axios.post(
|
||||
"https://www.aihao.cc/plugin.php?id=daka",
|
||||
data,
|
||||
header
|
||||
);
|
||||
if (!res.data.match(/请先登录后才能继续使用/)) {
|
||||
if (res.data.match(/未到打卡时间|您本月还未打卡|已过打卡时间/)) {
|
||||
msg = "还没到打卡时间呢亲_(:D)∠)_";
|
||||
} else if (res.data.match(/打卡成功/)) {
|
||||
msg = res.data.match(/打卡成功!奖励金钱:\d+/);
|
||||
} else if (res.data.match(/请勿重复打卡/)) {
|
||||
msg = "当前时间段已经打过卡了嗷(๑°3°๑)";
|
||||
} else if (res.data.match(/无法获得全勤奖励/)) {
|
||||
msg = res.data.match(/无法获得全勤奖励!您本月打卡次数:\d+/);
|
||||
} else {
|
||||
msg = "签到失败!原因未知";
|
||||
console.log(res.data);
|
||||
}
|
||||
} else {
|
||||
msg = "cookie已失效";
|
||||
}
|
||||
console.log(str[i - 1] + ":" + msg);
|
||||
result += str[i - 1] + ":" + msg+" ";
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
resolve(result);
|
||||
});
|
||||
}
|
||||
|
||||
//aihao()
|
||||
module.exports = aihao;
|
||||
69
脚本库/web版/抓包/ccw/2024-01-22_ccw_ad367a77.js
Normal file
69
脚本库/web版/抓包/ccw/2024-01-22_ccw_ad367a77.js
Normal file
@@ -0,0 +1,69 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/ccw.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/ccw.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/ccw.js
|
||||
// # UploadedAt: 2024-01-22T22:39:08Z
|
||||
// # SHA256: ad367a776ed1a81284f3532d277a20e1e2dc050d9915ac9e5916aee6e310de3c
|
||||
// # Category: web版/抓包
|
||||
// # Evidence: web/H5关键词 + cookie/token/header
|
||||
//
|
||||
|
||||
const axios = require('axios');
|
||||
|
||||
let msg = "【共创世界】:\n";
|
||||
const token = config.ccw.token
|
||||
const headers = {
|
||||
'Content-Type': 'application/json',
|
||||
token
|
||||
};
|
||||
|
||||
async function checkIn() {
|
||||
const url = 'https://community-web.ccw.site/study-community/check_in_record/insert';
|
||||
const body = {
|
||||
"scene": "HOMEPAGE"
|
||||
};
|
||||
try {
|
||||
const response = await axios.post(url, body, { headers });
|
||||
if (response.data && response.data.code === "200") {
|
||||
console.log("签到成功");
|
||||
return "成功";
|
||||
} else if (response.data && response.data.code === "10736001") {
|
||||
console.log("用户已签到");
|
||||
return "用户已签到";
|
||||
} else {
|
||||
return "签到失败";
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("签到失败", error);
|
||||
return "签到失败";
|
||||
}
|
||||
}
|
||||
|
||||
async function queryBalance() {
|
||||
const url = 'https://community-web.ccw.site/currency/account/personal';
|
||||
|
||||
try {
|
||||
const response = await axios.post(url, {}, { headers });
|
||||
if (response.data && response.data.code === "200" && response.data.body) {
|
||||
console.log("当前积分:", response.data.body.internalCurrencyBalance);
|
||||
return response.data.body.internalCurrencyBalance.toString();
|
||||
} else {
|
||||
return "获取积分失败";
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("查询失败", error);
|
||||
return "查询失败";
|
||||
}
|
||||
}
|
||||
|
||||
async function task() {
|
||||
let checkInMsg = await checkIn();
|
||||
let balanceMsg = await queryBalance();
|
||||
msg += `签到:${checkInMsg}\n积分:${balanceMsg}`;
|
||||
// console.log(msg);
|
||||
return msg
|
||||
}
|
||||
|
||||
//task(); // 如果你想在文件执行时直接运行 task 函数
|
||||
|
||||
module.exports = task; // 允许其他文件导入并使用 task 函数
|
||||
63
脚本库/web版/抓包/cg163/2021-09-16_cg163_71024025.js
Normal file
63
脚本库/web版/抓包/cg163/2021-09-16_cg163_71024025.js
Normal file
@@ -0,0 +1,63 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/cg163.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/cg163.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/cg163.js
|
||||
// # UploadedAt: 2021-09-16T02:16:27Z
|
||||
// # SHA256: 71024025bbb27a426f7d5e1899ada14ca39b718b0b04918f478fd8b0deda6c7e
|
||||
// # Category: web版/抓包
|
||||
// # Evidence: web/H5关键词 + cookie/token/header
|
||||
//
|
||||
|
||||
const headers = {
|
||||
headers: {
|
||||
Authorization:
|
||||
config.cg163.Authorization || " bearer xxxxx",
|
||||
"user-agent":
|
||||
"Mozilla/5.0 (Linux; Android 10; Redmi K30 Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/85.0.4183.127 Mobile Safari/537.36",
|
||||
// "content-type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||
},
|
||||
};
|
||||
const axios = require("axios")
|
||||
function check() {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
const url = `https://n.cg.163.com/api/v2/users/@me`;
|
||||
let res = await axios.get(url, headers);
|
||||
console.log("cookie未失效,即将开始签到...");
|
||||
ckstatus = 1;
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
console.log("cookie已失效");
|
||||
ckstatus = 0;
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
function sign() {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
const url = `https://n.cg.163.com/api/v2/sign-today`;
|
||||
let res = await axios.post(url, "", headers);
|
||||
console.log("签到成功");
|
||||
msg = "签到成功!! ";
|
||||
} catch (err) {
|
||||
// console.log(err)
|
||||
msg = "签到失败,已签到过或其它未知原因!! ";
|
||||
console.log(msg);
|
||||
}
|
||||
resolve("【网易云游戏】:"+msg);
|
||||
});
|
||||
}
|
||||
async function cg163() {
|
||||
ckstatus = 0;
|
||||
await check();
|
||||
if (ckstatus == 1) {
|
||||
return await sign();
|
||||
} else {
|
||||
console.log("cookie失效,请重新抓取cookies...");
|
||||
return "【网易云游戏】: cookie失效,请重新抓取cookies...";
|
||||
}
|
||||
}
|
||||
//cg163()
|
||||
module.exports = cg163;
|
||||
47
脚本库/web版/抓包/du163/2021-10-10_du163_27825333.js
Normal file
47
脚本库/web版/抓包/du163/2021-10-10_du163_27825333.js
Normal file
@@ -0,0 +1,47 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/du163.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/du163.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/du163.js
|
||||
// # UploadedAt: 2021-10-10T06:20:09Z
|
||||
// # SHA256: 278253336ed5ca263518aca6ac174e963458e381dad2dc7bbfc04753cea43e2b
|
||||
// # Category: web版/抓包
|
||||
// # Evidence: web/H5关键词 + cookie/token/header
|
||||
//
|
||||
|
||||
//网易蜗牛读书
|
||||
const axios = require("axios");
|
||||
let result = "【网易蜗牛读书】: ";
|
||||
function du163() {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
const du = config.du163;
|
||||
const headers = {
|
||||
headers: {
|
||||
_xsrf: du.xsrf,
|
||||
"X-Auth-Token": du["X-Auth-Token"],
|
||||
"User-Agent":
|
||||
"Mozilla/5.0 (Linux; Android 10; Redmi K30 Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/85.0.4183.127 Mobile Safari/537.36 NeteaseSnailReader/1.9.11 NetType/3G+ (00ef591f8e05c305;coolapk) NEJSBridge/2.0.0",
|
||||
},
|
||||
};
|
||||
let url = `https://du.163.com/activity/201907/activityCenter/sign.jsonannel=0&_versions=1080&merchant=17Kxiaomi&platform=2&manufacturer=`;
|
||||
let data = { csrfToken: du.xsrf || 6 };
|
||||
let res = await axios.post(url, data, headers);
|
||||
if (res.data.code == -1104) {
|
||||
msg = res.data.msg;
|
||||
} else if (res.data.code == 0) {
|
||||
msg = res.data.message + " 连签" + res.data.continuousSignedDays + "天";
|
||||
} else {
|
||||
msg = "签到失败 "+res.data.msg;
|
||||
console.log(res.data);
|
||||
}
|
||||
result += msg;
|
||||
console.log(msg);
|
||||
} catch (err) {
|
||||
console.log(err.response.data.msg);
|
||||
result =result + "签到失败 "+ err.response.data.msg;
|
||||
}
|
||||
resolve(result);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = du163;
|
||||
57
脚本库/web版/抓包/hzw/2023-11-23_hzw_d2dc6e35.js
Normal file
57
脚本库/web版/抓包/hzw/2023-11-23_hzw_d2dc6e35.js
Normal file
@@ -0,0 +1,57 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/hzw.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/hzw.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/hzw.js
|
||||
// # UploadedAt: 2023-11-23T08:10:53Z
|
||||
// # SHA256: d2dc6e35db0770955352fc7fb0df0657b3d87da693dd7f42b538951aabd4d271
|
||||
// # Category: web版/抓包
|
||||
// # Evidence: web/H5关键词 + cookie/token/header
|
||||
//
|
||||
|
||||
// formhash获取(在浏览器F12控制台输入):document.querySelector('input[name="formhash"]').getAttribute('value')
|
||||
|
||||
const axios = require("axios");
|
||||
let result = "【海贼王论坛】:"
|
||||
|
||||
class HZW {
|
||||
constructor() {
|
||||
this.host = 'https://bbs.talkop.com/plugin.php';
|
||||
this.headers = {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0",
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
"Cookie": config.hzw.cookie,
|
||||
};
|
||||
this.body = `formhash=${config.hzw.formhash}&qdxq=kx&qdmode=2&todaysay=&fastreply=0`;
|
||||
}
|
||||
|
||||
// 签到
|
||||
async sign() {
|
||||
const url = this.host + '?id=dsu_paulsign:sign&operation=qiandao&infloat=1&sign_as=1&inajax=1';
|
||||
try {
|
||||
const res = await axios.post(url, this.body, {headers: this.headers});
|
||||
let matchResult = res.data.match(/(.+?)\r\n<\/div>/);
|
||||
let response = matchResult ? matchResult[1] : '签到失败,原因未知';
|
||||
console.log(`${response}`);
|
||||
result += `${response} ||`
|
||||
} catch (error) {
|
||||
console.log(`签到失败,原因是:${error}`);
|
||||
result += `签到失败,原因是:${error} ||`
|
||||
}
|
||||
}
|
||||
|
||||
async run() {
|
||||
await this.sign();
|
||||
console.log();
|
||||
}
|
||||
}
|
||||
|
||||
async function hzw() {
|
||||
const hzwlt = new HZW();
|
||||
await hzwlt.run();
|
||||
if (result.endsWith('||')) {
|
||||
result = result.substring(0, result.length - 2);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
module.exports = hzw;
|
||||
170
脚本库/web版/抓包/mtmc/2023-02-01_mtmc_7c844a5f.js
Normal file
170
脚本库/web版/抓包/mtmc/2023-02-01_mtmc_7c844a5f.js
Normal file
@@ -0,0 +1,170 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/mtmc.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/mtmc.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/mtmc.js
|
||||
// # UploadedAt: 2023-02-01T08:53:28Z
|
||||
// # SHA256: 7c844a5f0b597749d681c654ff47966a18bb9e725624d5125e3559184356fbfa
|
||||
// # Category: web版/抓包
|
||||
// # Evidence: web/H5关键词 + cookie/token/header
|
||||
//
|
||||
|
||||
const axios = require("axios");
|
||||
const {
|
||||
MTMC_userId,
|
||||
MTMC_fingerprint,
|
||||
MTMC_token,
|
||||
MTMC_uuid
|
||||
} = config.MeiTuan
|
||||
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
|
||||
|
||||
function get(task, method = "get", data = null) {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
let url = `https://mall.meituan.com/api/c/mallcoin/${task}&app_tag=union&bizId=2&ci=2&page_type=h5&poi=10000380&poiId=66&tenantId=1&t=${MTMC_token}&uci=-1&userid=${MTMC_userId}&utm_medium=android&utm_term=5.38.0&uuid=${MTMC_uuid}&xuuid=`
|
||||
const headers = {
|
||||
t: MTMC_token,
|
||||
"user-agent": "Mozilla/5.0 (Linux; Android 11; MEIZU 18 Pro Build/RKQ1.201105.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/104.0.5112.69 Mobile Safari/537.36 TitansX/20.12.6 KNB/1.2.0 android/11 com.meituan.retail.v.android/armv7 App/11g20/5.38.0 com.meituan.retail.v.android/5.38.0",
|
||||
Host: "mall.meituan.com",
|
||||
"X-Requested-With": "com.meituan.retail.v.android",
|
||||
"Content-Type": "application/json; charset=utf-8"
|
||||
}
|
||||
|
||||
//console.log(headers)
|
||||
if (method == "get") res = await axios.get(url, {
|
||||
headers
|
||||
});
|
||||
if (data) {
|
||||
xxstr = {
|
||||
"platform": 4,
|
||||
"app": 95,
|
||||
"utm_term": "5.38.0",
|
||||
"uuid": MTMC_uuid,
|
||||
"fingerprint": MTMC_fingerprint,
|
||||
"utm_medium": 95
|
||||
}
|
||||
data.riskMap ==
|
||||
Object.assign(data.riskMap, xxstr)
|
||||
}
|
||||
// console.log(data)
|
||||
if (method == "post") res = await axios.post(url, data, {
|
||||
headers
|
||||
});
|
||||
if (res.data.code == 0) console.log(" 操作成功")
|
||||
// console.log(headers)
|
||||
// console.log(res.data)
|
||||
resolve(res.data)
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
resolve({
|
||||
code: 500,
|
||||
error: {
|
||||
msg: "签到接口请求出错"
|
||||
}
|
||||
})
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
async function getaskList() {
|
||||
console.log("查询任务列表")
|
||||
let res = await get("checkIn/queryTaskListInfoV3?&channel=1", "post", {
|
||||
"riskMap": {
|
||||
"partner": 109,
|
||||
"campaignId": 1002,
|
||||
"campaignName": "买菜币"
|
||||
}
|
||||
})
|
||||
if (res.code == 0 && res.data) return res.data.checkInTaskInfos.filter(x => x.id == 52 && x.taskFinishCount != x.taskChance || x.status == 100)
|
||||
return []
|
||||
}
|
||||
|
||||
|
||||
async function sign() {
|
||||
signmsg = ""
|
||||
console.log("去签到:")
|
||||
let signRes = await get("checkIn/userCheckInNew?", "post", {
|
||||
"userId": MTMC_userId,
|
||||
"riskMap": {}
|
||||
})
|
||||
if (signRes.code == 0) {
|
||||
if (signRes.data.result) signmsg = `签到成功!获得 ${signRes.data.rewardValue} 买菜币`
|
||||
else signmsg = `签到失败!可能签到过啦`
|
||||
console.log(" " + signmsg)
|
||||
|
||||
} else signmsg = signRes.error.msg
|
||||
//console.log(signRes)/
|
||||
//
|
||||
for (rewardDate of [3, 7]) {
|
||||
await get("checkIn/getWeekContinuousRewardNew?", "post", {
|
||||
userId: MTMC_userId,
|
||||
rewardDate: rewardDate,
|
||||
"riskMap": {}
|
||||
})
|
||||
}
|
||||
return signmsg
|
||||
}
|
||||
//浏览任务
|
||||
async function view() {
|
||||
let taskList = await getaskList()
|
||||
if (taskList.length != 0) {
|
||||
let task = taskList[0]
|
||||
//领取
|
||||
console.log("浏览任务开始:\n 去领取浏览任务:")
|
||||
console.log(" " + task.buttonDesc)
|
||||
if (task) {
|
||||
|
||||
if (task.buttonDesc == "领任务" || task.status == 10) {
|
||||
let lqRes = await get("checkIn/takeTask?activityId=33&taskId=52&channel=1")
|
||||
if (lqRes && lqRes.code == 0) {
|
||||
console.log(" 领取成功\n等待17s")
|
||||
await sleep(17 * 1000)
|
||||
await get("checkIn/taskEventComplete?eventType=6&channel=1")
|
||||
|
||||
} else console.log(" " + lqRes.error.msg)
|
||||
taskList = await getaskList()
|
||||
task = taskList[0]
|
||||
}
|
||||
|
||||
if (task.buttonDesc == "领奖励") {
|
||||
await sleep(3 * 1000)
|
||||
console.log(" 去领取奖励:")
|
||||
let lqReward = await get(`checkIn/takeTaskReward?activityId=33&taskId=52&rewardId=774&taskType=6&userTaskId=${task.userTaskId}&channel=1`)
|
||||
if (lqReward && lqReward.code == 0) {
|
||||
console.log(` 领取成功!获得 ${lqReward.data.rewardType} ${lqReward.data.rewardValue}`)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else console.log(" 暂无可领取任务")
|
||||
}
|
||||
}
|
||||
async function getmyb() {
|
||||
let res = await get("checkIn/getCheckInMainView?")
|
||||
if (res && res.code == 0) return `\n 我的菜币:${res.data.userInfo.balance}\n 签到天数:${res.data.checkInCount}\n smjb:${res.data.noticeDetail}\n`
|
||||
else return ""
|
||||
|
||||
}
|
||||
|
||||
async function share() {
|
||||
console.log("去分享:")
|
||||
let res = await get("checkIn/getShareReward?shareBusinessType=2&")
|
||||
if (res.code == 0) {
|
||||
if (res.data.result) console.log(` 分享成功!获得 ${res.data.rewardValue}菜币`)
|
||||
else console.log(" 分享过啦")
|
||||
}
|
||||
}
|
||||
async function meituanmc() {
|
||||
let signMsg = await sign()
|
||||
await view()
|
||||
await share()
|
||||
myInfo = await getmyb()
|
||||
content = ` 【美团买菜】 签到:${signMsg} ${myInfo}`
|
||||
console.log(myInfo)
|
||||
return content
|
||||
}
|
||||
|
||||
|
||||
|
||||
module.exports = meituanmc
|
||||
126
脚本库/web版/抓包/pfjsq/2023-11-22_pfjsq_43885f51.js
Normal file
126
脚本库/web版/抓包/pfjsq/2023-11-22_pfjsq_43885f51.js
Normal file
@@ -0,0 +1,126 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/pfjsq.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/pfjsq.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/pfjsq.js
|
||||
// # UploadedAt: 2023-11-22T14:22:59Z
|
||||
// # SHA256: 43885f513eed4b880605b7cba3b31684592740c97935320ff03219bcb825803e
|
||||
// # Category: web版/抓包
|
||||
// # Evidence: web/H5关键词 + cookie/token/header
|
||||
//
|
||||
|
||||
const axios = require("axios");
|
||||
|
||||
let result = "【泡芙加速器】:"
|
||||
|
||||
class PFJS {
|
||||
constructor() {
|
||||
this.host = 'https://api-admin-js.paofujiasu.com/';
|
||||
this.headers = {
|
||||
"Host": "api-admin-js.paofujiasu.com",
|
||||
"User-Agent": "Mozilla/5.0 (Linux; Android 12; M2012K11AC Build/SKQ1.220303.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/107.0.5304.141 Mobile Safari/537.36 XWEB/5169 MMWEBSDK/20221011 MMWEBID/6242 MicroMessenger/8.0.30.2260(0x28001E3B) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android",
|
||||
"tokentype": "applet",
|
||||
"Content-Type": "application/json",
|
||||
"token": config.pfjsq.token,
|
||||
};
|
||||
this.count = 0;
|
||||
this.body = '{"res_type":1}';
|
||||
}
|
||||
|
||||
// 检查金币是否满5个
|
||||
async check_gold(msg) {
|
||||
if (msg.indexOf('5个金币') !== -1) {
|
||||
await this.exchange();
|
||||
}
|
||||
}
|
||||
|
||||
// 兑换6小时时长卡
|
||||
async exchange() {
|
||||
const url = this.host + 'client/api/v1/virtual_currency/exchange_by_species';
|
||||
try {
|
||||
this.body = '{"rule_id":4}'
|
||||
const res = await axios.post(url, this.body, {headers: this.headers});
|
||||
console.log(`兑换${res.data.info}`);
|
||||
result += `兑换${res.data.info} ||`
|
||||
} catch (error) {
|
||||
console.log(`兑换失败,原因是:${error.response.data.info}`);
|
||||
result += `兑换失败,原因是:${error.response.data.info} ||`
|
||||
}
|
||||
}
|
||||
|
||||
// 签到
|
||||
async sign() {
|
||||
const url = this.host + 'client/api/v1/virtual_currency/sign_in_for_species';
|
||||
try {
|
||||
const res = await axios.post(url, this.body, {headers: this.headers});
|
||||
console.log(`签到${res.data.info}`);
|
||||
result += `签到${res.data.info} ||`
|
||||
await this.check_gold(res.data.info)
|
||||
} catch (error) {
|
||||
console.log(`签到失败,原因是:${error.response.data.info}`);
|
||||
result += `签到失败,原因是:${error.response.data.info} ||`
|
||||
await this.check_gold(error.response.data.info)
|
||||
}
|
||||
}
|
||||
|
||||
// 查询广告剩余次数
|
||||
async getAd() {
|
||||
const url = this.host + 'client/api/v1/virtual_currency/look_ad_count';
|
||||
try {
|
||||
const res = await axios.get(url, {headers: this.headers});
|
||||
console.log(`广告${res.data.data.sign_count}/${res.data.data.limit_count}`);
|
||||
this.count = res.data.data.limit_count - res.data.data.sign_count;
|
||||
} catch (error) {
|
||||
console.log(`查询广告失败,原因是:${error.response.data.info}`);
|
||||
}
|
||||
}
|
||||
|
||||
// 看广告前置
|
||||
async lookAdForPower() {
|
||||
const url = this.host + 'client/api/v1/virtual_currency/look_ad_for_power';
|
||||
try {
|
||||
const res = await axios.post(url, this.body, {headers: this.headers});
|
||||
console.log(`目前倍率:${res.data.data.power}`);
|
||||
} catch (error) {
|
||||
console.log(`看广告失败,原因是:${error.response.data.info}`);
|
||||
}
|
||||
}
|
||||
|
||||
// 看广告
|
||||
async lookAd() {
|
||||
const url = this.host + 'client/api/v1/virtual_currency/look_ad_for_species';
|
||||
try {
|
||||
const res = await axios.post(url, this.body, {headers: this.headers});
|
||||
console.log(`看广告${res.data.info}`);
|
||||
await this.check_gold(res.data.info)
|
||||
result += `看广告${res.data.info} ||`
|
||||
} catch (error) {
|
||||
console.log(`看广告失败,原因是:${error.response.data.info}`);
|
||||
await this.check_gold(error.response.data.info)
|
||||
result += `看广告失败,原因是:${error.response.data.info} ||`
|
||||
}
|
||||
}
|
||||
|
||||
async run() {
|
||||
await this.sign();
|
||||
await this.getAd();
|
||||
console.log();
|
||||
for (let i = 0; i < this.count; i++) {
|
||||
console.log(`--------------- 第${i + 1}轮广告 ---------------`);
|
||||
await this.lookAdForPower();
|
||||
await this.lookAd();
|
||||
await new Promise(resolve => setTimeout(resolve, Math.floor(Math.random() * (60000 - 30000 + 1)) + 30000));
|
||||
}
|
||||
console.log();
|
||||
}
|
||||
}
|
||||
|
||||
async function pfjsq() {
|
||||
const pfjs = new PFJS();
|
||||
await pfjs.run();
|
||||
if (result.endsWith('||')) {
|
||||
result = result.substring(0, result.length - 2);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
module.exports = pfjsq;
|
||||
41
脚本库/web版/抓包/pingu/2021-10-18_pingu_298375e2.js
Normal file
41
脚本库/web版/抓包/pingu/2021-10-18_pingu_298375e2.js
Normal file
@@ -0,0 +1,41 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/pingu.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/pingu.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/pingu.js
|
||||
// # UploadedAt: 2021-10-18T16:32:03Z
|
||||
// # SHA256: 298375e236180b0ddb22ad22902ddc939dd1742ed2d61fd488164f987eb16a16
|
||||
// # Category: web版/抓包
|
||||
// # Evidence: web/H5关键词 + cookie/token/header
|
||||
//
|
||||
|
||||
//经管之家 邀请链接 https://bbs.pinggu.org/?fromuid=11925701
|
||||
const axios = require("axios");
|
||||
function task() {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
let url = "https://bbs.pinggu.org/index_lth5.php?mod=my_qiandao&uid=";
|
||||
let res = await axios.get(url, {
|
||||
headers: {
|
||||
cookie: config.pinggu.cookie,
|
||||
"X-Requested-With": "XMLHttpRequest",
|
||||
"User-Agent":
|
||||
"Mozilla/5.0 (Linux; Android 10; Redmi K30) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.110 Mobile Safari/537.36",
|
||||
},
|
||||
});
|
||||
if (res.data.data) {
|
||||
msg = res.data.data.msg
|
||||
} else {
|
||||
msg = "cookie已失效,请及时更新";
|
||||
}
|
||||
console.log(msg);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
msg = "签到接口请求出错";
|
||||
}
|
||||
resolve("【经管之家】:\n" + msg);
|
||||
});
|
||||
}
|
||||
|
||||
//task()
|
||||
|
||||
module.exports = task;
|
||||
97
脚本库/web版/抓包/quark/2024-06-06_quark_1c97a712.js
Normal file
97
脚本库/web版/抓包/quark/2024-06-06_quark_1c97a712.js
Normal file
@@ -0,0 +1,97 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/quark.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/quark.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/quark.js
|
||||
// # UploadedAt: 2024-06-06T17:33:52Z
|
||||
// # SHA256: 1c97a712980803bab7a5cb5bc44ebfd2779ebad7ef92a3efe3d4b6028daf86b5
|
||||
// # Category: web版/抓包
|
||||
// # Evidence: web/H5关键词 + cookie/token/header
|
||||
//
|
||||
|
||||
const axios = require("axios");
|
||||
|
||||
cookie = config.quark.cookie;
|
||||
|
||||
const headers = {
|
||||
"Content-Type": "application/json",
|
||||
Cookie: "",
|
||||
};
|
||||
|
||||
async function quark() {
|
||||
for (let index = 0; index < cookie.length; index++) {
|
||||
headers["Cookie"] = cookie[index];
|
||||
await qd_check();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 签到情况
|
||||
*/
|
||||
async function qd_check() {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
const url = "https://drive-m.quark.cn/1/clouddrive/capacity/growth/info";
|
||||
const params = {
|
||||
pr: "ucpro",
|
||||
fr: "pc",
|
||||
uc_param_str: "",
|
||||
};
|
||||
let res = await axios.get(url, { headers, params });
|
||||
if (res.data.data.cap_sign.sign_daily) {
|
||||
const sign = res.data.data.cap_sign;
|
||||
const number = sign.sign_daily_reward / 1048576;
|
||||
const progress = Math.round(
|
||||
(sign.sign_progress / sign.sign_target) * 100
|
||||
);
|
||||
console.log(`今日已签到,获取${number}MB,进度${progress}%`);
|
||||
msg = `今日已签到,获取${number}MB,进度${progress}%`;
|
||||
} else {
|
||||
await qd();
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error.data);
|
||||
msg = "签到接口请求失败";
|
||||
}
|
||||
resolve("【夸克网盘】:" + msg || "正常运行了");
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns 签到结果
|
||||
*/
|
||||
function qd() {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
const url = "https://drive-m.quark.cn/1/clouddrive/capacity/growth/sign";
|
||||
const params = {
|
||||
pr: "ucpro",
|
||||
fr: "pc",
|
||||
uc_param_str: "",
|
||||
};
|
||||
let res = await axios.post(
|
||||
url,
|
||||
{
|
||||
sign_cyclic: true,
|
||||
},
|
||||
{ headers, params }
|
||||
);
|
||||
if (res.data.status == 200) {
|
||||
const sign = res.data.data;
|
||||
const number = sign.sign_daily_reward / 1048576;
|
||||
console.log(`签到成功,本次签到领取${number}MB`);
|
||||
msg = `签到成功,本次签到领取${number}MB`;
|
||||
} else {
|
||||
console.log(`签到失败,${res.data.message}!`);
|
||||
msg = "签到失败";
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error.data);
|
||||
msg = "签到接口请求失败";
|
||||
}
|
||||
resolve("【夸克网盘】:" + msg || "正常运行了");
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = quark;
|
||||
235
脚本库/web版/抓包/tst/2025-11-27_tst_bb3abb0a.py
Normal file
235
脚本库/web版/抓包/tst/2025-11-27_tst_bb3abb0a.py
Normal file
@@ -0,0 +1,235 @@
|
||||
# Source: https://github.com/back-101/zyqinglong/blob/main/tst.py
|
||||
# Raw: https://raw.githubusercontent.com/back-101/zyqinglong/main/tst.py
|
||||
# Repo: back-101/zyqinglong
|
||||
# Path: tst.py
|
||||
# UploadedAt: 2025-11-27T10:49:43Z
|
||||
# SHA256: bb3abb0a9bff29861a10318c1ea94861781faafe5dc21b2d43f5b7f65281cfaf
|
||||
# Category: web版/抓包
|
||||
# Evidence: web/H5关键词 + cookie/token/header
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
塔斯汀汉堡签到脚本(使用青龙notify模块)
|
||||
原作者:https://github.com/linbailo/zyqinglong
|
||||
二改:https://github.com/wanvfx/zyqinglong
|
||||
最后更新日期:2025.6.8
|
||||
|
||||
功能说明:
|
||||
1. 每日自动签到获取积分
|
||||
2. 支持多账号管理
|
||||
3. 使用青龙面板自带的notify.py模块发送通知
|
||||
|
||||
使用方法:
|
||||
1. 添加环境变量 tst_tk_env
|
||||
2. 格式:每行一个账号,格式为 token
|
||||
示例:
|
||||
sss113-23129-123123-123123
|
||||
sss234-23129-123123-234312
|
||||
"""
|
||||
|
||||
import os
|
||||
import time
|
||||
import requests
|
||||
import json
|
||||
import sys
|
||||
from datetime import datetime
|
||||
|
||||
# 配置区域
|
||||
DEBUG_MODE = False # 调试模式开关
|
||||
MAX_RETRIES = 3 # 请求最大重试次数
|
||||
|
||||
# 全局通知内容
|
||||
notification_list = []
|
||||
|
||||
# 导入青龙通知模块
|
||||
try:
|
||||
sys.path.append('/ql/scripts')
|
||||
import notify
|
||||
except ImportError:
|
||||
notify = None
|
||||
print("警告:未找到青龙通知模块,通知功能将不可用")
|
||||
|
||||
def log_debug(msg):
|
||||
"""调试日志"""
|
||||
if DEBUG_MODE:
|
||||
print(f"[DEBUG] {datetime.now().strftime('%Y-%m-%d %H:%M:%S')} {msg}")
|
||||
|
||||
def log_info(msg):
|
||||
"""信息日志"""
|
||||
print(f"[INFO] {datetime.now().strftime('%Y-%m-%d %H:%M:%S')} {msg}")
|
||||
|
||||
def log_error(msg):
|
||||
"""错误日志"""
|
||||
print(f"[ERROR] {datetime.now().strftime('%Y-%m-%d %H:%M:%S')} {msg}")
|
||||
|
||||
def safe_request(method, url, **kwargs):
|
||||
"""带重试机制的请求函数"""
|
||||
retries = 0
|
||||
while retries < MAX_RETRIES:
|
||||
try:
|
||||
response = requests.request(method, url, **kwargs)
|
||||
if response.status_code == 200:
|
||||
return response
|
||||
log_error(f"请求失败: {url} 状态码: {response.status_code}")
|
||||
except Exception as e:
|
||||
log_error(f"请求异常: {url} 错误: {str(e)}")
|
||||
|
||||
retries += 1
|
||||
if retries < MAX_RETRIES:
|
||||
time.sleep(2 ** retries) # 指数退避
|
||||
return None
|
||||
|
||||
def add_notification(title, content):
|
||||
"""添加到通知列表"""
|
||||
notification_list.append(f"【{title}】\n{content}")
|
||||
log_info(f"已添加通知: {title}")
|
||||
|
||||
def send_notification():
|
||||
"""使用青龙通知模块发送通知"""
|
||||
if not notification_list:
|
||||
log_info("无通知内容,跳过发送")
|
||||
return
|
||||
|
||||
if notify is None:
|
||||
log_error("通知模块未导入,无法发送通知")
|
||||
return
|
||||
|
||||
content = "\n\n".join(notification_list)
|
||||
try:
|
||||
notify.send("塔斯汀签到脚本通知", content)
|
||||
log_info("通知发送成功")
|
||||
except Exception as e:
|
||||
log_error(f"发送通知异常: {str(e)}")
|
||||
|
||||
def checkin(tk):
|
||||
"""签到功能"""
|
||||
# 获取动态活动ID
|
||||
activityId = qdsj(tk)
|
||||
|
||||
# 如果动态获取失败,使用计算的活动ID
|
||||
if not activityId:
|
||||
current_date = datetime.now()
|
||||
activityId = 59 + (current_date.year - 2025) * 12 + (current_date.month - 5)
|
||||
log_info(f"使用计算的活动ID: {activityId}")
|
||||
|
||||
url = "https://sss-web.tastientech.com/api/sign/member/signV2"
|
||||
payload = {"activityId": activityId, "memberName": "", "memberPhone": ""}
|
||||
headers = {
|
||||
'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090a13) UnifiedPCWindowsWechat(0xf254032b) XWEB/13655",
|
||||
'Content-Type': "application/json",
|
||||
'xweb_xhr': "1",
|
||||
'user-token': tk,
|
||||
'channel': "1"
|
||||
}
|
||||
|
||||
response = safe_request('POST', url, data=json.dumps(payload), headers=headers)
|
||||
if response:
|
||||
try:
|
||||
data = response.json()
|
||||
if data.get("code") == 200:
|
||||
# 解析签到结果
|
||||
if data['result']['rewardInfoList'][0].get('rewardName'):
|
||||
reward = data['result']['rewardInfoList'][0]['rewardName']
|
||||
else:
|
||||
reward = f"{data['result']['rewardInfoList'][0]['point']}积分"
|
||||
|
||||
# 添加到通知
|
||||
add_notification(
|
||||
"签到成功",
|
||||
f"账号: {tk[:10]}...\n"
|
||||
f"结果: 获得 {reward}\n"
|
||||
f"时间: {datetime.now().strftime('%Y-%m-%d %H:%M')}"
|
||||
)
|
||||
return True, f"签到成功,获得: {reward}"
|
||||
else:
|
||||
add_notification(
|
||||
"签到失败",
|
||||
f"账号: {tk[:10]}...\n"
|
||||
f"原因: {data.get('msg', '未知错误')}\n"
|
||||
f"时间: {datetime.now().strftime('%Y-%m-%d %H:%M')}"
|
||||
)
|
||||
return False, data.get("msg", f"签到失败: {response.text}")
|
||||
except Exception as e:
|
||||
add_notification(
|
||||
"签到异常",
|
||||
f"账号: {tk[:10]}...\n"
|
||||
f"错误: {str(e)}\n"
|
||||
f"时间: {datetime.now().strftime('%Y-%m-%d %H:%M')}"
|
||||
)
|
||||
return False, f"解析签到响应异常: {str(e)}"
|
||||
else:
|
||||
add_notification(
|
||||
"签到请求失败",
|
||||
f"账号: {tk[:10]}...\n"
|
||||
f"时间: {datetime.now().strftime('%Y-%m-%d %H:%M')}"
|
||||
)
|
||||
return False, "请求失败"
|
||||
|
||||
def qdsj(ck):
|
||||
"""获取签到活动ID"""
|
||||
headers = {
|
||||
'user-token': ck,
|
||||
'channel': '1'
|
||||
}
|
||||
data = {"shopId": "", "birthday": "", "gender": 0, "nickName": None, "phone": ""}
|
||||
response = safe_request('POST', 'https://sss-web.tastientech.com/api/minic/shop/intelligence/banner/c/list',
|
||||
json=data, headers=headers)
|
||||
|
||||
if not response:
|
||||
return ''
|
||||
|
||||
try:
|
||||
dl = response.json()
|
||||
activityId = ''
|
||||
for i in dl['result']:
|
||||
if '每日签到' in i['bannerName'] or '签到' in i['bannerName']:
|
||||
qd = i['jumpPara']
|
||||
activityId = json.loads(qd)['activityId']
|
||||
log_info(f"获取到本月签到代码:{activityId}")
|
||||
return activityId
|
||||
except Exception as e:
|
||||
log_error(f"解析签到活动ID异常: {str(e)}")
|
||||
|
||||
return ''
|
||||
|
||||
def filter_lines(input_string):
|
||||
"""过滤有效账号行"""
|
||||
lines = input_string.splitlines()
|
||||
return [
|
||||
line.strip()
|
||||
for line in lines
|
||||
if line.strip()
|
||||
]
|
||||
|
||||
def start():
|
||||
"""主启动函数"""
|
||||
global notification_list
|
||||
|
||||
# 环境变量处理
|
||||
env = os.getenv('tst_tk_env', '')
|
||||
accounts = filter_lines(env)
|
||||
if not accounts:
|
||||
log_error("未找到有效账号配置")
|
||||
add_notification("配置错误", "未找到有效账号配置,请检查环境变量tst_tk_env")
|
||||
return
|
||||
|
||||
log_info(f"===== 开始执行签到,共 {len(accounts)} 个账号 =====")
|
||||
|
||||
# 处理每个账号
|
||||
for account in accounts:
|
||||
try:
|
||||
tk = account.split('|')[0].strip() # 只取token部分
|
||||
log_info(f"处理账号: {tk[:10]}...")
|
||||
|
||||
# 签到
|
||||
success, message = checkin(tk)
|
||||
log_info(f"签到结果: {message}")
|
||||
except Exception as e:
|
||||
log_error(f"处理账号异常: {str(e)}")
|
||||
|
||||
# 发送所有通知
|
||||
send_notification()
|
||||
log_info("===== 签到执行结束 =====")
|
||||
|
||||
if __name__ == '__main__':
|
||||
start()
|
||||
29
脚本库/web版/抓包/ug爱好者_,/2021-09-25_ugsnx_62534dd8.js
Normal file
29
脚本库/web版/抓包/ug爱好者_,/2021-09-25_ugsnx_62534dd8.js
Normal file
@@ -0,0 +1,29 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/ugsnx.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/ugsnx.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/ugsnx.js
|
||||
// # UploadedAt: 2021-09-25T00:15:59Z
|
||||
// # SHA256: 62534dd85b6f24116fc614bca2846afa150ea0a8351dabb0de54e53be897dbef
|
||||
// # Category: web版/抓包
|
||||
// # Evidence: web/H5关键词 + cookie/token/header
|
||||
//
|
||||
|
||||
const rules = {
|
||||
name: "【ug爱好者】: ",
|
||||
url: "http://www.ugsnx.com/forum.php?mod=guide&view=newthread&mobile=2", //用于获取formhash的链接
|
||||
cookie: config.ugsnx.cookie,
|
||||
formhash: 'formhash=(.+?)"', //formhash正则
|
||||
verify: "有你更精彩!",
|
||||
op: [{
|
||||
name: "签到",
|
||||
charset: "gb2312",
|
||||
method: "get", //签到请求方式 get/post
|
||||
url: "http://www.ugsnx.com/plugin.php?id=dsu_amupper&ppersubmit=true&nogoto=1&formhash=@formhash&mobile=2&inajax=1"
|
||||
}]
|
||||
};
|
||||
|
||||
async function ugsnx() {
|
||||
const template = require("../Template");
|
||||
return rules.name + await template(rules)
|
||||
}
|
||||
module.exports = ugsnx
|
||||
79
脚本库/web版/抓包/utils/2026-05-23_utils_bce11cad.py
Normal file
79
脚本库/web版/抓包/utils/2026-05-23_utils_bce11cad.py
Normal file
@@ -0,0 +1,79 @@
|
||||
# Source: https://github.com/CN-Grace/QinglongScripts/blob/main/utils.py
|
||||
# Raw: https://raw.githubusercontent.com/CN-Grace/QinglongScripts/main/utils.py
|
||||
# Repo: CN-Grace/QinglongScripts
|
||||
# Path: utils.py
|
||||
# UploadedAt: 2026-05-23T15:38:06Z
|
||||
# SHA256: bce11cad3d194cbf6779b4f13ce88d5838904d43fd875c9ada09b880c46d6f39
|
||||
# Category: web版/抓包
|
||||
# Evidence: web/H5关键词 + cookie/token/header
|
||||
|
||||
#!/usr/bin/env python3
|
||||
"""QinglongScripts 公共工具模块"""
|
||||
|
||||
import time
|
||||
from datetime import datetime, timedelta, timezone
|
||||
from typing import Optional
|
||||
|
||||
import requests
|
||||
|
||||
# 北京时间时区 (UTC+8)
|
||||
_TZ_BEIJING = timezone(timedelta(hours=8))
|
||||
|
||||
# ---------- 时间工具 ----------
|
||||
def beijing_now() -> datetime:
|
||||
"""返回当前北京时间 datetime"""
|
||||
return datetime.now(_TZ_BEIJING)
|
||||
|
||||
|
||||
def beijing_time_str(fmt: str = "%Y-%m-%d %H:%M:%S") -> str:
|
||||
"""返回当前北京时间字符串"""
|
||||
return beijing_now().strftime(fmt)
|
||||
|
||||
|
||||
# ---------- 日志函数 ----------
|
||||
def _log(emoji: str, msg: str):
|
||||
print(f"[{beijing_time_str()}] {emoji} {msg}")
|
||||
|
||||
|
||||
def log_info(msg: str):
|
||||
_log("ℹ️", msg)
|
||||
|
||||
|
||||
def log_success(msg: str):
|
||||
_log("✅", msg)
|
||||
|
||||
|
||||
def log_warning(msg: str):
|
||||
_log("⚠️", msg)
|
||||
|
||||
|
||||
def log_error(msg: str):
|
||||
_log("❌", msg)
|
||||
|
||||
|
||||
# ---------- HTTP 工具 ----------
|
||||
def create_session(
|
||||
cookie: Optional[str] = None,
|
||||
user_agent: Optional[str] = None,
|
||||
extra_headers: Optional[dict] = None,
|
||||
) -> requests.Session:
|
||||
"""创建带可选 Cookie 和自定义 Headers 的 requests.Session"""
|
||||
session = requests.Session()
|
||||
session.headers.update({
|
||||
"User-Agent": user_agent or (
|
||||
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
|
||||
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36"
|
||||
),
|
||||
"Accept": "application/json, text/plain, */*",
|
||||
"Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8",
|
||||
"Connection": "keep-alive",
|
||||
})
|
||||
if extra_headers:
|
||||
session.headers.update(extra_headers)
|
||||
if cookie:
|
||||
cookie_dict = {
|
||||
item.split("=")[0]: item.split("=")[1]
|
||||
for item in cookie.split("; ") if "=" in item
|
||||
}
|
||||
requests.utils.add_dict_to_cookiejar(session.cookies, cookie_dict)
|
||||
return session
|
||||
72
脚本库/web版/抓包/voapi/2025-10-31_voapi_d60b3048.js
Normal file
72
脚本库/web版/抓包/voapi/2025-10-31_voapi_d60b3048.js
Normal file
@@ -0,0 +1,72 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/voapi.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/voapi.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/voapi.js
|
||||
// # UploadedAt: 2025-10-31T06:24:35Z
|
||||
// # SHA256: d60b3048fdc5bac872cc8f9e41e632cc2fe45ebc884f6f0966218fa1716e8b7f
|
||||
// # Category: web版/抓包
|
||||
// # Evidence: web/H5关键词 + cookie/token/header
|
||||
//
|
||||
|
||||
const axios = require('axios');
|
||||
|
||||
async function voapi() {
|
||||
let result = '【voapi】'; // 初始化结果字符串
|
||||
|
||||
try {
|
||||
// 从 config 中读取 token
|
||||
const token = config.voapi.token;
|
||||
|
||||
if (!token) {
|
||||
const errorMsg = `${result}-未找到有效的token配置`;
|
||||
console.log(errorMsg);
|
||||
// 确保返回字符串
|
||||
return String(errorMsg);
|
||||
}
|
||||
|
||||
console.log(token);
|
||||
// 设置请求头
|
||||
const headers = {
|
||||
'Authorization': token, // 直接使用配置中的完整 token 值
|
||||
'Content-Type': 'application/json',
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36'
|
||||
};
|
||||
|
||||
// 发送 POST 请求
|
||||
const response = await axios.post('https://demo.voapi.top/api/check_in', {}, { headers });
|
||||
|
||||
// 处理响应 - 根据实际返回结构优化
|
||||
// 成功响应示例: {"code":0,"msg":"签到成功","data":{"checkin_days":1}}
|
||||
if (response.data && response.data.code === 0) {
|
||||
const msg = response.data.msg || '签到成功';
|
||||
// 尝试从 data 中提取更多信息,例如连续签到天数
|
||||
let extraInfo = '';
|
||||
if (response.data.data) {
|
||||
if (response.data.data.checkin_days !== undefined) {
|
||||
extraInfo += `,连续签到 ${response.data.data.checkin_days} 天`;
|
||||
}
|
||||
// 可以在这里添加对 data 中其他字段的处理
|
||||
}
|
||||
result += `${msg}${extraInfo}`;
|
||||
console.log(result);
|
||||
} else {
|
||||
// 失败响应示例: {"code":1,"msg":"今天已经签到过了"}
|
||||
const msg = response.data.msg || response.data.message || '未知错误';
|
||||
result += `签到失败: ${msg}`;
|
||||
console.log(result);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('【voapi】签到请求失败:', error.message);
|
||||
result += `签到请求失败: ${error.message}`;
|
||||
// 异常时,返回的结果字符串会包含 "失败" 或 "出错",这会匹配 checkbox.js 中的单独推送条件
|
||||
} finally {
|
||||
// 在 finally 块中确保返回值是字符串类型
|
||||
// 这可以防止任何意外的非字符串返回值导致主程序出错
|
||||
const finalResult = String(result);
|
||||
// console.log('Final result type:', typeof finalResult, 'Value:', finalResult); // 调试用
|
||||
return finalResult;
|
||||
}
|
||||
}
|
||||
|
||||
// 确保模块导出的是一个函数
|
||||
module.exports = voapi;
|
||||
33
脚本库/web版/抓包/zbwx/2021-09-30_zbwx_f0d29096.js
Normal file
33
脚本库/web版/抓包/zbwx/2021-09-30_zbwx_f0d29096.js
Normal file
@@ -0,0 +1,33 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/zbwx.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/zbwx.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/zbwx.js
|
||||
// # UploadedAt: 2021-09-30T00:56:04Z
|
||||
// # SHA256: f0d29096de088207cfb49e6ec77162969498bc2d4c07f762a36cc65c46aa6468
|
||||
// # Category: web版/抓包
|
||||
// # Evidence: web/H5关键词 + cookie/token/header
|
||||
//
|
||||
|
||||
const axios = require("axios");
|
||||
function task() {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
let cookie = config.zbwx.cookie;
|
||||
let url = "http://api.wenxue.mgtv.com/user/benefits/merge?cpsOpid=zb_xm&_filterData=1&device_id=c3ad60274fc24dea&channel=0&_versions=1260&merchant=zb_xm&Guid=48c5d293-6a72-461a-9cd5-cacc4789b19f&ua=Mozilla%2F5.0%20(Linux%3B%20Android%209%3B%20MI%206%20Build%2FPKQ1-wesley_iui-19.07.13%3B%20wv)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Version%2F4.0%20Chrome%2F74.0.3729.136%20Mobile%20Safari%2F537.36&platform=2&manufacturer=Xiaomi&clientType=1&width=1080&appKey=7283695590&model=MI%206&cpsSource=0&brand=Xiaomi&subapp=0&youthModel=0&height=1920&path=%2Fuser%2Fbenefits%2Fmerge×tamp=1632355285136&sn=392a955a1842912262f01a84af983dd2";
|
||||
let res = await axios.get(url, { headers: { cookie: cookie } });
|
||||
if (res.data.data.signInfo) {
|
||||
msg = `签到成功✅本月累计签到${res.data.data.signInfo.sign.m_num}天`;
|
||||
} else {
|
||||
msg = res.data.error;
|
||||
}
|
||||
console.log(msg);
|
||||
} catch (err) {
|
||||
msg = "签到接口请求出错";
|
||||
console.log(err);
|
||||
}
|
||||
resolve("【瞻彼文学】:" + msg + "\n当月累计签到达到7、14、21、满签时,可获得额外奖励\n请自行手动领取");
|
||||
});
|
||||
}
|
||||
|
||||
//task()
|
||||
module.exports = task;
|
||||
254
脚本库/web版/抓包/同程旅游/2025-11-29_tclx_b49c33dc.py
Normal file
254
脚本库/web版/抓包/同程旅游/2025-11-29_tclx_b49c33dc.py
Normal file
@@ -0,0 +1,254 @@
|
||||
# Source: https://github.com/back-101/zyqinglong/blob/main/tclx.py
|
||||
# Raw: https://raw.githubusercontent.com/back-101/zyqinglong/main/tclx.py
|
||||
# Repo: back-101/zyqinglong
|
||||
# Path: tclx.py
|
||||
# UploadedAt: 2025-11-29T06:56:58Z
|
||||
# SHA256: b49c33dc10adf577eb8b1809d98ceeddc3a58a11676c70eb65a040f3d76c9035
|
||||
# Category: web版/抓包
|
||||
# Evidence: web/H5关键词 + cookie/token/header
|
||||
|
||||
# -*- coding=UTF-8 -*-
|
||||
# @Project QL_TimingScript
|
||||
# @fileName tclx.py
|
||||
# @author Echo
|
||||
# @EditTime 2025/3/14
|
||||
# cron: 0 0 9 * * *
|
||||
# const $ = new Env('同程旅游');
|
||||
"""
|
||||
开启抓包,进入app 进入‘领福利’界面,点击签到,查看https://app.17u.cn/welfarecenter/index/signIndex请求头
|
||||
提取变量: apptoken、device
|
||||
变量格式: phone#apptoken#device,多个账号用@隔开
|
||||
"""
|
||||
import asyncio
|
||||
import time
|
||||
from datetime import datetime
|
||||
|
||||
import httpx
|
||||
|
||||
from fn_print import fn_print
|
||||
from get_env import get_env
|
||||
from sendNotify import send_notification_message_collection
|
||||
|
||||
tc_cookies = get_env("tc_cookie", "@")
|
||||
|
||||
|
||||
class Tclx:
|
||||
def __init__(self, cookie):
|
||||
self.client = httpx.AsyncClient(base_url="https://app.17u.cn/welfarecenter",
|
||||
verify=False,
|
||||
timeout=60)
|
||||
self.phone = cookie.split("#")[0]
|
||||
self.apptoken = cookie.split("#")[1]
|
||||
self.device = cookie.split("#")[2]
|
||||
self.headers = {
|
||||
'accept': 'application/json, text/plain, */*',
|
||||
'phone': self.phone,
|
||||
'channel': '1',
|
||||
'apptoken': self.apptoken,
|
||||
'sec-fetch-site': 'same-site',
|
||||
'accept-language': 'zh-CN,zh-Hans;q=0.9',
|
||||
'accept-encoding': 'gzip, deflate, br',
|
||||
'sec-fetch-mode': 'cors',
|
||||
'origin': 'https://m.17u.cn',
|
||||
'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 TcTravel/11.0.0 tctype/wk',
|
||||
'referer': 'https://m.17u.cn/',
|
||||
# 'content-length': str(len(payload_str.encode('utf-8'))),
|
||||
'device': self.device,
|
||||
'sec-fetch-dest': 'empty'
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
async def get_today_date():
|
||||
return datetime.now().strftime('%Y-%m-%d')
|
||||
|
||||
async def sign_in(self):
|
||||
try:
|
||||
response = await self.client.post(
|
||||
url="/index/signIndex",
|
||||
headers=self.headers,
|
||||
json={}
|
||||
)
|
||||
data = response.json()
|
||||
if data['code'] != 2200:
|
||||
fn_print(f"用户【{self.phone}】 - token失效了,请更新")
|
||||
return None
|
||||
else:
|
||||
today_sign = data['data']['todaySign']
|
||||
mileage = data['data']['mileageBalance']['mileage']
|
||||
fn_print(f"用户【{self.phone}】 - 今日{'已' if today_sign else '未'}签到,当前剩余里程{mileage}!")
|
||||
return today_sign
|
||||
except Exception as e:
|
||||
fn_print(f"用户【{self.phone}】 - 签到请求异常!{e}")
|
||||
fn_print(response.text)
|
||||
return None
|
||||
|
||||
async def do_sign_in(self):
|
||||
today_date = await self.get_today_date()
|
||||
try:
|
||||
response = await self.client.post(
|
||||
url="/index/sign",
|
||||
headers=self.headers,
|
||||
json={"type": 1, "day": today_date}
|
||||
)
|
||||
data = response.json()
|
||||
if data['code'] != 2200:
|
||||
fn_print(f"用户【{self.phone}】 - 签到失败了,尝试获取任务列表")
|
||||
return False
|
||||
else:
|
||||
fn_print(f"用户【{self.phone}】 - 签到成功!开始获取任务列表")
|
||||
return True
|
||||
except Exception as e:
|
||||
fn_print(f"用户【{self.phone}】 - 执行签到请求异常!{e}")
|
||||
fn_print(response.text)
|
||||
return False
|
||||
|
||||
async def get_task_list(self):
|
||||
try:
|
||||
response = await self.client.post(
|
||||
url="/task/taskList?version=11.0.7",
|
||||
headers=self.headers,
|
||||
json={}
|
||||
)
|
||||
data = response.json()
|
||||
if data['code'] != 2200:
|
||||
fn_print(f"用户【{self.phone}】 - 获取任务列表失败了")
|
||||
return None
|
||||
else:
|
||||
tasks = []
|
||||
for task in data['data']:
|
||||
if task['state'] == 1 and task['browserTime'] != 0:
|
||||
tasks.append(
|
||||
{
|
||||
'taskCode': task['taskCode'],
|
||||
'title': task['title'],
|
||||
'browserTime': task['browserTime']
|
||||
}
|
||||
)
|
||||
return tasks
|
||||
except Exception as e:
|
||||
fn_print(f"用户【{self.phone}】 - 获取任务列表请求异常!{e}")
|
||||
fn_print(response.text)
|
||||
return None
|
||||
|
||||
async def perform_tasks(self, task_code):
|
||||
try:
|
||||
response = await self.client.post(
|
||||
url="/task/start",
|
||||
headers=self.headers,
|
||||
json={"taskCode": task_code}
|
||||
)
|
||||
data = response.json()
|
||||
if data['code'] != 2200:
|
||||
fn_print(f"用户【{self.phone}】 - 执行任务【{task_code}】失败了,跳过当前任务")
|
||||
return None
|
||||
else:
|
||||
task_id = data['data']
|
||||
return task_id
|
||||
except Exception as e:
|
||||
fn_print(f"用户【{self.phone}】 - 执行任务【{task_code}】请求异常!{e}")
|
||||
fn_print(response.text)
|
||||
return None
|
||||
|
||||
async def finsh_task(self, task_id):
|
||||
max_retry = 3 # 最大重试次数
|
||||
retry_delay = 2 # 重试间隔时间(秒)
|
||||
for attempt in range(max_retry):
|
||||
try:
|
||||
response = await self.client.post(
|
||||
url="/task/finish",
|
||||
headers=self.headers,
|
||||
json={"id": task_id}
|
||||
)
|
||||
data = response.json()
|
||||
if data['code'] == 2200:
|
||||
fn_print(f"用户【{self.phone}】 - 完成任务【{task_id}】成功!开始领取奖励")
|
||||
return True
|
||||
if attempt < max_retry - 1:
|
||||
fn_print(f"用户【{self.phone}】 - 完成任务【{task_id}】失败了,尝试重新提交(第{attempt + 1}次重试。。)")
|
||||
await asyncio.sleep(retry_delay * (attempt + 1))
|
||||
continue
|
||||
fn_print(f"用户【{self.phone}】 - 完成任务【{task_id}】最终失败,跳过当前任务")
|
||||
return False
|
||||
except Exception as e:
|
||||
error_msg = f"用户【{self.phone}】 - 完成任务【{task_id}】请求异常!{e}"
|
||||
if 'response' in locals():
|
||||
error_msg += f"\n{response.text}"
|
||||
fn_print(error_msg)
|
||||
if attempt == max_retry - 1:
|
||||
return False
|
||||
await asyncio.sleep(retry_delay * (attempt + 1))
|
||||
|
||||
async def receive_reward(self, task_id):
|
||||
try:
|
||||
response = await self.client.post(
|
||||
url="/task/receive",
|
||||
headers=self.headers,
|
||||
json={"id": task_id}
|
||||
)
|
||||
data = response.json()
|
||||
if data['code'] != 2200:
|
||||
fn_print(f"用户【{self.phone}】 - 领取签到奖励失败了, 请尝试手动领取")
|
||||
else:
|
||||
fn_print(f"用户【{self.phone}】 - 领取签到奖励成功!开始下一个任务")
|
||||
except Exception as e:
|
||||
fn_print(f"用户【{self.phone}】 - 领取签到奖励请求异常!{e}")
|
||||
fn_print(response.text)
|
||||
|
||||
async def get_mileage_info(self):
|
||||
try:
|
||||
response = await self.client.post(
|
||||
url="/index/signIndex",
|
||||
headers=self.headers,
|
||||
json={}
|
||||
)
|
||||
data = response.json()
|
||||
if data['code'] != 2200:
|
||||
fn_print(f"用户【{self.phone}】 - 获取积分信息失败了")
|
||||
return None
|
||||
else:
|
||||
cycle_sign_num = data['data']['cycleSighNum']
|
||||
continuous_history = data['data']['continuousHistory']
|
||||
mileage = data['data']['mileageBalance']['mileage']
|
||||
today_mileage = data['data']['mileageBalance']['todayMileage']
|
||||
fn_print(
|
||||
f"用户【{self.phone}】 - 本月签到{cycle_sign_num}天,连续签到{continuous_history}天,今日共获取{today_mileage}里程,当前剩余里程{mileage}")
|
||||
except Exception as e:
|
||||
fn_print(f"用户【{self.phone}】 - 获取积分信息请求异常!{e}")
|
||||
fn_print(response.text)
|
||||
return None
|
||||
|
||||
async def run(self):
|
||||
today_sign = await self.sign_in()
|
||||
if today_sign is None:
|
||||
return
|
||||
if today_sign:
|
||||
fn_print(f"用户【{self.phone}】 - 今日已签到,开始获取任务列表")
|
||||
else:
|
||||
if await self.do_sign_in():
|
||||
fn_print(f"用户【{self.phone}】 - 签到成功,开始获取任务列表")
|
||||
tasks = await self.get_task_list()
|
||||
if tasks:
|
||||
for task in tasks:
|
||||
task_code = task['taskCode']
|
||||
title = task['title']
|
||||
browser_time = task['browserTime']
|
||||
fn_print(f"用户【{self.phone}】 - 开始做任务【{title}】,需要浏览{browser_time}秒")
|
||||
task_id = await self.perform_tasks(task_code)
|
||||
if task_id:
|
||||
await asyncio.sleep(browser_time)
|
||||
if await self.finsh_task(task_id):
|
||||
await self.receive_reward(task_id)
|
||||
await self.get_mileage_info()
|
||||
|
||||
|
||||
async def main():
|
||||
tasks = []
|
||||
for cookie in tc_cookies:
|
||||
tclx = Tclx(cookie)
|
||||
tasks.append(tclx.run())
|
||||
await asyncio.gather(*tasks)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
asyncio.run(main())
|
||||
send_notification_message_collection(f"同程旅行签到通知 - {datetime.now().strftime('%Y/%m/%d')}")
|
||||
42
脚本库/web版/抓包/好书友论坛_,/2022-02-22_hsy_e824ae28.js
Normal file
42
脚本库/web版/抓包/好书友论坛_,/2022-02-22_hsy_e824ae28.js
Normal file
@@ -0,0 +1,42 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/hsy.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/hsy.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/hsy.js
|
||||
// # UploadedAt: 2022-02-22T20:29:28Z
|
||||
// # SHA256: e824ae285da7e27d573d4a6dae4a328df6fde28e563cbe905df3dd88e126e272
|
||||
// # Category: web版/抓包
|
||||
// # Evidence: web/H5关键词 + cookie/token/header
|
||||
//
|
||||
|
||||
const rules = {
|
||||
name: "【好书友论坛】: ",
|
||||
url: "http://www.58shuyou.com/plugin.php?id=k_misign:sign", //用于获取formhash的链接
|
||||
cookie: config.hsy.cookie,
|
||||
ua: "pc",
|
||||
formhash: 'formhash=(.+?)\\"', //formhash正则
|
||||
verify: "你还没登录,确定登录", //验证cookie状态
|
||||
op: [{
|
||||
name: "签到",
|
||||
ua: "pc",
|
||||
charset: "gb2312",
|
||||
method: "get", //签到请求方式 get/post
|
||||
url: "http://www.58shuyou.com/plugin.php?id=k_misign:sign&operation=qiandao&format=text&formhash=@formhash", //签到链接
|
||||
},
|
||||
{
|
||||
name: "在线奖励",
|
||||
ua: "pc",
|
||||
charset: "gb2312",
|
||||
method: "get", //签到请求方式 get/post
|
||||
url: "http://www.58shuyou.com/plugin.php?id=gonline:index&action=award&formhash=@formhash", //签到链接
|
||||
reg2: "没", //重复签到判断
|
||||
reg3: "parent", //签到成功判断
|
||||
info: "\\(\\'(.+?)\\'", //签到成功返回信息
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
async function hsy() {
|
||||
const template = require("../Template");
|
||||
return rules.name + await template(rules)
|
||||
}
|
||||
module.exports = hsy
|
||||
224
脚本库/web版/抓包/小黑盒每日签到/2026-05-24_Heybox_cf7af030.py
Normal file
224
脚本库/web版/抓包/小黑盒每日签到/2026-05-24_Heybox_cf7af030.py
Normal file
@@ -0,0 +1,224 @@
|
||||
# Source: https://github.com/CN-Grace/QinglongScripts/blob/main/Heybox.py
|
||||
# Raw: https://raw.githubusercontent.com/CN-Grace/QinglongScripts/main/Heybox.py
|
||||
# Repo: CN-Grace/QinglongScripts
|
||||
# Path: Heybox.py
|
||||
# UploadedAt: 2026-05-24T03:44:01Z
|
||||
# SHA256: cf7af03059bd3d2d7e1afc7c76282554853e47ce7576ceaadfb124683364afc1
|
||||
# Category: web版/抓包
|
||||
# Evidence: web/H5关键词 + cookie/token/header
|
||||
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
cron: 0 8 * * *
|
||||
new Env("小黑盒每日签到")
|
||||
小黑盒 (Heybox) 每日签到脚本
|
||||
- 获取签到日历和任务列表
|
||||
- 执行每日签到
|
||||
- 推送签到结果和奖励信息
|
||||
"""
|
||||
|
||||
import os
|
||||
import random
|
||||
import string
|
||||
import requests
|
||||
from datetime import datetime, timezone, timedelta
|
||||
|
||||
from utils import log_info, log_success, log_warning, log_error, beijing_time_str
|
||||
from notifier import send as notify_send
|
||||
|
||||
# ==================== 用户配置 ====================
|
||||
HEYBOX_COOKIE = os.environ.get("HEYBOX_COOKIE", "") # pkey=...;x_xhh_tokenid=...
|
||||
HEYBOX_ID = os.environ.get("HEYBOX_ID", "") # 小黑盒用户 ID
|
||||
IMEI = os.environ.get("HEYBOX_IMEI", "") # 设备标识
|
||||
|
||||
API_BASE = "https://api.xiaoheihe.cn"
|
||||
TZ_BEIJING = timezone(timedelta(hours=8))
|
||||
|
||||
|
||||
def _random_str(length: int = 32) -> str:
|
||||
chars = string.ascii_letters + string.digits
|
||||
return "".join(random.choice(chars) for _ in range(length))
|
||||
|
||||
|
||||
def _random_hex(length: int = 8) -> str:
|
||||
return "".join(random.choice("0123456789ABCDEF") for _ in range(length))
|
||||
|
||||
|
||||
def create_session() -> requests.Session:
|
||||
session = requests.Session()
|
||||
session.headers.update({
|
||||
"User-Agent": "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36 ApiMaxJia/1.0",
|
||||
"Accept-Encoding": "gzip",
|
||||
})
|
||||
if HEYBOX_COOKIE:
|
||||
for item in HEYBOX_COOKIE.split(";"):
|
||||
item = item.strip()
|
||||
if "=" in item:
|
||||
k, v = item.split("=", 1)
|
||||
session.cookies.set(k.strip(), v.strip(), domain="xiaoheihe.cn")
|
||||
return session
|
||||
|
||||
|
||||
def build_params() -> str:
|
||||
"""构建通用 Query 参数"""
|
||||
heybox_id = HEYBOX_ID or _extract_from_cookie("heybox_id", "30182259")
|
||||
imei = IMEI or _extract_from_cookie("imei", "a9381821da647661")
|
||||
params = [
|
||||
f"heybox_id={heybox_id}",
|
||||
f"imei={imei}",
|
||||
"device_info=25102RKBEC",
|
||||
f"nonce={_random_str(32)}",
|
||||
f"hkey={_random_hex(8)}",
|
||||
"os_type=Android",
|
||||
"x_os_type=Android",
|
||||
"x_client_type=mobile",
|
||||
"os_version=16",
|
||||
"version=1.3.382",
|
||||
"build=1076",
|
||||
]
|
||||
return "&".join(params)
|
||||
|
||||
|
||||
def _extract_from_cookie(key: str, default: str = "") -> str:
|
||||
for item in HEYBOX_COOKIE.split(";"):
|
||||
item = item.strip()
|
||||
if "=" in item and item.split("=", 1)[0].strip() == key:
|
||||
return item.split("=", 1)[1].strip()
|
||||
return default
|
||||
|
||||
|
||||
def api_get(session: requests.Session, path: str) -> dict:
|
||||
"""通用 GET 请求"""
|
||||
url = f"{API_BASE}{path}?{build_params()}"
|
||||
try:
|
||||
resp = session.get(url, timeout=15)
|
||||
return resp.json()
|
||||
except Exception as e:
|
||||
log_error(f"API 请求失败 [{path}]: {e}")
|
||||
return {}
|
||||
|
||||
|
||||
def get_sign_status(session: requests.Session) -> tuple:
|
||||
"""检查今日签到状态,返回 (is_signed_today, sign_streak, calendar)"""
|
||||
result = api_get(session, "/task/sign_list/")
|
||||
if result.get("status") != "ok":
|
||||
log_error(f"获取签到日历失败: {result}")
|
||||
return False, 0, []
|
||||
|
||||
sign_list = result.get("result", {}).get("sign_list", [])
|
||||
today_start = datetime.now(TZ_BEIJING).replace(hour=0, minute=0, second=0, microsecond=0)
|
||||
today_ts = int(today_start.timestamp())
|
||||
|
||||
is_signed = False
|
||||
for item in sign_list:
|
||||
if item["date"] == today_ts:
|
||||
is_signed = item.get("is_sign", False)
|
||||
break
|
||||
|
||||
return is_signed, sign_list
|
||||
|
||||
|
||||
def do_sign(session: requests.Session) -> str:
|
||||
"""执行签到 (v3 API),返回 state: success/ignore/fail"""
|
||||
result = api_get(session, "/task/sign_v3/sign")
|
||||
if result.get("status") != "ok":
|
||||
log_error(f"签到请求失败: {result}")
|
||||
return "fail"
|
||||
|
||||
state = result.get("result", {}).get("state", "fail")
|
||||
state_map = {
|
||||
"success": "签到成功 ✅",
|
||||
"ignore": "今日已签到,无需重复 ⚠️",
|
||||
"fail": "签到失败 ❌",
|
||||
}
|
||||
log_info(f"签到结果: {state_map.get(state, state)}")
|
||||
return state
|
||||
|
||||
|
||||
def get_task_list(session: requests.Session) -> dict:
|
||||
"""获取任务列表,含签到奖励信息"""
|
||||
result = api_get(session, "/task/list_v2/")
|
||||
if result.get("status") != "ok":
|
||||
log_warning(f"获取任务列表失败: {result}")
|
||||
return {}
|
||||
return result.get("result", {})
|
||||
|
||||
|
||||
def get_account_info(session: requests.Session) -> str:
|
||||
"""获取用户昵称"""
|
||||
result = api_get(session, "/account/info/")
|
||||
if result.get("msg") == "":
|
||||
profile = result.get("result", {}).get("profile", {})
|
||||
return profile.get("nickname", "未知")
|
||||
return "未知"
|
||||
|
||||
|
||||
def build_report(nickname: str, state: str, task_info: dict) -> str:
|
||||
"""构建签到报告"""
|
||||
lines = ["🎮 小黑盒 每日签到", "", f"👤 账号: {nickname}"]
|
||||
|
||||
if state == "success":
|
||||
lines.append("✅ 签到状态: 签到成功!")
|
||||
|
||||
# 提取签到奖励
|
||||
award_found = False
|
||||
for group in task_info.get("task_list", []):
|
||||
for task in group.get("tasks", []):
|
||||
if task.get("type") == "sign":
|
||||
awards = task.get("award_desc_v2", [])
|
||||
if awards:
|
||||
award_found = True
|
||||
lines.append(f"🎁 签到奖励:")
|
||||
for a in awards:
|
||||
lines.append(f" {a.get('desc', '')}")
|
||||
lines.append(f"🔥 连续签到: {task.get('sign_in_streak', '?')} 天")
|
||||
break
|
||||
|
||||
if not award_found:
|
||||
lines.append("🎁 奖励: 已自动发放")
|
||||
elif state == "ignore":
|
||||
lines.append("⚠️ 签到状态: 今日已签到")
|
||||
lines.append("🎁 无需重复签到")
|
||||
else:
|
||||
lines.append("❌ 签到状态: 签到失败")
|
||||
lines.append("💡 请检查 Cookie 是否有效")
|
||||
|
||||
lines.append("")
|
||||
lines.append("─" * 18)
|
||||
lines.append(f"🕒 执行时间: {beijing_time_str()}")
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def main():
|
||||
if not HEYBOX_COOKIE:
|
||||
log_error("未配置 HEYBOX_COOKIE")
|
||||
notify_send("小黑盒签到 错误", "❌ 未配置 HEYBOX_COOKIE")
|
||||
return
|
||||
|
||||
session = create_session()
|
||||
nickname = get_account_info(session)
|
||||
log_info(f"账号: {nickname}")
|
||||
|
||||
# 检查签到状态
|
||||
is_signed, sign_list = get_sign_status(session)
|
||||
|
||||
state = "ignore"
|
||||
if not is_signed:
|
||||
log_info("今日未签到,开始执行签到...")
|
||||
state = do_sign(session)
|
||||
is_signed = (state in ("success", "ignore"))
|
||||
else:
|
||||
log_info("今日已签到,无需重复签到")
|
||||
|
||||
task_info = get_task_list(session)
|
||||
|
||||
task_info = task_info or {}
|
||||
|
||||
# 构建报告
|
||||
report = build_report(nickname, state, task_info)
|
||||
notify_send("小黑盒 签到报告", report)
|
||||
log_success("推送完成")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
353
脚本库/web版/抓包/库街区自动签到/2026-05-23_ql_kuro_46013225.py
Normal file
353
脚本库/web版/抓包/库街区自动签到/2026-05-23_ql_kuro_46013225.py
Normal file
@@ -0,0 +1,353 @@
|
||||
# Source: https://github.com/Small-tailqwq/ql_script/blob/master/kuro/ql_kuro.py
|
||||
# Raw: https://raw.githubusercontent.com/Small-tailqwq/ql_script/master/kuro/ql_kuro.py
|
||||
# Repo: Small-tailqwq/ql_script
|
||||
# Path: kuro/ql_kuro.py
|
||||
# UploadedAt: 2026-05-23T15:50:58Z
|
||||
# SHA256: 46013225510794598730a4bad8387ebfbcee626a372ce9a1e605ff7acbf18bac
|
||||
# Category: web版/抓包
|
||||
# Evidence: web/H5关键词 + cookie/token/header
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
cron: 30 8 * * *
|
||||
new Env('库街区自动签到');
|
||||
|
||||
基于 mxyooR/Kuro-autosignin (GPL-3.0) 精简适配青龙单文件版
|
||||
上游版本: a334796 (2026-04-21)
|
||||
最后更新: 2026-05-23 09:00 (UTC+8)
|
||||
"""
|
||||
|
||||
import datetime
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import random
|
||||
import socket
|
||||
import time
|
||||
import uuid
|
||||
from typing import Dict, List, Optional
|
||||
import requests
|
||||
|
||||
try:
|
||||
from sendNotify import send
|
||||
except Exception:
|
||||
try:
|
||||
from notify import send
|
||||
except Exception:
|
||||
send = None
|
||||
|
||||
TIMEOUT = 30
|
||||
GAME_WUWA_ID = "3"
|
||||
GAME_PGR_ID = "2"
|
||||
SERVER_WUWA = "76402e5b20be2c39f095a152090afddc"
|
||||
SERVER_PGR = "1000"
|
||||
MAX_RETRIES = 3
|
||||
|
||||
|
||||
class API:
|
||||
USER_MINE = "https://api.kurobbs.com/user/mineV2"
|
||||
USER_SIGN_IN = "https://api.kurobbs.com/user/signIn"
|
||||
USER_ROLE_LIST = "https://api.kurobbs.com/user/role/findRoleList"
|
||||
FORUM_LIST = "https://api.kurobbs.com/forum/list"
|
||||
FORUM_POST_DETAIL = "https://api.kurobbs.com/forum/getPostDetail"
|
||||
FORUM_LIKE = "https://api.kurobbs.com/forum/like"
|
||||
TASK_PROCESS = "https://api.kurobbs.com/encourage/level/getTaskProcess"
|
||||
TASK_SHARE = "https://api.kurobbs.com/encourage/level/shareTask"
|
||||
GAME_SIGN_IN = "https://api.kurobbs.com/encourage/signIn/v2"
|
||||
GAME_SIGN_RECORD = "https://api.kurobbs.com/encourage/signIn/queryRecordV2"
|
||||
|
||||
|
||||
def get_ip_address() -> str:
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
try:
|
||||
s.connect(("8.8.8.8", 80))
|
||||
return s.getsockname()[0]
|
||||
except socket.error:
|
||||
return "127.0.0.1"
|
||||
finally:
|
||||
s.close()
|
||||
|
||||
|
||||
class KuroSigner:
|
||||
def __init__(self, token_data: Dict[str, str]):
|
||||
self.token = token_data['token']
|
||||
self.note = token_data.get('note', '未命名账号')
|
||||
|
||||
self.ip = get_ip_address()
|
||||
self.devcode = str(uuid.uuid4())
|
||||
self.distinct_id = str(uuid.uuid4())
|
||||
|
||||
self.session = requests.Session()
|
||||
self.user_id = None
|
||||
self.wuwa_role_id = None
|
||||
self.pgr_role_id = None
|
||||
self.messages = []
|
||||
self.success = True
|
||||
|
||||
def _log(self, msg: str):
|
||||
logging.info(f"[{self.note}] {msg}")
|
||||
self.messages.append(msg)
|
||||
|
||||
def _req(self, url: str, method: str = 'POST', data: Optional[dict] = None, req_type: str = 'bbs') -> dict:
|
||||
headers = {
|
||||
"Accept": "*/*",
|
||||
"Accept-Language": "zh-CN,zh-Hans;q=0.9",
|
||||
"Accept-Encoding": "gzip, deflate, br",
|
||||
"Connection": "keep-alive",
|
||||
"Host": "api.kurobbs.com",
|
||||
"source": "ios",
|
||||
}
|
||||
|
||||
if req_type == 'bbs':
|
||||
headers.update({
|
||||
"lang": "zh-Hans",
|
||||
"User-Agent": "KuroGameBox/48 CFNetwork/1492.0.1 Darwin/23.3.0",
|
||||
"channelId": "1",
|
||||
"channel": "appstore",
|
||||
"version": "2.2.0",
|
||||
"model": "iPhone15,2",
|
||||
"osVersion": "17.3",
|
||||
"Content-Type": "application/x-www-form-urlencoded; charset=utf-8",
|
||||
"Cookie": f"user_token={self.token}",
|
||||
"Ip": self.ip,
|
||||
"distinct_id": self.distinct_id,
|
||||
"devCode": self.devcode,
|
||||
"token": self.token,
|
||||
})
|
||||
elif req_type == 'game':
|
||||
headers.update({
|
||||
"Accept": "application/json, text/plain, */*",
|
||||
"Sec-Fetch-Site": "same-site",
|
||||
"source": "ios",
|
||||
"Sec-Fetch-Mode": "cors",
|
||||
"Origin": "https://web-static.kurobbs.com",
|
||||
"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) KuroGameBox/2.2.0",
|
||||
"devCode": f"{self.ip}, Mozilla/5.0 (iPhone; CPU iPhone OS 17_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) KuroGameBox/2.2.0",
|
||||
"token": self.token,
|
||||
})
|
||||
elif req_type == 'user_info':
|
||||
headers.update({
|
||||
"osversion": "Android",
|
||||
"countrycode": "CN",
|
||||
"ip": self.ip,
|
||||
"model": "2211133C",
|
||||
"source": "android",
|
||||
"lang": "zh-Hans",
|
||||
"version": "1.0.9",
|
||||
"versioncode": "1090",
|
||||
"content-type": "application/x-www-form-urlencoded",
|
||||
"user-agent": "okhttp/3.10.0",
|
||||
"devcode": self.devcode,
|
||||
"distinct_id": self.distinct_id,
|
||||
"token": self.token,
|
||||
})
|
||||
|
||||
try:
|
||||
if method == 'POST':
|
||||
resp = self.session.post(url, headers=headers, data=data, timeout=TIMEOUT).json()
|
||||
else:
|
||||
resp = self.session.get(url, headers=headers, timeout=TIMEOUT).json()
|
||||
return resp
|
||||
except Exception as e:
|
||||
return {"code": -1, "msg": f"请求异常: {str(e)}"}
|
||||
|
||||
def init_user_data(self) -> bool:
|
||||
res = self._req(API.USER_MINE, req_type='user_info')
|
||||
if res.get('code') != 200:
|
||||
self._log(f"获取用户信息失败或Token已过期: {res.get('msg')}")
|
||||
self.success = False
|
||||
return False
|
||||
self.user_id = res['data']['mine']['userId']
|
||||
|
||||
res_wuwa = self._req(API.USER_ROLE_LIST, data={"gameId": GAME_WUWA_ID}, req_type='user_info')
|
||||
if res_wuwa.get('code') == 200 and res_wuwa.get('data'):
|
||||
self.wuwa_role_id = res_wuwa['data'][0].get('roleId')
|
||||
|
||||
res_pgr = self._req(API.USER_ROLE_LIST, data={"gameId": GAME_PGR_ID}, req_type='user_info')
|
||||
if res_pgr.get('code') == 200 and res_pgr.get('data'):
|
||||
self.pgr_role_id = res_pgr['data'][0].get('roleId')
|
||||
|
||||
return True
|
||||
|
||||
def _get_sign_reward(self, game_name: str, game_id: str, server_id: str, role_id: str) -> Optional[str]:
|
||||
try:
|
||||
data = {
|
||||
"gameId": game_id,
|
||||
"serverId": server_id,
|
||||
"roleId": role_id,
|
||||
"userId": self.user_id,
|
||||
}
|
||||
res = self._req(API.GAME_SIGN_RECORD, data=data, req_type='game')
|
||||
if res.get('code') == 200 and res.get('data'):
|
||||
if isinstance(res['data'], list) and len(res['data']) > 0:
|
||||
return res['data'][0].get('goodsName')
|
||||
return None
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
def game_sign(self):
|
||||
month = datetime.datetime.now().strftime("%m")
|
||||
|
||||
def _do_sign(game_name, game_id, server_id, role_id):
|
||||
if not role_id:
|
||||
self._log(f"[{game_name}] 未找到角色ID,跳过签到")
|
||||
return
|
||||
data = {
|
||||
"gameId": game_id,
|
||||
"serverId": server_id,
|
||||
"roleId": role_id,
|
||||
"userId": self.user_id,
|
||||
"reqMonth": month,
|
||||
}
|
||||
res = self._req(API.GAME_SIGN_IN, data=data, req_type='game')
|
||||
code = res.get('code')
|
||||
|
||||
if code == 200:
|
||||
reward = self._get_sign_reward(game_name, game_id, server_id, role_id)
|
||||
msg = f"[{game_name}] 签到成功"
|
||||
if reward:
|
||||
msg += f",奖励: {reward}"
|
||||
self._log(msg)
|
||||
elif code == 1511:
|
||||
reward = self._get_sign_reward(game_name, game_id, server_id, role_id)
|
||||
msg = f"[{game_name}] 今日已签到"
|
||||
if reward:
|
||||
msg += f",奖励: {reward}"
|
||||
self._log(msg)
|
||||
elif code == 1513:
|
||||
self._log(f"[{game_name}] 签到失败:用户信息异常,即将禁用该账号")
|
||||
self.success = False
|
||||
elif code == 220:
|
||||
self._log(f"[{game_name}] 签到失败:登录已过期,请重新登录")
|
||||
self.success = False
|
||||
else:
|
||||
self._log(f"[{game_name}] 签到失败: {res.get('msg', '未知错误')} (code={code})")
|
||||
raise Exception(f"{game_name} 签到失败: {res.get('msg', '未知错误')}")
|
||||
|
||||
_do_sign("鸣潮", GAME_WUWA_ID, SERVER_WUWA, self.wuwa_role_id)
|
||||
time.sleep(1)
|
||||
_do_sign("战双", GAME_PGR_ID, SERVER_PGR, self.pgr_role_id)
|
||||
|
||||
def forum_tasks(self):
|
||||
res = self._req(API.USER_SIGN_IN, data={"gameId": "2"}, req_type='bbs')
|
||||
if res.get('code') == 200:
|
||||
self._log("论坛签到成功")
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
res_tasks = self._req(API.TASK_PROCESS, data={"gameId": "0"}, req_type='bbs')
|
||||
if res_tasks.get('code') != 200:
|
||||
self._log("获取每日任务列表失败跳过")
|
||||
return
|
||||
|
||||
tasks = res_tasks.get('data', {}).get('dailyTask', [])
|
||||
tasks_map = {t.get('remark'): t.get('process') for t in tasks}
|
||||
|
||||
posts = []
|
||||
if tasks_map.get("浏览3篇帖子", 1) == 0 or tasks_map.get("点赞5次", 1) == 0:
|
||||
res_posts = self._req(API.FORUM_LIST, data={"forumId": "9", "gameId": "3", "pageIndex": "1", "pageSize": "20", "searchType": "3", "timeType": "0"}, req_type='bbs')
|
||||
if res_posts.get('code') == 200:
|
||||
posts = res_posts.get('data', {}).get('postList', [])
|
||||
|
||||
if tasks_map.get("浏览3篇帖子", 1) == 0 and posts:
|
||||
view_count = 0
|
||||
for p in posts[:3]:
|
||||
self._req(API.FORUM_POST_DETAIL, data={"isOnlyPublisher": "0", "postId": p['postId'], "showOrderTyper": "2"}, req_type='bbs')
|
||||
view_count += 1
|
||||
time.sleep(random.uniform(1, 2))
|
||||
self._log(f"完成浏览帖子任务 ({view_count}/3)")
|
||||
|
||||
if tasks_map.get("点赞5次", 1) == 0 and posts:
|
||||
like_count = 0
|
||||
for p in posts[:5]:
|
||||
self._req(API.FORUM_LIKE, data={"forumId": 11, "gameId": 3, "likeType": 1, "operateType": 1, "postCommentId": "", "postCommentReplyId": "", "postId": p['postId'], "postType": 1, "toUserId": p['userId']}, req_type='bbs')
|
||||
like_count += 1
|
||||
time.sleep(random.uniform(1, 2))
|
||||
self._log(f"完成点赞帖子任务 ({like_count}/5)")
|
||||
|
||||
if tasks_map.get("分享1次帖子", 1) == 0:
|
||||
self._req(API.TASK_SHARE, data={"gameId": 3}, req_type='bbs')
|
||||
self._log("完成分享帖子任务 (1/1)")
|
||||
|
||||
def run(self):
|
||||
for attempt in range(MAX_RETRIES):
|
||||
try:
|
||||
if attempt > 0:
|
||||
delay = random.uniform(5, 15)
|
||||
self._log(f"将在 {delay:.1f} 秒后进行第 {attempt + 1}/{MAX_RETRIES} 次重试...")
|
||||
time.sleep(delay)
|
||||
|
||||
if self.init_user_data():
|
||||
self.game_sign()
|
||||
self.forum_tasks()
|
||||
|
||||
if not self.success:
|
||||
raise Exception("签到执行失败")
|
||||
break
|
||||
|
||||
except Exception as e:
|
||||
self._log(f"执行异常: {str(e)}")
|
||||
self.success = False
|
||||
if attempt < MAX_RETRIES - 1:
|
||||
continue
|
||||
else:
|
||||
self._log(f"重试 {MAX_RETRIES} 次后仍然失败,放弃签到")
|
||||
|
||||
return "\n".join(self.messages)
|
||||
|
||||
|
||||
def get_tokens() -> List[Dict[str, str]]:
|
||||
raw = os.environ.get("KURO_TOKEN", "").strip()
|
||||
if not raw:
|
||||
return []
|
||||
|
||||
raw = raw.replace('&', '\n').replace(',', '\n')
|
||||
token_list = []
|
||||
|
||||
for line in raw.split('\n'):
|
||||
line = line.strip()
|
||||
if not line:
|
||||
continue
|
||||
|
||||
parts = line.split('#', 1)
|
||||
token_val = parts[0].strip()
|
||||
note = parts[1].strip() if len(parts) > 1 else f"账号{len(token_list) + 1}"
|
||||
|
||||
if token_val:
|
||||
token_list.append({'token': token_val, 'note': note})
|
||||
|
||||
return token_list
|
||||
|
||||
|
||||
def main():
|
||||
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(message)s')
|
||||
|
||||
tokens = get_tokens()
|
||||
if not tokens:
|
||||
logging.error("未找到 Token,请在环境变量中设置 'KURO_TOKEN'。")
|
||||
return
|
||||
|
||||
logging.info(f"✅ 检测到 {len(tokens)} 个账号,开始执行库街区签到...\n" + "-" * 30)
|
||||
|
||||
notify_content = []
|
||||
|
||||
for token_data in tokens:
|
||||
signer = KuroSigner(token_data)
|
||||
result_msg = signer.run()
|
||||
|
||||
status_icon = "✅" if signer.success else "❌"
|
||||
header = f"【{signer.note}】{status_icon}"
|
||||
|
||||
notify_content.append(header)
|
||||
notify_content.append(result_msg)
|
||||
notify_content.append("-" * 20)
|
||||
|
||||
final_content = "\n".join(notify_content)
|
||||
logging.info(f"\n{final_content}")
|
||||
|
||||
if send:
|
||||
send("库街区签到", final_content)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
22
脚本库/web版/抓包/快手双版本金币查询/2026-05-16_zhks_query_2baad40b.js
Normal file
22
脚本库/web版/抓包/快手双版本金币查询/2026-05-16_zhks_query_2baad40b.js
Normal file
File diff suppressed because one or more lines are too long
22
脚本库/web版/抓包/快手双版本金币查询/2026-05-16_zhks_query_2baad40b_2.js
Normal file
22
脚本库/web版/抓包/快手双版本金币查询/2026-05-16_zhks_query_2baad40b_2.js
Normal file
File diff suppressed because one or more lines are too long
694
脚本库/web版/抓包/滴滴出行/2025-11-29_滴滴出行_e0d2a0c8.py
Normal file
694
脚本库/web版/抓包/滴滴出行/2025-11-29_滴滴出行_e0d2a0c8.py
Normal file
@@ -0,0 +1,694 @@
|
||||
# Source: https://github.com/back-101/zyqinglong/blob/main/%E6%BB%B4%E6%BB%B4%E5%87%BA%E8%A1%8C.py
|
||||
# Raw: https://raw.githubusercontent.com/back-101/zyqinglong/main/滴滴出行.py
|
||||
# Repo: back-101/zyqinglong
|
||||
# Path: 滴滴出行.py
|
||||
# UploadedAt: 2025-11-29T06:56:58Z
|
||||
# SHA256: e0d2a0c873bdcaa9f9bb7f078021468bed339ad22e6e04b4db7003797176362b
|
||||
# Category: web版/抓包
|
||||
# Evidence: web/H5关键词 + cookie/token/header
|
||||
|
||||
# -*- coding=UTF-8 -*-
|
||||
# @Project QL_TimingScript
|
||||
# @fileName 滴滴出行.py
|
||||
# @author Echo
|
||||
# @EditTime 2024/11/27
|
||||
# const $ = new Env('滴滴出行')
|
||||
# cron: "0 8,14,17 * * *"
|
||||
"""
|
||||
DD_TOKENS: 滴滴出行进入福利页面抓token值
|
||||
自行配经纬度和城市id
|
||||
"""
|
||||
import asyncio
|
||||
import datetime
|
||||
import httpx
|
||||
|
||||
from fn_print import fn_print
|
||||
from get_env import get_env
|
||||
from sendNotify import send_notification_message_collection
|
||||
|
||||
MONTH_SIGNAL = False # 月月领券
|
||||
|
||||
dd_tokens = get_env("DD_TOKENS", "&")
|
||||
|
||||
|
||||
class DiDi:
|
||||
LAT = "30.707130422009786" # 纬度
|
||||
LNG = "104.09652654810503" # 经度
|
||||
CITY_ID = 17 # 城市id
|
||||
|
||||
def __init__(self, token, city_id=CITY_ID, lat=LAT, lng=LNG):
|
||||
self.user_phone = None
|
||||
self.client = httpx.AsyncClient(verify=False)
|
||||
self.token = token
|
||||
self.city_id = city_id
|
||||
self.lat = lat
|
||||
self.lng = lng
|
||||
self.today = datetime.datetime.now().strftime("%Y-%m-%d")
|
||||
self.tomorrow = (datetime.datetime.now() + datetime.timedelta(days=1)).strftime("%Y-%m-%d")
|
||||
self.activity_id_today = 0
|
||||
self.task_id_today = 0
|
||||
self.status_today = 0
|
||||
self.activity_id_tomorrow = 0
|
||||
self.status_tomorrow = 0
|
||||
self.count_tomorrow = 0
|
||||
|
||||
async def get_user_info(self):
|
||||
"""
|
||||
获取用户信息
|
||||
:return:
|
||||
"""
|
||||
get_user_info_response = await self.client.get(
|
||||
url=f"https://common.diditaxi.com.cn/passenger/getprofile?token={self.token}"
|
||||
)
|
||||
get_user_info_data = get_user_info_response.json()
|
||||
self.user_phone = get_user_info_data.get("phone")
|
||||
|
||||
async def get_welfare_payments(self):
|
||||
"""
|
||||
获取福利金
|
||||
:return:
|
||||
"""
|
||||
get_weibo_payments_response = await self.client.get(
|
||||
url="https://rewards.xiaojukeji.com/loyalty_credit/bonus/getWelfareUsage4Wallet",
|
||||
params={
|
||||
"token": self.token,
|
||||
"city_id": self.city_id
|
||||
}
|
||||
)
|
||||
if get_weibo_payments_response.status_code == 200:
|
||||
get_info_data = get_weibo_payments_response.json()
|
||||
if "token error" in get_info_data.get("errmsg") and get_info_data.get("errno") == 20001:
|
||||
fn_print("token已过期,请重新获取token")
|
||||
send_notification_message_collection(
|
||||
"滴滴出行通知 - {}".format(datetime.datetime.now().strftime("%Y/%m/%d")))
|
||||
exit()
|
||||
return get_info_data['data']['balance']
|
||||
else:
|
||||
fn_print(f"===获取用户福利金请求异常, {get_weibo_payments_response.text}===")
|
||||
|
||||
async def sign_in(self):
|
||||
"""
|
||||
签到
|
||||
:return:
|
||||
"""
|
||||
sign_in_response = await self.client.post(
|
||||
url="https://ut.xiaojukeji.com/ut/welfare/api/action/dailySign",
|
||||
json={
|
||||
"token": self.token,
|
||||
"lat": self.lat,
|
||||
"lng": self.lng,
|
||||
"platform": "na",
|
||||
"env": '{}'
|
||||
}
|
||||
)
|
||||
if sign_in_response.status_code == 200:
|
||||
sign_in_data = sign_in_response.json()
|
||||
fn_print(sign_in_data)
|
||||
if sign_in_data["errno"] == 0:
|
||||
subsidy_amount = sign_in_data["data"]["subsidy_state"]["subsidy_amount"]
|
||||
fn_print(f"用户【{0}】, ===今日签到成功,获得{subsidy_amount}福利金🪙🪙🪙===")
|
||||
return
|
||||
elif sign_in_data["errno"] == 40009:
|
||||
fn_print(f"用户【{0}】, ===今日福利金已签到,无需重复签到!===")
|
||||
return
|
||||
else:
|
||||
fn_print(f"用户【{0}】, ===签到失败, {sign_in_data}===")
|
||||
else:
|
||||
fn_print(f"===签到请求异常, {sign_in_response}===")
|
||||
|
||||
async def get_carve_up_action_id(self):
|
||||
"""
|
||||
获取瓜分活动的ID
|
||||
:return:
|
||||
"""
|
||||
get_carve_up_action_id_response = await self.client.post(
|
||||
url="https://ut.xiaojukeji.com/ut/welfare/api/home/init/v2",
|
||||
json={
|
||||
"token": self.token,
|
||||
"lat": self.lat,
|
||||
"lng": self.lng,
|
||||
"platform": "na",
|
||||
"env": '{}'
|
||||
}
|
||||
)
|
||||
if get_carve_up_action_id_response.status_code == 200:
|
||||
get_carve_up_action_id_data = get_carve_up_action_id_response.json()
|
||||
if get_carve_up_action_id_data.get("errno") == 0:
|
||||
divide_data = get_carve_up_action_id_data["data"]["divide_data"]["divide"]
|
||||
today_data = divide_data.get(self.today)
|
||||
self.activity_id_today, self.task_id_today, self.status_today = today_data["activity_id"], today_data[
|
||||
"task_id"], today_data["status"]
|
||||
tomorrow_data = divide_data.get(self.tomorrow)
|
||||
self.activity_id_tomorrow, self.status_tomorrow, self.count_tomorrow = tomorrow_data["activity_id"], \
|
||||
tomorrow_data["status"], tomorrow_data["button"]["count"]
|
||||
return True
|
||||
else:
|
||||
fn_print(f"===获取瓜分活动ID请求异常, {get_carve_up_action_id_response.text}===")
|
||||
|
||||
async def apply_carve_up_action(self):
|
||||
"""
|
||||
报名明天的瓜分福利金
|
||||
:return:
|
||||
"""
|
||||
apply_carve_up_action_response = await self.client.post(
|
||||
url="https://ut.xiaojukeji.com/ut/welfare/api/action/joinDivide",
|
||||
json={
|
||||
"token": self.token,
|
||||
"lat": self.lat,
|
||||
"lng": self.lng,
|
||||
"platform": "na",
|
||||
"env": '{}',
|
||||
"activity_id": self.activity_id_tomorrow,
|
||||
"count": self.count_tomorrow,
|
||||
"type": "ut_bonus"
|
||||
}
|
||||
)
|
||||
if apply_carve_up_action_response.status_code == 200:
|
||||
apply_carve_up_action_data = apply_carve_up_action_response.json()
|
||||
if apply_carve_up_action_data.get("errno") == 0:
|
||||
if apply_carve_up_action_data.get("data", {}).get("result"):
|
||||
fn_print(f"用户【{self.user_phone}】, ===报名明日瓜分福利金成功🎉===")
|
||||
return
|
||||
elif apply_carve_up_action_data.get("errno") == 1003:
|
||||
fn_print(f"用户【{self.user_phone}】, ===今日瓜分福利金已报名,无需重复报名!===")
|
||||
return
|
||||
else:
|
||||
fn_print(f"用户【{self.user_phone}】, ===报名明日瓜分福利金失败, {apply_carve_up_action_data}===")
|
||||
return
|
||||
else:
|
||||
fn_print(f"===报名明日瓜分福利金请求异常, {apply_carve_up_action_response.text}===")
|
||||
|
||||
async def complete_carve_up_action(self):
|
||||
"""
|
||||
完成今天的瓜分福利金,14点前完成
|
||||
:return:
|
||||
"""
|
||||
complete_carve_up_action_response = await self.client.post(
|
||||
url="https://ut.xiaojukeji.com/ut/welfare/api/action/divideReward",
|
||||
json={
|
||||
"token": self.token,
|
||||
"lat": self.lat,
|
||||
"lng": self.lng,
|
||||
"platform": "na",
|
||||
"env": '{}',
|
||||
"activity_id": self.activity_id_today,
|
||||
"task_id": self.task_id_today
|
||||
}
|
||||
)
|
||||
if complete_carve_up_action_response.status_code == 200:
|
||||
complete_carve_up_action_data = complete_carve_up_action_response.json()
|
||||
if complete_carve_up_action_data.get("errno") == 0:
|
||||
if complete_carve_up_action_data.get("data", {}).get("result"):
|
||||
fn_print(f"用户【{self.user_phone}】, ===完成今日打卡瓜分福利金成功🎉===")
|
||||
return
|
||||
elif complete_carve_up_action_data.get("errno") == 1003:
|
||||
fn_print(f"用户【{self.user_phone}】, ===今日瓜分福利金已完成,无需重复完成!===")
|
||||
return
|
||||
else:
|
||||
fn_print(f"用户【{self.user_phone}】, ===完成今日瓜分福利金失败, {complete_carve_up_action_data}===")
|
||||
return
|
||||
else:
|
||||
fn_print(f"===完成今日瓜分福利金请求异常, {complete_carve_up_action_response.text}===")
|
||||
|
||||
async def inquire_benefits_details(self):
|
||||
"""
|
||||
查询权益详情
|
||||
:return:
|
||||
"""
|
||||
benefits_details_response = await self.client.get(
|
||||
url="https://member.xiaojukeji.com/dmember/h5/privilegeLists",
|
||||
params={
|
||||
"token": self.token,
|
||||
"city_id": self.city_id
|
||||
}
|
||||
)
|
||||
if benefits_details_response.status_code == 200:
|
||||
benefits_details_data = benefits_details_response.json()
|
||||
if benefits_details_data.get("errno") == 0:
|
||||
privileges_list = benefits_details_data.get('data', {}).get('privileges', []) # 我的权益列表
|
||||
return privileges_list
|
||||
else:
|
||||
fn_print(f"===查询权益详情请求异常, {benefits_details_response.text}===")
|
||||
|
||||
async def receive_level_gift_week(self):
|
||||
"""
|
||||
领取周周领券活动的优惠券
|
||||
:return:
|
||||
"""
|
||||
privileges_list = await self.inquire_benefits_details()
|
||||
for privilege in privileges_list:
|
||||
if privilege.get('name') not in ['周周领券'] or privilege.get('level_gift') is None:
|
||||
continue
|
||||
coupons_list = privilege.get('level_gift', {}).get('coupons', [])
|
||||
for coupon in coupons_list:
|
||||
status = coupon.get("status") # 0: 未领取 1: 已使用 2: 未使用
|
||||
if status != 0:
|
||||
continue
|
||||
batch_id = coupon.get("batch_id")
|
||||
fn_print(f"用户【“{self.user_phone}】, ===开始领取{coupon.get('remark')}{coupon.get('coupon_title')}===")
|
||||
receive_level_gift_response = await self.client.get(
|
||||
url=f"https://member.xiaojukeji.com/dmember/h5/receiveLevelGift?xbiz=&prod_key=wyc-vip-level&xpsid=&dchn=&xoid=&xenv=passenger&xspm_from=&xpsid_root=&xpsid_from=&xpsid_share=&token={self.token}&batch_id={batch_id}&env={{}}&gift_type=1&city_id={self.city_id}"
|
||||
)
|
||||
if receive_level_gift_response.status_code == 200:
|
||||
receive_level_gift_data = receive_level_gift_response.json()
|
||||
if receive_level_gift_data.get("errno") == 0:
|
||||
fn_print(f"用户【“{self.user_phone}】, ===领取成功🎉===")
|
||||
continue
|
||||
else:
|
||||
fn_print(f"用户【“{self.user_phone}】, ===领取失败, {receive_level_gift_data}===")
|
||||
else:
|
||||
fn_print(f"===领取周周领券请求异常, {receive_level_gift_response.text}===")
|
||||
|
||||
async def receive_level_gift_month(self):
|
||||
"""
|
||||
领取月月领券活动的优惠券
|
||||
:return:
|
||||
"""
|
||||
if not MONTH_SIGNAL:
|
||||
fn_print(f"用户【“{self.user_phone}】, ===月月领券活动未开启===")
|
||||
return
|
||||
privileges_list = await self.inquire_benefits_details()
|
||||
for privilege in privileges_list:
|
||||
if privilege.get('name') not in ['月月领券'] or privilege.get('level_gift') is None:
|
||||
continue
|
||||
coupons_list = privilege.get('level_gift', {}).get('coupons', [])
|
||||
for coupon in coupons_list:
|
||||
status = coupon.get("status") # 0: 未领取 1: 已使用 2: 未使用
|
||||
if status != 0:
|
||||
continue
|
||||
batch_id = coupon.get("batch_id")
|
||||
fn_print(f"用户【“{self.user_phone}】, ===开始领取{coupon.get('remark')}{coupon.get('coupon_title')}===")
|
||||
receive_level_gift_response = await self.client.get(
|
||||
url=f"https://member.xiaojukeji.com/dmember/h5/receiveLevelGift?xbiz=&prod_key=wyc-vip-level&xpsid=&dchn=&xoid=&xenv=passenger&xspm_from=&xpsid_root=&xpsid_from=&xpsid_share=&token={self.token}&batch_id={batch_id}&env={{}}&gift_type=1&city_id={self.city_id}"
|
||||
)
|
||||
if receive_level_gift_response.status_code == 200:
|
||||
receive_level_gift_data = receive_level_gift_response.json()
|
||||
if receive_level_gift_data.get("errno") == 0:
|
||||
fn_print(f"用户【“{self.user_phone}】, ===领取成功🎉===")
|
||||
continue
|
||||
else:
|
||||
fn_print(f"用户【“{self.user_phone}】, ===领取失败, {receive_level_gift_data}===")
|
||||
else:
|
||||
fn_print(f"===领取月月领券请求异常, {receive_level_gift_response.text}===")
|
||||
|
||||
async def swell_coupon(self):
|
||||
"""
|
||||
膨胀周周领券活动的优惠券
|
||||
:return:
|
||||
"""
|
||||
privileges_list = await self.inquire_benefits_details()
|
||||
for privilege in privileges_list:
|
||||
if privilege.get("name") in ["周周领券", "月月领券"]:
|
||||
if privilege.get('level_gift') is None:
|
||||
continue
|
||||
coupons_list = privilege.get('level_gift', {}).get('coupons', [])
|
||||
for coupon in coupons_list:
|
||||
swell_status = coupon.get('swell_status') # 0代表不能膨胀,1代表能膨胀,2代表已膨胀、
|
||||
if swell_status == 1:
|
||||
fn_print(
|
||||
f"用户【“{self.user_phone}】, ===开始膨胀{coupon.get('remark')}{coupon.get('coupon_title')}===")
|
||||
batch_id = coupon.get("batch_id")
|
||||
coupon_id = coupon.get("coupon_id")
|
||||
swell_coupon_response = await self.client.post(
|
||||
url=f"https://member.xiaojukeji.com/dmember/h5/swell_coupon?city_id={self.city_id}",
|
||||
json={
|
||||
"token": self.token,
|
||||
"batch_id": batch_id,
|
||||
"coupon_id": coupon_id,
|
||||
"city_id": self.city_id
|
||||
}
|
||||
)
|
||||
if swell_coupon_response.status_code == 200:
|
||||
swell_coupon_data = swell_coupon_response.json()
|
||||
if swell_coupon_data.get("errno") == 0:
|
||||
if swell_coupon_data.get("data", {}).get("is_swell"):
|
||||
fn_print(f"用户【“{self.user_phone}】, ===膨胀成功🎉===")
|
||||
continue
|
||||
else:
|
||||
fn_print(f"用户【“{self.user_phone}】, ===膨胀失败, {swell_coupon_data}===")
|
||||
else:
|
||||
fn_print(f"用户【“{self.user_phone}】, ===膨胀失败, {swell_coupon_data}===")
|
||||
else:
|
||||
fn_print(f"===膨胀周周领券请求异常, {swell_coupon_response.text}===")
|
||||
|
||||
async def receive_travel_insurance(self):
|
||||
"""
|
||||
领取行程意外险
|
||||
:return:
|
||||
"""
|
||||
privileges_list = await self.inquire_benefits_details()
|
||||
for privilege in privileges_list:
|
||||
if privilege.get('name') == "行程意外险":
|
||||
need_received = privilege.get('need_received')
|
||||
if need_received == 1: # 0为未领取,1为已领取
|
||||
fn_print(f"用户【“{self.user_phone}】, ===已经领取过了行程意外险===")
|
||||
return
|
||||
elif need_received == 0:
|
||||
fn_print(f"用户【“{self.user_phone}】, ===开始领取行程意外险===")
|
||||
receive_travel_insurance_response = await self.client.post(
|
||||
url="https://member.xiaojukeji.com/dmember/h5/bindPrivilege",
|
||||
json={"token": self.token, "type": 3}
|
||||
)
|
||||
if receive_travel_insurance_response.status_code == 200:
|
||||
receive_travel_insurance_data = receive_travel_insurance_response.json()
|
||||
if receive_travel_insurance_data.get("errno") == 0:
|
||||
fn_print(f"用户【“{self.user_phone}】, ===领取行程意外险成功🎉===")
|
||||
else:
|
||||
fn_print(
|
||||
f"用户【“{self.user_phone}】, ===领取行程意外险失败, {receive_travel_insurance_data}===")
|
||||
else:
|
||||
fn_print(f"===领取行程意外险请求异常, {receive_travel_insurance_response.text}===")
|
||||
|
||||
async def receive_memberday_discount_multi(self):
|
||||
"""
|
||||
领取周三折上折权益
|
||||
:return:
|
||||
"""
|
||||
privileges_list = await self.inquire_benefits_details()
|
||||
for privilege in privileges_list:
|
||||
if privilege.get('name') == "周三折上折":
|
||||
need_received = privilege.get('need_received')
|
||||
if need_received == 1: # 0为未领取,1为已领取
|
||||
fn_print(f"用户【“{self.user_phone}】, ===已经领取过了周三折上折===")
|
||||
return
|
||||
elif need_received == 0:
|
||||
fn_print(f"用户【“{self.user_phone}】, ===开始领取周三折上折===")
|
||||
receive_memberday_discount_multi_response = await self.client.post(
|
||||
url="https://member.xiaojukeji.com/dmember/h5/receiveMemberDayDiscount",
|
||||
json={"token": self.token, "privilege_type": 1}
|
||||
)
|
||||
if receive_memberday_discount_multi_response.status_code == 200:
|
||||
receive_memberday_discount_multi_data = receive_memberday_discount_multi_response.json()
|
||||
if receive_memberday_discount_multi_data.get("errno") == 0:
|
||||
fn_print(f"用户【“{self.user_phone}】, ===领取周三折上折成功🎉===")
|
||||
return
|
||||
else:
|
||||
fn_print(
|
||||
f"用户【“{self.user_phone}】, ===领取周三折上折失败, {receive_memberday_discount_multi_data}===")
|
||||
else:
|
||||
fn_print(f"===领取周三折上折请求异常, {receive_memberday_discount_multi_response.text}===")
|
||||
|
||||
async def receive_wyc_order_finish(self):
|
||||
"""
|
||||
领取气泡奖励完单返福利金
|
||||
:return:
|
||||
"""
|
||||
get_bubble_response = await self.client.post(
|
||||
url="https://ut.xiaojukeji.com/ut/welfare/api/home/getBubble",
|
||||
json={
|
||||
"token": self.token,
|
||||
"lat": self.lat,
|
||||
"lng": self.lng,
|
||||
"platform": "na",
|
||||
"env": "{}"
|
||||
}
|
||||
)
|
||||
get_bubble_data = get_bubble_response.json()
|
||||
bubble_list = get_bubble_data.get('data', {}).get('bubble_list', [])
|
||||
for bubble in bubble_list:
|
||||
if bubble.get('pre_content') == "完单返":
|
||||
cycle_id = bubble.get('cycle_id')
|
||||
reward_count = bubble.get('reward_count')
|
||||
receive_wyc_order_finish_response = await self.client.post(
|
||||
url="https://ut.xiaojukeji.com/ut/welfare/api/action/clickBubble",
|
||||
json={
|
||||
"token": self.token,
|
||||
"lat": self.lat,
|
||||
"lng": self.lng,
|
||||
"platform": "na",
|
||||
"env": "{}",
|
||||
"cycle_id": cycle_id,
|
||||
"bubble_type": "wyc_order_finish"
|
||||
}
|
||||
)
|
||||
if receive_wyc_order_finish_response.status_code == 200:
|
||||
receive_wyc_order_finish_data = receive_wyc_order_finish_response.json()
|
||||
if receive_wyc_order_finish_data.get("errno") == 0:
|
||||
fn_print(
|
||||
f"用户【“{self.user_phone}】, ===领取气泡奖励完单返福利金成功🎉, 获得{reward_count}福利金!===")
|
||||
return
|
||||
else:
|
||||
fn_print(
|
||||
f"用户【“{self.user_phone}】, ===领取气泡奖励完单返福利金失败, {receive_wyc_order_finish_data}===")
|
||||
else:
|
||||
fn_print(f"===领取气泡奖励完单返福利金请求异常, {receive_wyc_order_finish_response.text}===")
|
||||
|
||||
async def claim_coupon_check_in(self):
|
||||
"""
|
||||
领取天天神券签到
|
||||
:return:
|
||||
"""
|
||||
claim_coupon_check_in_response = await self.client.post(
|
||||
url="https://ut.xiaojukeji.com/ut/janitor/api/action/sign/do",
|
||||
headers={'Didi-Ticket': self.token}
|
||||
)
|
||||
if claim_coupon_check_in_response.status_code == 200:
|
||||
claim_coupon_check_in_data = claim_coupon_check_in_response.json()
|
||||
if claim_coupon_check_in_data.get("errno") == 0:
|
||||
current_progress = claim_coupon_check_in_data.get("data").get("current_progress")
|
||||
total_progress = claim_coupon_check_in_data.get("data").get("total_progress")
|
||||
fn_print(
|
||||
f"用户【“{self.user_phone}】, ===领取天天神券签到成功🎉签到进度:{current_progress}/{total_progress}===")
|
||||
return
|
||||
else:
|
||||
fn_print(f"用户【“{self.user_phone}】, ===领取天天神券签到失败, {claim_coupon_check_in_data}===")
|
||||
else:
|
||||
fn_print(f"===领取天天神券签到请求异常, {claim_coupon_check_in_response.text}===")
|
||||
|
||||
async def claim_coupon_lottery(self):
|
||||
"""
|
||||
天天神券抽奖
|
||||
:return:
|
||||
"""
|
||||
get_draw_times_response = await self.client.post(
|
||||
url="https://api.didi.cn/webx/chapter/product/init",
|
||||
headers={'Didi-Ticket': self.token},
|
||||
json={
|
||||
"dchn": "dKlklLa",
|
||||
"args": {
|
||||
"runtime_args":
|
||||
{
|
||||
"token": self.token,
|
||||
"lat": self.lat,
|
||||
"lng": self.lng,
|
||||
"env": {},
|
||||
"platform": "na",
|
||||
"Didi-Ticket": self.token,
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
if get_draw_times_response.status_code == 200:
|
||||
get_draw_times_data = get_draw_times_response.json()
|
||||
lottery_chance = get_draw_times_data.get('data').get('conf').get('strategy_data').get('data').get(
|
||||
'lottery_chance')
|
||||
act_id = get_draw_times_data.get('data').get('conf').get('ext').get('act_conf').get('act_id')
|
||||
for _ in range(lottery_chance):
|
||||
lucky_draw_response = await self.client.post(
|
||||
url="https://ut.xiaojukeji.com/ut/janitor/api/action/lottery/doLottery",
|
||||
headers={'Didi-Ticket': self.token},
|
||||
json={
|
||||
"act_id": act_id
|
||||
}
|
||||
)
|
||||
lucky_draw_data = lucky_draw_response.json()
|
||||
if lucky_draw_data.get("errno") == 0:
|
||||
fn_print(
|
||||
f"用户【“{self.user_phone}】, ===抽奖成功🎉, 获得{lucky_draw_data.get('data').get('prize_data')[0].get('name')}===")
|
||||
await asyncio.sleep(5)
|
||||
continue
|
||||
else:
|
||||
fn_print(f"用户【“{self.user_phone}】, ===天天神券抽奖失败, {lucky_draw_data}===")
|
||||
return
|
||||
else:
|
||||
fn_print(f"===天天神券获取抽奖次数请求异常, {get_draw_times_response.text}===")
|
||||
|
||||
async def run_scratch(self):
|
||||
"""
|
||||
运行刮刮乐
|
||||
:return:
|
||||
"""
|
||||
if await self.get_carve_up_action_id():
|
||||
fn_print(f"用户【“{self.user_phone}】, ===开始完成今日瓜分活动===")
|
||||
if self.status_today == 2:
|
||||
await self.complete_carve_up_action()
|
||||
elif self.status_today == 3:
|
||||
fn_print(f"用户【“{self.user_phone}】, ===今日瓜分活动已完成,无需重复完成!===")
|
||||
elif self.status_today == 4:
|
||||
fn_print(f"用户【“{self.user_phone}】, ===今日已领取瓜分活动奖励!===")
|
||||
else:
|
||||
fn_print(f"用户【“{self.user_phone}】, ===今日瓜分活动完成失败!肯昨日未报名!===")
|
||||
fn_print(f"用户【“{self.user_phone}】, ===开始报名明日瓜分活动===")
|
||||
if self.status_tomorrow == 1:
|
||||
await self.apply_carve_up_action()
|
||||
elif self.status_tomorrow == 2:
|
||||
fn_print(f"用户【“{self.user_phone}】, ===明日瓜分活动已报名,无需重复报名!===")
|
||||
else:
|
||||
fn_print(f"用户【“{self.user_phone}】, ===明日瓜分活动报名失败!===")
|
||||
|
||||
async def today_pick(self):
|
||||
"""
|
||||
每日精选
|
||||
:return:
|
||||
"""
|
||||
get_batch_config_response = await self.client.post(
|
||||
url="https://api.didi.cn/webx/chapter/page/batch/config",
|
||||
headers={'Didi-Ticket': self.token},
|
||||
json={
|
||||
"dchn": "PxJanq9",
|
||||
"args": [
|
||||
{"dchn": "kkXgpzO",
|
||||
"prod_key": "ut-limited-seckill",
|
||||
"runtime_args":
|
||||
{
|
||||
"token": self.token,
|
||||
"lat": self.lat,
|
||||
"lng": self.lng,
|
||||
"env": {},
|
||||
"Didi-Ticket": self.token,
|
||||
}
|
||||
},
|
||||
{"dchn": "gL3E8qZ",
|
||||
"prod_key": "ut-support-coupon",
|
||||
"runtime_args": {
|
||||
"token": self.token,
|
||||
"lat": self.lat,
|
||||
"lng": self.lng,
|
||||
"env": {},
|
||||
"Didi-Ticket": self.token}
|
||||
}
|
||||
]
|
||||
}
|
||||
)
|
||||
if get_batch_config_response.status_code == 200:
|
||||
get_batch_config_data = get_batch_config_response.json()
|
||||
activity_list = get_batch_config_data.get("data").get("conf")
|
||||
for activity in activity_list:
|
||||
if activity.get("dchn") == "gL3E8qZ":
|
||||
fn_print(f"用户【“{self.user_phone}】, ===开始领取每日精选===")
|
||||
coupons_list = activity.get("strategy_data").get("data").get("daily_coupon").get("coupons")
|
||||
coupons_status_name_dict = {
|
||||
'1': '可领取',
|
||||
'2': '已经领取',
|
||||
'4': '已抢光',
|
||||
'6': '待前置条件完成'
|
||||
}
|
||||
for coupon_index, coupon in enumerate(coupons_list):
|
||||
coupons_name = coupon.get("name")
|
||||
coupons_status = coupon.get("status") # 1为可领取 2为已经领取 4为抽奖抢券
|
||||
fn_print(f"==={coupon_index + 1}.券名:{coupons_name} "
|
||||
f"状态:{coupons_status_name_dict.get(str(coupons_status))}===")
|
||||
if coupons_status == 1:
|
||||
fn_print(f"===开始领取券:{coupons_name}===")
|
||||
activity_id = coupon.get("activity_id")
|
||||
if coupons_name == "打车5元券":
|
||||
fn_print(f"用户【{self.user_phone}】, ===【打车5元券】为分享助力才能领券,不支持自动领券===")
|
||||
continue
|
||||
if activity_id == "10010":
|
||||
fn_print(
|
||||
f"用户【{self.user_phone}】, ===该券为明天在目的地栏搜“领券”必得1张快车优惠券,不支持自动领取===")
|
||||
continue
|
||||
group_id = coupon.get("group_id")
|
||||
coupon_conf_id = coupon.get("coupon_conf_id")
|
||||
group_date = coupon.get("group_date")
|
||||
bind_coupon_response = await self.client.post(
|
||||
url="https://ut.xiaojukeji.com/ut/janitor/api/action/coupon/bind",
|
||||
headers={'Didi-Ticket': self.token},
|
||||
json={
|
||||
'group_date': group_date,
|
||||
"activity_id": activity_id,
|
||||
"group_id": group_id,
|
||||
"coupon_conf_id": coupon_conf_id
|
||||
}
|
||||
)
|
||||
bind_coupon_data = bind_coupon_response.json()
|
||||
if bind_coupon_data.get("errno") == 0:
|
||||
fn_print(f"用户【{self.user_phone}】, ===领取成功🎉===")
|
||||
await asyncio.sleep(0.5)
|
||||
continue
|
||||
else:
|
||||
fn_print(f"用户【{self.user_phone}】, ===领取失败,{bind_coupon_data}===")
|
||||
return
|
||||
if activity.get("dchn") == "kkXgpzO":
|
||||
fn_print(f"用户【“{self.user_phone}】, ===开始领取限时抢===")
|
||||
seckill_list = activity.get("strategy_data").get("data").get("seckill") # 秒杀列表
|
||||
seckill_status_name_dict = {
|
||||
'1': '正在热抢',
|
||||
'2': '即将开始',
|
||||
'3': '已经开抢'
|
||||
}
|
||||
coupons_status_name_dict = {
|
||||
'1': '可领取',
|
||||
'2': '已经领取',
|
||||
'4': '抽奖抢券',
|
||||
'5': '未到时间'
|
||||
}
|
||||
for seckill in seckill_list:
|
||||
seckill_name = seckill.get("start_at")
|
||||
seckill_status = int(seckill.get("status")) # 1为正在热抢 2为即将开始 3为已经开抢
|
||||
fn_print(f"☆☆场次:{seckill_name} 状态:{seckill_status_name_dict[str(seckill_status)]}")
|
||||
if seckill_status in [1, 3]:
|
||||
coupons_list = seckill.get("coupons")
|
||||
for coupon_index, coupon in enumerate(coupons_list):
|
||||
coupons_name = coupon.get("name")
|
||||
coupons_status = coupon.get("status") # 1为可领取 2为已经领取 4为抽奖抢券
|
||||
fn_print(f"==={coupon_index + 1}.券名:{coupons_name} "
|
||||
f"状态:{coupons_status_name_dict.get(str(coupons_status))}===")
|
||||
if coupons_status == 1:
|
||||
fn_print(f"===开始领取券:{coupons_name}===")
|
||||
activity_id = coupon.get("activity_id")
|
||||
group_id = coupon.get("group_id")
|
||||
coupon_conf_id = coupon.get("coupon_conf_id")
|
||||
group_date = coupon.get("group_date")
|
||||
bind_coupon_response = await self.client.post(
|
||||
url="https://ut.xiaojukeji.com/ut/janitor/api/action/coupon/bind",
|
||||
headers={'Didi-Ticket': self.token},
|
||||
json={
|
||||
"activity_id": activity_id,
|
||||
"group_id": group_id,
|
||||
'group_date': group_date,
|
||||
"coupon_conf_id": coupon_conf_id
|
||||
}
|
||||
)
|
||||
bind_coupon_data = bind_coupon_response.json()
|
||||
if bind_coupon_data.get("errno") == 0:
|
||||
fn_print(f"用户【{self.user_phone}】, ===领取成功🎉===")
|
||||
await asyncio.sleep(0.5)
|
||||
continue
|
||||
else:
|
||||
fn_print(f"用户【{self.user_phone}】, ===领取失败,{bind_coupon_data}===")
|
||||
return
|
||||
else:
|
||||
fn_print(f"===每日精选请求异常, {get_batch_config_response.text}===")
|
||||
|
||||
async def run(self):
|
||||
await self.get_user_info()
|
||||
fn_print(f"用户【{self.user_phone}】, ===当前福利金数量为:{await self.get_welfare_payments()}===")
|
||||
task = [
|
||||
self.today_pick(),
|
||||
self.sign_in(),
|
||||
self.run_scratch(),
|
||||
self.receive_level_gift_week(),
|
||||
self.receive_level_gift_month(),
|
||||
self.swell_coupon(),
|
||||
self.receive_travel_insurance(),
|
||||
self.receive_memberday_discount_multi(),
|
||||
self.receive_wyc_order_finish(),
|
||||
self.claim_coupon_check_in(),
|
||||
self.claim_coupon_lottery()
|
||||
]
|
||||
await asyncio.gather(*task)
|
||||
fn_print(f"用户【{self.user_phone}】, ===当前福利金数量为:{await self.get_welfare_payments()}===")
|
||||
|
||||
|
||||
async def main():
|
||||
task = []
|
||||
for token in dd_tokens:
|
||||
dd = DiDi(token)
|
||||
task.append(dd.run())
|
||||
await asyncio.gather(*task)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
asyncio.run(main())
|
||||
send_notification_message_collection("滴滴出行通知 - {}".format(datetime.datetime.now().strftime("%Y/%m/%d")))
|
||||
25
脚本库/web版/抓包/老铁爱分享/2025-11-29_老铁爱分享_89434746.js
Normal file
25
脚本库/web版/抓包/老铁爱分享/2025-11-29_老铁爱分享_89434746.js
Normal file
File diff suppressed because one or more lines are too long
35
脚本库/web版/账密/Anime字幕论坛_,/2023-01-21_Anime_ae31e135.js
Normal file
35
脚本库/web版/账密/Anime字幕论坛_,/2023-01-21_Anime_ae31e135.js
Normal file
@@ -0,0 +1,35 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/Anime.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/Anime.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/Anime.js
|
||||
// # UploadedAt: 2023-01-21T03:29:57Z
|
||||
// # SHA256: ae31e135b3cf61bf21536d587c788f23b7fd2b7a338b497319f729e82deab24d
|
||||
// # Category: web版/账密
|
||||
// # Evidence: web/H5关键词 + username/password/login
|
||||
//
|
||||
|
||||
const rules = {
|
||||
name: "【Anime字幕论坛】:",
|
||||
url: "https://bbs.acgrip.com/member.php?mod=logging&action=login&mobile=2", //用于获取formhash的链接
|
||||
cookie: config.Anime.cookie,
|
||||
formhash: 'formhash\":\"(.+?)\"', //formhash正则
|
||||
verify: "答案", //验证cookie状态
|
||||
op: [{
|
||||
name: "签到",
|
||||
method: "post", //签到请求方式
|
||||
url: "https://bbs.acgrip.com/plugin.php?id=dsu_paulsign:sign&operation=qiandao&infloat=0&inajax=0&mobile=yes", //签到链接
|
||||
data: "formhash=@formhash&qdxq=kx&qdmode=3&todaysay=&fastreply="
|
||||
},
|
||||
{
|
||||
name: "申请红包任务",
|
||||
ua: "pc",
|
||||
method: "get",
|
||||
url: "https://bbs.acgrip.com/home.php?mod=task&do=apply&id=1"
|
||||
} ]
|
||||
};
|
||||
|
||||
async function Anime() {
|
||||
const template = require("../Template");
|
||||
return rules.name + await template(rules)
|
||||
}
|
||||
module.exports = Anime
|
||||
236
脚本库/web版/账密/Bitwarden备份/2026-05-23_Sync_Password_e63fb7c9.py
Normal file
236
脚本库/web版/账密/Bitwarden备份/2026-05-23_Sync_Password_e63fb7c9.py
Normal file
@@ -0,0 +1,236 @@
|
||||
# Source: https://github.com/CN-Grace/QinglongScripts/blob/main/Sync_Password.py
|
||||
# Raw: https://raw.githubusercontent.com/CN-Grace/QinglongScripts/main/Sync_Password.py
|
||||
# Repo: CN-Grace/QinglongScripts
|
||||
# Path: Sync_Password.py
|
||||
# UploadedAt: 2026-05-23T15:48:24Z
|
||||
# SHA256: e63fb7c92c4a77f2dc4660a1ce3f0401a8173132dc4b8d36a99c7d383f91974e
|
||||
# Category: web版/账密
|
||||
# Evidence: web/H5关键词 + username/password/login
|
||||
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
cron: 0 0 * * *
|
||||
new Env("Bitwarden备份")
|
||||
Bitwarden 自动备份脚本(带哈希比较,避免重复同步)
|
||||
- 自动登录 Bitwarden 服务器并获取所有密码数据
|
||||
- 将密码数据保存到本地 JSON 文件
|
||||
- 比较今天与昨天的备份文件哈希,若无变化则跳过 WebDAV 同步
|
||||
- 将备份文件同步到 WebDAV 服务器(仅当有更新时)
|
||||
"""
|
||||
|
||||
import os
|
||||
import json
|
||||
import hashlib
|
||||
import requests
|
||||
import datetime
|
||||
from requests.auth import HTTPBasicAuth
|
||||
from typing import Dict, Any, Tuple
|
||||
|
||||
from utils import log_info, log_success, log_warning, log_error, beijing_now, beijing_time_str
|
||||
from notifier import send as notify_send, send_file as notify_send_file
|
||||
|
||||
# ==================== 用户配置 ====================
|
||||
BITWARDEN_SERVER = os.environ.get("BITWARDEN_SERVER", "")
|
||||
BITWARDEN_USERNAME = os.environ.get("BITWARDEN_USERNAME", "")
|
||||
BITWARDEN_PASSWORD = os.environ.get("BITWARDEN_PASSWORD", "")
|
||||
WEBDAV_SERVER = os.environ.get("WEBDAV_SERVER", "")
|
||||
WEBDAV_USERNAME = os.environ.get("WEBDAV_USERNAME", "")
|
||||
WEBDAV_PASSWORD = os.environ.get("WEBDAV_PASSWORD", "")
|
||||
WEBDAV_REMOTE_DIR = os.environ.get("WEBDAV_REMOTE_DIR", "")
|
||||
LOCAL_BACKUP_PATH = os.environ.get("SYNC_LOCAL_DIR", "Password/")
|
||||
BACKUP_FILENAME_FORMAT = "%Y-%m-%d_bitwarden_backup.json"
|
||||
|
||||
|
||||
def create_session() -> requests.Session:
|
||||
session = requests.Session()
|
||||
session.headers.update({"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", "Accept": "application/json, text/plain, */*"})
|
||||
return session
|
||||
|
||||
|
||||
def bitwarden_login(session: requests.Session) -> Tuple[bool, str]:
|
||||
login_url = f"{BITWARDEN_SERVER.rstrip('/')}/identity/connect/token"
|
||||
login_data = {
|
||||
"scope": "api offline_access", "client_id": "web", "deviceType": "12",
|
||||
"deviceIdentifier": "65ff3d73-fd5f-4835-8a50-fa7f41581f48", "deviceName": "edge",
|
||||
"grant_type": "password", "username": BITWARDEN_USERNAME, "password": BITWARDEN_PASSWORD,
|
||||
}
|
||||
try:
|
||||
log_info(f"正在登录 Bitwarden: {BITWARDEN_SERVER}")
|
||||
resp = session.post(login_url, data=login_data, timeout=30)
|
||||
resp.raise_for_status()
|
||||
access_token = resp.json().get("access_token")
|
||||
if access_token:
|
||||
session.headers.update({"Authorization": f"Bearer {access_token}"})
|
||||
log_success("Bitwarden 登录成功")
|
||||
return True, "✅ Bitwarden 登录成功"
|
||||
log_error("响应中未找到 access_token")
|
||||
return False, "❌ Bitwarden 登录失败: 未找到 access_token"
|
||||
except Exception as e:
|
||||
log_error(f"Bitwarden 登录失败: {e}")
|
||||
return False, f"❌ Bitwarden 登录失败: {e}"
|
||||
|
||||
|
||||
def get_bitwarden_data(session: requests.Session) -> Tuple[bool, Any, str]:
|
||||
sync_url = f"{BITWARDEN_SERVER.rstrip('/')}/api/sync"
|
||||
try:
|
||||
log_info("正在获取 Bitwarden 数据...")
|
||||
resp = session.get(sync_url, params={"excludeDomains": "true"}, timeout=30)
|
||||
resp.raise_for_status()
|
||||
data = resp.json()
|
||||
if data and isinstance(data, dict):
|
||||
item_count = len(data.get("ciphers", []))
|
||||
log_success(f"成功获取数据 ({item_count} 个密码项)")
|
||||
return True, data, f"✅ 成功获取数据 ({item_count} 个密码项)"
|
||||
return False, None, "⚠️ 数据为空或格式不正确"
|
||||
except Exception as e:
|
||||
log_error(f"获取数据失败: {e}")
|
||||
return False, None, f"❌ 获取数据失败: {e}"
|
||||
|
||||
|
||||
def save_backup_locally(data: Dict[str, Any]) -> Tuple[bool, str, str]:
|
||||
if not os.path.exists(LOCAL_BACKUP_PATH):
|
||||
os.makedirs(LOCAL_BACKUP_PATH, exist_ok=True)
|
||||
today = beijing_now()
|
||||
filename = today.strftime(BACKUP_FILENAME_FORMAT)
|
||||
filepath = os.path.join(LOCAL_BACKUP_PATH, filename)
|
||||
try:
|
||||
with open(filepath, "w", encoding="utf-8") as f:
|
||||
json.dump(data, f, indent=4, ensure_ascii=False)
|
||||
file_size = os.path.getsize(filepath) / (1024 * 1024)
|
||||
log_success(f"本地备份: {filename} ({file_size:.2f} MB)")
|
||||
return True, filepath, f"✅ 本地备份成功: {filename} ({file_size:.2f} MB)"
|
||||
except Exception as e:
|
||||
log_error(f"本地备份失败: {e}")
|
||||
return False, "", f"❌ 本地备份失败: {e}"
|
||||
|
||||
|
||||
def get_file_hash(filepath: str) -> str:
|
||||
hash_md5 = hashlib.md5()
|
||||
with open(filepath, "rb") as f:
|
||||
for chunk in iter(lambda: f.read(4096), b""):
|
||||
hash_md5.update(chunk)
|
||||
return hash_md5.hexdigest()
|
||||
|
||||
|
||||
def sync_to_webdav(local_filepath: str) -> Tuple[bool, str]:
|
||||
if not os.path.exists(local_filepath):
|
||||
return False, "❌ WebDAV 同步失败: 本地文件不存在"
|
||||
filename = os.path.basename(local_filepath)
|
||||
remote_dir = WEBDAV_REMOTE_DIR.rstrip("/") if WEBDAV_REMOTE_DIR else "123Pan/Password"
|
||||
remote_path = f"{WEBDAV_SERVER.rstrip('/')}/{remote_dir}/{filename}"
|
||||
try:
|
||||
with open(local_filepath, "rb") as f:
|
||||
file_data = f.read()
|
||||
log_info(f"正在上传到 WebDAV: {remote_path}")
|
||||
resp = requests.put(url=remote_path, data=file_data, auth=HTTPBasicAuth(WEBDAV_USERNAME, WEBDAV_PASSWORD), headers={"Content-Type": "application/octet-stream"}, timeout=60)
|
||||
if resp.status_code in (200, 201, 204):
|
||||
log_success("WebDAV 同步成功")
|
||||
return True, f"✅ WebDAV 同步成功: {filename}"
|
||||
return False, f"❌ WebDAV 同步失败: 状态码 {resp.status_code}"
|
||||
except Exception as e:
|
||||
log_error(f"WebDAV 同步失败: {e}")
|
||||
return False, f"❌ WebDAV 同步失败: {e}"
|
||||
|
||||
|
||||
def build_report_content(log_messages: list) -> str:
|
||||
lines = [
|
||||
"🔐 Bitwarden 备份报告", "",
|
||||
f"📅 备份时间: {beijing_time_str()}",
|
||||
f"👤 账户: {BITWARDEN_USERNAME}", "",
|
||||
"─" * 18, "",
|
||||
"📋 备份步骤状态:",
|
||||
]
|
||||
for i, msg in enumerate(log_messages, 1):
|
||||
lines.append(f" {i}. {msg}")
|
||||
|
||||
success_count = sum(1 for m in log_messages if m.startswith("✅"))
|
||||
info_count = sum(1 for m in log_messages if m.startswith("ℹ️") or m.startswith("⚠️"))
|
||||
skip_count = sum(1 for m in log_messages if m.startswith("⏭️"))
|
||||
|
||||
lines.extend(["", "─" * 18, f"📊 统计: 成功 {success_count} | 信息 {info_count} | 跳过 {skip_count} | 总计 {len(log_messages)}", "", f"🕒 执行时间: {beijing_time_str()}"])
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def perform_backup() -> Tuple[bool, list, str, bool]:
|
||||
log_messages = []
|
||||
backup_filepath = None
|
||||
has_update = True
|
||||
|
||||
session = create_session()
|
||||
login_success, login_msg = bitwarden_login(session)
|
||||
log_messages.append(login_msg)
|
||||
if not login_success:
|
||||
return False, log_messages, None, has_update
|
||||
|
||||
data_success, bitwarden_data, data_msg = get_bitwarden_data(session)
|
||||
log_messages.append(data_msg)
|
||||
if not data_success or bitwarden_data is None:
|
||||
return False, log_messages, None, has_update
|
||||
|
||||
save_success, filepath, save_msg = save_backup_locally(bitwarden_data)
|
||||
log_messages.append(save_msg)
|
||||
backup_filepath = filepath if save_success else None
|
||||
|
||||
if save_success and backup_filepath:
|
||||
today = beijing_now()
|
||||
yesterday = today - datetime.timedelta(days=1)
|
||||
yesterday_filename = yesterday.strftime(BACKUP_FILENAME_FORMAT)
|
||||
yesterday_filepath = os.path.join(LOCAL_BACKUP_PATH, yesterday_filename)
|
||||
if os.path.exists(yesterday_filepath):
|
||||
if get_file_hash(backup_filepath) == get_file_hash(yesterday_filepath):
|
||||
has_update = False
|
||||
log_info("备份文件与昨天相同,无更新")
|
||||
log_messages.append("ℹ️ 备份文件与昨日一致,无新内容")
|
||||
else:
|
||||
log_info("备份文件有更新")
|
||||
else:
|
||||
log_info("昨日备份不存在,视为有更新")
|
||||
if has_update:
|
||||
sync_success, sync_msg = sync_to_webdav(backup_filepath)
|
||||
log_messages.append(sync_msg)
|
||||
else:
|
||||
log_messages.append("⏭️ WebDAV 同步跳过: 文件无变化")
|
||||
else:
|
||||
log_messages.append("⏭️ WebDAV 同步跳过: 本地备份失败")
|
||||
|
||||
all_success = all(msg.startswith("✅") or msg.startswith("⏭️") or msg.startswith("ℹ️") for msg in log_messages)
|
||||
return all_success, log_messages, backup_filepath, has_update
|
||||
|
||||
|
||||
def main():
|
||||
log_info("=" * 50)
|
||||
log_info("Bitwarden 自动备份脚本开始执行")
|
||||
log_info("=" * 50)
|
||||
|
||||
start_time = beijing_now()
|
||||
backup_success, log_messages, backup_filepath, has_update = perform_backup()
|
||||
|
||||
title = f"Bitwarden 备份报告"
|
||||
content = build_report_content(log_messages)
|
||||
|
||||
if has_update and backup_filepath and os.path.exists(backup_filepath):
|
||||
notify_send_file(title, content, backup_filepath)
|
||||
else:
|
||||
notify_send(title, content)
|
||||
|
||||
print(f"\n{'=' * 60}\nBitwarden 备份完成报告:\n{'=' * 60}")
|
||||
for i, msg in enumerate(log_messages, 1):
|
||||
print(f"{i}. {msg}")
|
||||
print(f"\n执行时间: {(beijing_now() - start_time).total_seconds():.2f}秒")
|
||||
print("=" * 60)
|
||||
|
||||
return 0 if backup_success else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
try:
|
||||
exit_code = main()
|
||||
except KeyboardInterrupt:
|
||||
log_info("用户中断执行")
|
||||
exit_code = 130
|
||||
except Exception as e:
|
||||
log_error(f"脚本异常: {e}")
|
||||
exit_code = 1
|
||||
log_info(f"脚本执行结束,退出代码: {exit_code}")
|
||||
sys.exit(exit_code)
|
||||
224
脚本库/web版/账密/acfun/2021-07-21_acfun_ce0d786f.js
Normal file
224
脚本库/web版/账密/acfun/2021-07-21_acfun_ce0d786f.js
Normal file
@@ -0,0 +1,224 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/acfun.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/acfun.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/acfun.js
|
||||
// # UploadedAt: 2021-07-21T17:31:24Z
|
||||
// # SHA256: ce0d786f36ec77fa4731b48f033edd1b0f7467bad760180dbafe255abace5c94
|
||||
// # Category: web版/账密
|
||||
// # Evidence: web/H5关键词 + username/password/login
|
||||
//
|
||||
|
||||
var st = "";
|
||||
var result = "ACFUN:\n";
|
||||
var authkey = "";
|
||||
var headers = {
|
||||
"referer": "https://www.acfun.cn/",
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.120 Safari/537.36",
|
||||
cookie: "",
|
||||
};
|
||||
const axios = require("axios");
|
||||
|
||||
function get(options) {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios
|
||||
.post(
|
||||
"https://www.acfun.cn/rest/pc-direct" + options.url,
|
||||
options.para, {
|
||||
headers,
|
||||
}
|
||||
)
|
||||
.then((response) => {
|
||||
signdata = ""
|
||||
resolve(response.data);
|
||||
})
|
||||
.catch((err) => {
|
||||
resolve(err.response.data);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
var signIn = async function() {
|
||||
return await get({
|
||||
url: `/user/signIn`,
|
||||
para: {},
|
||||
}).then((res) => {
|
||||
if (res.result == 0) {
|
||||
signata = "签到成功! || ";
|
||||
} else if (res.result == 122) {
|
||||
signdata = "今天已经签到过啦! || ";
|
||||
}
|
||||
console.log(signdata);
|
||||
result += signdata
|
||||
return res;
|
||||
});
|
||||
};
|
||||
var ThrowBanana = async function(id) {
|
||||
return await get({
|
||||
url: "/banana/throwBanana",
|
||||
para: `resourceId=${id}&count=1&resourceType=2`,
|
||||
}).then(async (res) => {
|
||||
console.log(id);
|
||||
if (res.result == 0) {
|
||||
signdata = "🍌易已达成! || ";
|
||||
} else if (
|
||||
res.error_msg == "内容未找到" ||
|
||||
res.error_msg == "被投蕉用户id不能小于0"
|
||||
) {
|
||||
await ThrowBanana(Math.round(Math.random() * 10000) + 14431808);
|
||||
} else {
|
||||
signdata = "🍌易失败! || ";
|
||||
console.log(res);
|
||||
}
|
||||
console.log(signdata);
|
||||
result += signdata;
|
||||
return res;
|
||||
});
|
||||
};
|
||||
|
||||
var getinfo = async function() {
|
||||
return await get({
|
||||
url: "/user/personalInfo",
|
||||
para: "",
|
||||
}).then(async (res) => {
|
||||
let info = `香蕉:${res.info.banana} 金香蕉:${res.info.goldBanana} `
|
||||
result += info
|
||||
console.log(info)
|
||||
});
|
||||
};
|
||||
|
||||
var NewDanmu = async function() {
|
||||
return await get({
|
||||
url: `/new-danmaku/add`,
|
||||
para: "mode=1&color=16777215&size=25&body=%E5%A5%BD%E8%80%B6&videoId=21772556&position=0&type=douga&id=26084622&subChannelId=60&subChannelName=%E5%A8%B1%E4%B9%90&roleId=",
|
||||
}).then((res) => {
|
||||
//console.log(res)
|
||||
if (res.result == 0) {
|
||||
signdata = "发送弹幕成功! || ";
|
||||
} else {
|
||||
signdata = "发送弹幕失败!|| ";
|
||||
console.log(res);
|
||||
}
|
||||
console.log(signdata);
|
||||
result += signdata;
|
||||
return res;
|
||||
});
|
||||
};
|
||||
//分享任务
|
||||
function share() {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
let res = await axios.get("https://api-ipv6.app.acfun.cn/rest/app/task/reportTaskAction?taskType=1&market=tencent&product=ACFUN_APP&sys_version=8.0.0&app_version=6.42.0.1119&ftt=K-F-T&boardPlatform=hi3650&sys_name=android&socName=%3A%20HiSilicon%20Kirin%20950&ks_ipv6_cellular=2408%3A8470%3A8a03%3A526d%3A8017%3Acdeb%3A414%3Acbec&appMode=0", {
|
||||
headers
|
||||
});
|
||||
if (res.data.result == 0) {
|
||||
console.log("分享成功");
|
||||
result += "分享成功! "
|
||||
} else {
|
||||
console.log(res.data);
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err.response.data);
|
||||
console.log("分享接口请求出错");
|
||||
result += "分享接口请求出错! ";
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
function getoken() {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
let res = await axios.post(
|
||||
"https://id.app.acfun.cn/rest/web/token/get",
|
||||
"sid=acfun.midground.api", {
|
||||
headers,
|
||||
}
|
||||
);
|
||||
if (res.data.result == 0 && res.data["acfun.midground.api_st"]) {
|
||||
st = res.data["acfun.midground.api_st"];
|
||||
// signdata = "获取token成功";
|
||||
// console.log(signdata);
|
||||
await interact("delete"); //取消点赞
|
||||
await interact("add"); //重新点赞
|
||||
} else {
|
||||
// signdata = "获取token失败";
|
||||
console.log(res.data);
|
||||
}
|
||||
// result += signdata;
|
||||
} catch (err) {
|
||||
console.log(err.response.data);
|
||||
// result += "token获取出错! || ";
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
//点赞
|
||||
function interact(option) {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
let data = `kpn=ACFUN_APP&kpf=PC_WEB&subBiz=mainApp&interactType=1&objectType=2&objectId=26030726&acfun.midground.api_st=${
|
||||
st || 0
|
||||
}&userId=${authkey}&extParams%5BisPlaying%5D=false&extParams%5BshowCount%5D=1&extParams%5BotherBtnClickedCount%5D=10&extParams%5BplayBtnClickedCount%5D=0`;
|
||||
let res = await axios.post(
|
||||
`https://kuaishouzt.com/rest/zt/interact/${option}`,
|
||||
data, {
|
||||
headers,
|
||||
}
|
||||
);
|
||||
if (res.data.result == 1) {
|
||||
console.log("点赞成功");
|
||||
} else {
|
||||
console.log(res.data);
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err.response.data);
|
||||
console.log("点赞接口请求出错");
|
||||
result += "点赞接口请求出错! || ";
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function acfun(account, password) {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
console.log("Acfun每日任务开始...");
|
||||
const account = config.acfun.phone;
|
||||
const password = config.acfun.password;
|
||||
let res = await axios.post(
|
||||
"https://id.app.acfun.cn/rest/web/login/signin",
|
||||
`username=${account}&password=${password}`, {
|
||||
headers,
|
||||
}
|
||||
);
|
||||
if (res.data.result == 0) {
|
||||
result += loginresult = `${res.data.username}登陆成功👏 || `;
|
||||
console.log(loginresult);
|
||||
authkey = res.data.auth_key;
|
||||
for (ck of res.headers["set-cookie"]) {
|
||||
headers.cookie += ck.split(";")[0] + ";"
|
||||
}
|
||||
await signIn();
|
||||
await ThrowBanana(Math.round(Math.random() * 10000) + 14431808);
|
||||
await NewDanmu();
|
||||
await getoken();
|
||||
await share()
|
||||
await getinfo()
|
||||
} else {
|
||||
result += loginresult = `登陆失败 ${res.data.error_msg}😅!!`;
|
||||
console.log(loginresult)
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
result += "登陆失败😅!!";
|
||||
console.log("登陆失败");
|
||||
}
|
||||
resolve(result);
|
||||
});
|
||||
}
|
||||
|
||||
//acfun()
|
||||
|
||||
module.exports = acfun;
|
||||
62
脚本库/web版/账密/aoqi/2024-02-09_aoqi_eb9a39b1.js
Normal file
62
脚本库/web版/账密/aoqi/2024-02-09_aoqi_eb9a39b1.js
Normal file
@@ -0,0 +1,62 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/aoqi.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/aoqi.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/aoqi.js
|
||||
// # UploadedAt: 2024-02-09T08:25:50Z
|
||||
// # SHA256: eb9a39b19a4c85f698020d7843d5052e768dff4a2705106bd64228d4cba6c34e
|
||||
// # Category: web版/账密
|
||||
// # Evidence: web/H5关键词 + username/password/login
|
||||
//
|
||||
|
||||
const axios = require("axios")
|
||||
var sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
|
||||
const headers = {
|
||||
"User-Agent": "Mozilla/5.0 (Linux; Android 11; Redmi K30) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.120 Mobile Safari/537.36",
|
||||
referer: "http://www.100bt.com/",
|
||||
"Host": "service.100bt.com",
|
||||
cookie: config.aoqi.cookie
|
||||
}
|
||||
|
||||
function get(api, data) {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
let url = `http://service.100bt.com/creditmall/${api}.jsonp?${data}&_=${Date.now()}`
|
||||
let res = await axios.get(url, {
|
||||
headers
|
||||
})
|
||||
console.log(res.data.jsonResult.message)
|
||||
resolve(res.data.jsonResult)
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getSsort(arr){for(var j=0;j<arr.length-1;j++){for(var i=0;i<arr.length-1-j;i++){if(Number(arr[i].score)<Number(arr[i+1].score)){var temp=arr[i];arr[i]=arr[i+1];arr[i+1]=temp}}}return arr};
|
||||
async function aoqi() {
|
||||
let info = ""
|
||||
let taskList = []
|
||||
let res = await get("activity/daily_task_list", "gameId=2")
|
||||
if (res.code == 0 && res.data) {
|
||||
let b = res.data.filter(x => x.status == 1).length
|
||||
if (b == 5) console.log("今日已完成5任务")
|
||||
else taskList = await getSsort(res.data.filter(x => x.status != 1))
|
||||
for (task of taskList) {
|
||||
await sleep(2500)
|
||||
await get("activity/do_task", `taskId=${task.taskID}&gameId=${task.gameID}`)
|
||||
}
|
||||
let infores = await get("my/user_info")
|
||||
info = `积分:${infores.data.credit} 已累计签到:${infores.data.signInTotal}天`
|
||||
|
||||
} else {
|
||||
info = res.message
|
||||
if((/请先登录/).test(info)) info +="单独通知"
|
||||
}
|
||||
console.log(info)
|
||||
return "【奥拉星】:"+info
|
||||
}
|
||||
//aoqi()
|
||||
module.exports = aoqi
|
||||
239
脚本库/web版/账密/hykb/2022-02-13_hykb_abf39a68.js
Normal file
239
脚本库/web版/账密/hykb/2022-02-13_hykb_abf39a68.js
Normal file
@@ -0,0 +1,239 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/hykb.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/hykb.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/hykb.js
|
||||
// # UploadedAt: 2022-02-13T11:19:00Z
|
||||
// # SHA256: abf39a687de703fd6dc0d8c0e524aba65c955cb47ead443d595a5d1ced87e751
|
||||
// # Category: web版/账密
|
||||
// # Evidence: web/H5关键词 + username/password/login
|
||||
//
|
||||
|
||||
//好游快爆爆米花任务,可兑换激活码、实物周边等
|
||||
//我的邀请码 sdvf180uscf3
|
||||
result = "【好游快爆】:";
|
||||
const $http = axios = require("axios");
|
||||
const hyck = config.hykb.scookie;
|
||||
const qq = config.hykb.qq?config.hykb.qq:null
|
||||
//照料id 我没加好友所以随机取得 第一个是我,不建议改ヽ(*´з`*)ノ
|
||||
// const moment=require("moment")
|
||||
var uid = ""
|
||||
//照料id 我没加好友所以随机取得 第一个是我,不建议改ヽ(*´з`*)ノ
|
||||
buid = [21039293,48653684,44191145,54216701,54184381,38442812,34977383,54099572,54060137,18344113,53950826,53334988,49100316,24158995,53043395,53746196,7495782,53752398,13268805,53540861,53169378,53481728,53480955,53236037,5015419,17998323,142234,53043027,53022651,52883552,52919017,52883915,2987459,52863870]
|
||||
scookie = hyck.match(/\|/)?encodeURIComponent(hyck):hyck
|
||||
function get(a, b) {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
let res = await axios.post(
|
||||
`https://huodong3.3839.com/n/hykb/${a}/ajax.php`,
|
||||
`ac=${b}&r=0.${Math.round(Math.random() * 8999999999999999) + 1000000000000000}&scookie=${scookie}`,
|
||||
{
|
||||
headers: {
|
||||
"User-Agent":
|
||||
config.UA?config.UA:"Mozilla/5.0 (Linux; Android 8.0.0; FRD-AL10 Build/HUAWEIFRD-AL10; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045224 Mobile Safari/537.36 V1_AND_SQ_7.1.0_0_TIM_D TIM/3.0.0.2860 QQ/6.5.5 NetType/WIFI WebP/0.3.0 Pixel/1080",
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
if (JSON.stringify(res.data).match(/玉米成熟度已经达到100/)) {
|
||||
await get("grow", "PlantRipe"); //收获
|
||||
await get("grow", "PlantSow"); //播种
|
||||
await get(a, b); //播种
|
||||
}
|
||||
if (JSON.stringify(res.data).match(/还没有播种玉米/)) {
|
||||
let bzs = await get("grow", "PlantSow"); //播种
|
||||
if (bzs.seed && bzs.seed == 0) {
|
||||
// console.log("莫得种子了")
|
||||
await get("grow", "GouMai&resure=1&gmmode=seed&tmpNum=10"); //购买种子*10
|
||||
await get("grow", "PlantSow"); //播种
|
||||
}
|
||||
await get(a, b);
|
||||
}
|
||||
|
||||
back = res.data;
|
||||
console.log(back);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
resolve(back);
|
||||
});
|
||||
}
|
||||
|
||||
function getid() {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
let res = await axios.get(
|
||||
"https://huodong3.3839.com/n/hykb/gs/index.php"
|
||||
);
|
||||
//预约游戏id
|
||||
str = res.data.match(/HdmodelUser\.Ling\((.+?)\)/g);
|
||||
let res2 = await axios.get(
|
||||
"https://huodong3.3839.com/n/hykb/grow/daily.php"
|
||||
);
|
||||
//任务id
|
||||
str2 = res2.data.match(
|
||||
/ACT\.Daily[a-z,A-Z]+(Share||Ling||JiaoHu){1,}\(\d+\)/g
|
||||
);
|
||||
id = str.concat(str2);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
async function task() {
|
||||
let logindata = await get("grow", "Dailylogin&id=174");
|
||||
if (logindata.key == "ok" ) {
|
||||
exdata = await get("kbexam","login")
|
||||
if(exdata.config.lyks==1){
|
||||
var mres = await axios.get(
|
||||
"https://ghproxy.com/https://raw.githubusercontent.com/Wenmoux/sources/master/other/miling.json"
|
||||
);
|
||||
await get("friend", `Secretorder&miling=${mres.data.miling}`); //密令
|
||||
await get("wxsph", `send_egg&egg_data=${mres.data.egg}`); //视频彩蛋
|
||||
await get("grow", "GuanZhu&singleUid=21039293"); //关注我
|
||||
await get("signhelp", "useCode&code=21039293"); //邀请码
|
||||
await get("friend", "LingXinrenFuli");
|
||||
await get("grow", "shareEwai");
|
||||
// await get("friend","EnterInviteCode&invitecode=sdvf180uscf3","") //填邀请码
|
||||
await getid(); //获取任务id
|
||||
await get("grow", "Watering&id=6"); //浇灌
|
||||
let canzl = true
|
||||
let mode =0
|
||||
// let uids = await axios.get("http://1oner.cn:1919/hykb/all?res=uid")
|
||||
// if(uids && uids.data && uids.data.message) buid = uids.data.message
|
||||
for (i of buid) {
|
||||
if(mode!=2){
|
||||
if(canzl) {
|
||||
let zlres= await get("grow", `gamehander&buid=${i}&icon_id=58`); //照料
|
||||
mode = zlres.mode
|
||||
if(zlres.sy_day_shijian_corn_max_num ==0) canzl=false
|
||||
}
|
||||
if (i != 21039293) {
|
||||
let stealres = await get("grow", `gamehander&buid=${i}&icon_id=888888`,true); //偷玉米
|
||||
console.log(`偷 ${i}玉米 ${stealres.msg}`)
|
||||
}
|
||||
}}
|
||||
// if(mode!=2) await axios.post("http://1oner.cn:1919/hykb/add", `uid=${logindata.uid}&nickname=${encodeURI(logindata.name)}`)
|
||||
for (i of id) {
|
||||
i = i.match(/\.(.+)\((\d+)\)/);
|
||||
switch (i[1]) {
|
||||
case "Ling":
|
||||
await get("gs", `recordshare&gameid=${i[2]}`); //分享
|
||||
await get("gs", `ling&gameid=${i[2]}`); //领取
|
||||
break;
|
||||
case "DailyShare":
|
||||
await get("grow", `DailyShare&id=${i[2]}`); //发起分享
|
||||
await get("grow", `DailyShareCallb&id=${i[2]}`); //返回
|
||||
await get("grow", `DailyShare&id=${i[2]}`); //领取
|
||||
break;
|
||||
case "DailyAppLing":
|
||||
await get("grow", `DailyAppJump&id=${i[2]}`); //好游快玩
|
||||
await get("grow", `DailyAppLing&id=${i[2]}`);
|
||||
break;
|
||||
case "DailyGameCateLing":
|
||||
await get("grow", `DailyGameCateJump&id=${i[2]}`); //精品栏目
|
||||
await get("grow", `DailyGameCateLing&id=${i[2]}`);
|
||||
break;
|
||||
case "DailyGameLing":
|
||||
await get("grow", `DailyGamePlay&id=${i[2]}`); //打开试玩
|
||||
await get("grow", `DailyGameLing&id=${i[2]}`); //试玩领取
|
||||
break;
|
||||
case "DailyYuyueLing":
|
||||
await get("grow", `DailyYuyueLing&id=${i[2]}`); //预约领取
|
||||
break;
|
||||
case "DailyDouyinLing":
|
||||
await get("grow", "DailyDouyinCheck", i[2]);
|
||||
await get("grow", "DailyDouyinPlay", i[2]); //打开抖音
|
||||
await get("grow", "DailyDouyinLing", i[2]); //领取
|
||||
break;
|
||||
case "DailyVideoLing":
|
||||
await get("grow", `DailyVideoGuanzhu&id=${i[2]}`);
|
||||
await get("grow", `DailyVideoShare&id=${i[2]}`);
|
||||
await get("wxsph", "share&mode=qq"); //DailyVideoShare
|
||||
await get("grow", `DailyVideoLing&id=${i[2]}`);
|
||||
case "DailyJiaoHu":
|
||||
await get("grow", `DailyJiaoHu&id=${i[2]}`); //分享任务
|
||||
break;
|
||||
case "DailyDati":
|
||||
let ress = await get("grow", "DailyDati&id=4"); //获取题目
|
||||
if (ress.option1 && ress.expand) {
|
||||
i = 1;
|
||||
kw = 1;
|
||||
let yxid = ress.expand.split("##")[1] || "16876"; //获取游戏id
|
||||
let urll = `https://api.3839app.com/cdn/android/gameintro-home-1546-id-${yxid}-packag--level-2.htm`;
|
||||
let resss = await axios.get(urll);
|
||||
if (resss.data.result) {
|
||||
let strr = JSON.stringify(resss.data.result.data.downinfo.appinfo)
|
||||
.replace(/ /g, "")
|
||||
.replace(/ /g, ""); //查答案
|
||||
reg = /错误|不属于|不是|不存在|没有|不需要|不能|不可以/;
|
||||
if (reg.test(ress.title)) {
|
||||
console.log("错误类型");
|
||||
for (i; i < 5; i++) {
|
||||
let strrr = ress["option" + i].replace(/ /g, "");
|
||||
if (!strr.match(strrr)) {
|
||||
kw = i;
|
||||
// await get("grow", `DailyDatiAnswer&option=${ress["option" + i]}`, 4)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// console.log("正确类型")
|
||||
for (i; i < 5; i++) {
|
||||
let strrr = ress["option" + i].replace(/ /g, "");
|
||||
if (strr.match(strrr)) {
|
||||
kw = i;
|
||||
// await get("grow", `DailyDatiAnswer&option=${ress["option" + kw]}`, 4)
|
||||
}
|
||||
}
|
||||
}
|
||||
//瞎鸡儿答 非游戏类问题/找不到答案
|
||||
//算了不瞎鸡儿答了 自行去app里答吧
|
||||
}
|
||||
console.log("正确答案");
|
||||
console.log(ress["option" + kw]);
|
||||
await get("grow", `DailyDatiAnswer&option=${ress["option" + kw]}&id=4`);
|
||||
} else {
|
||||
console.log("劳资找不到答案,请自行去app里答题");
|
||||
}
|
||||
break;
|
||||
case "DailyFriendLing":
|
||||
await get("grow", `DailyFriendLing&id=${i[2]}`); //照料5次
|
||||
break;
|
||||
case "DailyInviteLing":
|
||||
/* let invite = await get("grow", `DailyInviteJump&id=${i[2]}`);
|
||||
let uid = invite.invite_url.match(/u=(.+?)&/);
|
||||
await get("grow", `DailyInvite&u=${uid ? uid[1] : ""}&rwid=10`); //邀请下载
|
||||
*/
|
||||
await get("grow", `DailyInviteLing&id=${i[2]}`);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
let tasl1data = await axios.get(
|
||||
"https://ghproxy.com/https://raw.githubusercontent.com/Wenmoux/sources/master/other/activities.js"
|
||||
);
|
||||
eval(tasl1data.data);
|
||||
await task1();
|
||||
let csdata = await get("grow", `Dailylogin&id=174`); //查询
|
||||
if (csdata.key == "ok" && csdata.config ) {
|
||||
csinfo = csdata.config
|
||||
exinfo = exdata.config
|
||||
result +=`昵称:${csinfo.name} \n种子:${csinfo.seed}爆米花:${csinfo.baomihua} \n成熟度:${csinfo.chengshoudu} \n荣誉等级:${exinfo.tag_title}\n`
|
||||
if (csinfo.chengshoudu == 100) {
|
||||
await get("grow", "PlantRipe"); //收获
|
||||
await get("grow", "PlantSow"); //播种
|
||||
}
|
||||
} else {
|
||||
result += csdata.key;
|
||||
}
|
||||
}else{
|
||||
result += "请先进行礼仪考试,再运行脚本"
|
||||
}
|
||||
return result;
|
||||
} else {
|
||||
console.log(logindata);
|
||||
return "【好游快爆】: " + logindata.key;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = task;
|
||||
347
脚本库/web版/账密/mdd/2022-11-27_mdd_56d7dc78.js
Normal file
347
脚本库/web版/账密/mdd/2022-11-27_mdd_56d7dc78.js
Normal file
@@ -0,0 +1,347 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/mdd.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/mdd.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/mdd.js
|
||||
// # UploadedAt: 2022-11-27T14:39:31Z
|
||||
// # SHA256: 56d7dc787522745234fbc3197a7cbdc59fb6eb341e2faf9868ca43d35cc7b5bb
|
||||
// # Category: web版/账密
|
||||
// # Evidence: web/H5关键词 + username/password/login
|
||||
//
|
||||
|
||||
/*
|
||||
sign解密过程
|
||||
http://www.liteng1220.com/blog/articles/mdd-crack/
|
||||
https://github.com/navhu/MddOnline
|
||||
2021-04-09
|
||||
*/
|
||||
const axios = require("axios")
|
||||
const md5 =require("crypto-js").MD5
|
||||
const appToken = config.mdd.appToken
|
||||
const deviceNum = config.mdd.deviceNum ? config.mdd.deviceNum : "11b1384f0801478795ae2fab421fc413"
|
||||
let taskVideoUuid;
|
||||
var i = 1
|
||||
const date = new Date();
|
||||
signdata = "【埋堆堆每日任务】:"
|
||||
const Sign = function(action, param) {
|
||||
var str = '';
|
||||
var arr = [];
|
||||
var data = {
|
||||
'os': 'iOS',
|
||||
'version': '4.0.92',
|
||||
'action': action,
|
||||
'time': new Date().getTime().toString(),
|
||||
'appToken': appToken,
|
||||
'privateKey': 'e1be6b4cf4021b3d181170d1879a530a9e4130b69032144d5568abfd6cd6c1c2',
|
||||
'data': ''
|
||||
};
|
||||
for (var key in data) {
|
||||
if (data.hasOwnProperty(key)) {
|
||||
arr.push(key + ':' + data[key]);
|
||||
}
|
||||
}
|
||||
str = arr.join('|');
|
||||
for (var key in param) {
|
||||
if (param.hasOwnProperty(key)) {
|
||||
str += (key + '=' + param[key] + '&');
|
||||
}
|
||||
}
|
||||
sign = md5(str).toString()
|
||||
bbody = {
|
||||
action: action,
|
||||
os: 'iOS',
|
||||
channel: 'AppStore',
|
||||
time: data.time,
|
||||
deviceNum: '11b1384f0801478795ae2fab421fc413',
|
||||
deviceType: 1,
|
||||
appToken: appToken,
|
||||
data: param,
|
||||
version: '4.0.92',
|
||||
sign
|
||||
}
|
||||
return bbody
|
||||
}
|
||||
|
||||
|
||||
|
||||
function task(name, action, param) {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
let data = Sign(action, param)
|
||||
let res = await axios.post(`https://mob.mddcloud.com.cn${action}`, data, {
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
})
|
||||
// console.log(res.data)
|
||||
if (res.data.status && res.data.data) {
|
||||
if (action.match(/like/)) {
|
||||
console.log(`第${i++}次点赞成功`)
|
||||
msg = ""
|
||||
} else {
|
||||
if (action.match(/signIn/)) {
|
||||
msg = `签到成功:获得${res.data.data.pointIncr}堆豆,${res.data.data.expIncr} || `
|
||||
} else if (action.match(/acceptAll/)) {
|
||||
msg = `领取成功!获得${res.data.data.pointIncr}堆豆,${res.data.data.expIncr}经验 当前共${res.data.data.memberPoint}堆豆,${res.data.data.memberExp}经验值`
|
||||
} else {
|
||||
msg = `${name}:${res.data.msg} || `
|
||||
}
|
||||
}
|
||||
} else {
|
||||
msg = name + ":" + res.data.msg + " || "
|
||||
}
|
||||
resolve(res.data)
|
||||
|
||||
console.log(msg)
|
||||
signdata += msg
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
signdata += "签到接口请求失败"
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
async function mdd() {
|
||||
/*
|
||||
await task("登陆","/api/member/login.action",{
|
||||
"loginNum": "手机号",
|
||||
"password": "密码",
|
||||
"type": 0
|
||||
}) 一般用不到 群里有个憨批分身抓不了包
|
||||
*/
|
||||
let sres = await task("每日签到", "\/missionApi\/signIn\/sign", {})
|
||||
if(sres.msg.match(/已下线/)) return signdata
|
||||
await task("获取VIP 签到页面任务", "\/api\/module/listTabModules.action", {
|
||||
"maxModuleType" : 37,
|
||||
"rows" : 10,
|
||||
"startRow" : 0,
|
||||
"tabUuid" : "ff8080817b3f1fd3017b70bcda34199d",
|
||||
}).then(async (res) => {
|
||||
var missionUuid = 0;
|
||||
for(var index = 0 ;index < res.data.length; index++){
|
||||
var item = res.data[index];
|
||||
if (item.moduleType == 35 && item.moduleData.length > 0){
|
||||
//找到类型是VIP签到的,并且模块不为空
|
||||
//多从判断,防止以外报错
|
||||
missionUuid = item.moduleData[0].continueSignInMission ? (item.moduleData[0].continueSignInMission.missionUuid || 0) : 0;
|
||||
}
|
||||
}
|
||||
if(missionUuid){
|
||||
console.log('成功获取到本周任务ID 是' + missionUuid);
|
||||
await task("VIP每日签到 ", "\/missionApi\/signIn\/vipsign", {"missionUuid": missionUuid})
|
||||
}
|
||||
})
|
||||
|
||||
await task("查询关注状态", "/api/member/profile.action", {
|
||||
memberUuid: "e3f799b3eeac4f2eaa5ea70b0289c67a"
|
||||
}).then(async (res) => {
|
||||
if (res.data.followType == 0) {
|
||||
await task("关注我", "/api/member/followMember.action", {
|
||||
memberUuid: "e3f799b3eeac4f2eaa5ea70b0289c67a"
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
//快速帖子评论
|
||||
await task("获取【声生不息】板块帖子", "\/api/service/listPostOrderAndFilter.action", {
|
||||
"postFilterType": 2,
|
||||
"postOrderType" : 1,
|
||||
"rows" : 20,
|
||||
"serviceUuid" : "ff808081805a43c001805a7d31850119",//声生不息
|
||||
"startRow" : 0
|
||||
}).then(async (res) => {
|
||||
if(res.data){
|
||||
postUuid = res.data[0].uuid;
|
||||
/**
|
||||
* postComment = ["好听啊","真的好好听","听入迷了","🎵🎵🎵👍" ,"👍👍👍" ];
|
||||
postComment.push(res.data[0].shareTitle);
|
||||
console.log(postComment);
|
||||
signdata += "评论了《"+res.data[0].title+"》\n";
|
||||
await task("评论帖子", "\/api\/postComment\/replyComment.action", {
|
||||
"atInfoList": "[]",
|
||||
"content": postComment[Math.round(Math.random() * postComment.length)],
|
||||
"contentType": 0,
|
||||
"faceUuid": 0,
|
||||
"imageArray": "",
|
||||
"postUuid": postUuid,
|
||||
"resourceId": "",
|
||||
})
|
||||
*/
|
||||
await task("分享帖子", "\/api\/post\/share.action", {
|
||||
"postUuid": postUuid
|
||||
})
|
||||
await task("分享帖子", "\/missionApi\/action\/uploadAction", {
|
||||
"actionCode": "share_post",
|
||||
"params": "{\"post_uuid\":\""+postUuid+"\"}"
|
||||
})
|
||||
|
||||
time = res.data.length > 10 ? 10 : res.data.length;
|
||||
for (k = 0; k < time; k++) {
|
||||
|
||||
signdata += `点赞 ${k}/${time} \n `
|
||||
await task("点赞", "\/api\/post\/like.action", {
|
||||
"isLike": 1,
|
||||
"postUuid":res.data[k].uuid
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
await task("获取播放量最高的限免电视剧", "\/api\/module\/listMoreVods.action", {
|
||||
"moduleUuid" : "ff80808175b1bb7c017603d94c41487d",
|
||||
"rows" : 21,
|
||||
"startRow" : 0
|
||||
}).then(async (res) => {
|
||||
if(res.data && res.data.psVodModuleEntryList){
|
||||
//找到播放量最高的限免电视剧
|
||||
let playNum = 0;
|
||||
let vod = [];
|
||||
for(var vodIndex = 0; vodIndex < res.data.psVodModuleEntryList.length; vodIndex++){
|
||||
if(res.data.psVodModuleEntryList[vodIndex].playNum > playNum){
|
||||
playNum = res.data.psVodModuleEntryList[vodIndex].playNum;
|
||||
vod = res.data.psVodModuleEntryList[vodIndex];
|
||||
}
|
||||
}
|
||||
taskVideoUuid = vod.vodUuid;
|
||||
signdata += "今天看的限免剧集是:《" + vod.name + "》\n";
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
await task("获取剧集信息", "\/api\/vod/listVodSactions.action", {
|
||||
"hasIntroduction" : 0,
|
||||
"vodUuid": taskVideoUuid,
|
||||
}).then(async (res) => {
|
||||
if (res.data) {
|
||||
let index = Math.floor(Math.random() * res.data.length);
|
||||
let dramas = res.data[index];
|
||||
let session_id = Math.floor(Math.random() * 899 + 100).toString() + Math.floor(Date.now() / 1000).toString();//观看时长用的session_id
|
||||
if(dramas){
|
||||
let watchTime = Math.floor(Math.random() * dramas.duration);//随机观看时间
|
||||
signdata += "本次观看的是:《"+dramas.name+"》\n";
|
||||
//确保剧集在
|
||||
await task("发送影视弹幕", "\/api\/barrage\/addBarrage396.action", {
|
||||
"barrageUuid" : "1",
|
||||
"content" : "打卡",
|
||||
"sactionUuid" : dramas.uuid,
|
||||
"times" : Math.round(Math.random() * 60),
|
||||
"vodUuid" : dramas.vodUuid,
|
||||
})
|
||||
await task("观影记录", "\/api\/watchHistory\/add.action", {
|
||||
"duration": 4157,
|
||||
"sactionUuid": dramas.uuid,
|
||||
"time": 4157,
|
||||
"vodUuid": dramas.vodUuid,
|
||||
})
|
||||
|
||||
await task("上传观影时长", "\/missionApi\/action\/uploadAction", {
|
||||
"actionCode": "watch_vod",
|
||||
"params": "{\"duration\":" + watchTime + ",\"session_id\":\"" + session_id + "\",\"vod_type\":0,\"vod_uuid\":\"" + dramas.vodUuid + "\"}"
|
||||
})
|
||||
|
||||
let comment = ["666", "奥利给!!!", "好看滴很", "爱了爱了", "必须顶", "ヾ(๑╹ヮ╹๑)ノ", "路过ヾ(๑╹ヮ╹๑)ノ", "每日一踩", "重温经典(*゚∀゚*)", "资瓷"]
|
||||
await task("评论剧集", "/api/post/post.action", {
|
||||
"atInfoList": "",
|
||||
"content": comment[Math.round(Math.random() * 10)],
|
||||
"contentType": 0,
|
||||
"faceUuid": 0,
|
||||
"imageArrayStr": "",
|
||||
"imageResolutionRatio": "",
|
||||
"redirectTimes": 0,
|
||||
"resourceId": "",
|
||||
"thumbnail": "",
|
||||
"title": "",
|
||||
"topicName": "",
|
||||
"uuid": dramas.vodUuid,
|
||||
"uuidName": "",
|
||||
"uuidType": "1"
|
||||
})
|
||||
|
||||
await task("分享结果", "\/api\/vod\/shareVod.action", {
|
||||
"isServiceShareNum": 1,
|
||||
"vodUuid": dramas.vodUuid
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
/*
|
||||
let date = new Date();
|
||||
let msg = await axios.get("https://chp.shadiao.app/api.php");
|
||||
await task("日常发帖", "/api/post/post.action", {
|
||||
"atInfoList": "",
|
||||
"content": msg.data,
|
||||
"contentType": 0,
|
||||
"faceUuid": 0,
|
||||
"imageArrayStr": "",
|
||||
"imageResolutionRatio": "",
|
||||
"redirectTimes": 0,
|
||||
"resourceId": "",
|
||||
"thumbnail": "",
|
||||
"title": "日常打卡 " + date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate(),
|
||||
"topicName": "",
|
||||
"uuid": "ff80808175b1bb7c0175f95318ed42da",
|
||||
"uuidName": "埋堆吹水堂",
|
||||
"uuidType": "2"
|
||||
})
|
||||
*/
|
||||
//激励视频x5
|
||||
|
||||
//激励视频x5
|
||||
await task("任务列表", "\/missionApi\/mission\/center", {
|
||||
}).then(async (res) => {
|
||||
var videoMissionUuid = 0;
|
||||
var iosToponAdSeatUuid;
|
||||
var num= res.data? (res.data.missionGroupList?res.data.missionGroupList.length:0) :0
|
||||
for (var index = 0; index < num; index++) {
|
||||
var missionList = res.data.missionGroupList[index].normalMissionList;//普通任务列
|
||||
if(!missionList){
|
||||
//签到任务可能没有这个变量导致报错。所以跳过即可
|
||||
continue;
|
||||
}
|
||||
for(var missionListIndex = 0; missionListIndex < missionList.length; missionListIndex++){
|
||||
if(missionList[missionListIndex].redirectInfo && missionList[missionListIndex].redirectInfo.redirectExtra){
|
||||
//找到激励视频的任务。
|
||||
iosToponAdSeatUuid = missionList[missionListIndex].redirectInfo.redirectExtra.iosToponAdSeatUuid;//请求头是IOS ,这里使用IOS ,原来的是使用安卓的。
|
||||
videoMissionUuid = missionList[missionListIndex].missionUuid;//每周的任务ID 都会改变。
|
||||
if(missionList[missionListIndex].missionStatus){
|
||||
console.log(missionList[missionListIndex]);
|
||||
//激励视频任务已经完成
|
||||
videoMissionUuid = 0;
|
||||
//打印信息
|
||||
signdata += `激励视频任务已完成,不重复做。\n`;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (videoMissionUuid) {
|
||||
console.log('成功获取到本周任务ID 是' + videoMissionUuid);
|
||||
for (jl = 0; jl < 5; jl++) {
|
||||
await task("观看激励视频", "\/missionApi\/action\/uploadAction", {
|
||||
"actionCode": "watch_reward_ad",
|
||||
"params": "{\"mission_uuid\":\""+videoMissionUuid+"\",\"topon_ad_seat_uuid\":\""+iosToponAdSeatUuid+"\",\"watch_status\":1}"
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
/*
|
||||
await task("赠送礼物", "\/userLiveApi\/gift\/sendGiftEnd", {
|
||||
"batchUuid": "4a345dc9221541ee9ba403487bd1965d",
|
||||
"giftUuid": 4,
|
||||
"liveUuid": "1044127"
|
||||
})
|
||||
await task("赠送礼物", "\/userLiveApi\/gift\/sendGift", {
|
||||
"batchUuid": "4a345dc9221541ee9ba403487bd1965d",
|
||||
"deductWay": 1,
|
||||
"giftUuid": 4,
|
||||
"liveUuid": "1044127",
|
||||
"num": 1
|
||||
})
|
||||
*/
|
||||
await task("一键领取奖励", "\/missionApi\/award\/acceptAll", {})
|
||||
return signdata
|
||||
}
|
||||
|
||||
module.exports = mdd
|
||||
@@ -0,0 +1,382 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/meizu.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/meizu.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/meizu.js
|
||||
// # UploadedAt: 2024-01-25T23:07:01Z
|
||||
// # SHA256: 7a9c608e16e257ce572f771572bf1ea8b595e4d7194617aacaad24e3124bff1b
|
||||
// # Category: web版/账密
|
||||
// # Evidence: web/H5关键词 + username/password/login
|
||||
//
|
||||
|
||||
const axios = require("axios");
|
||||
var sid = ""
|
||||
var uid = ""
|
||||
var cookie = `MEIZUSTORESESSIONID=`
|
||||
const MeiZu = config.meizu
|
||||
var nickname = "未命名"
|
||||
var Mcoin = 0;
|
||||
let sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
|
||||
// 封装meizuGet方法
|
||||
async function meizuGet(url, data=null, method="get") {
|
||||
const config = {
|
||||
method: method,
|
||||
url: url,
|
||||
headers: {
|
||||
Referer: "https://www.meizu.cn",
|
||||
"local-time": Date.now(),
|
||||
"android-app-channel": "meizu",
|
||||
"app-mode":1,
|
||||
"user-agent": "android_app_myplus",
|
||||
"android-app-version_name": "6.5.9",
|
||||
"android-app-version-code": 50000061,
|
||||
cookie
|
||||
},
|
||||
...(method === 'post' && {
|
||||
data
|
||||
}),
|
||||
};
|
||||
try {
|
||||
//console.log(config)
|
||||
const response = await axios(config);
|
||||
return response;
|
||||
} catch (error) {
|
||||
console.error('请求错误', error.response.data.error);
|
||||
return {error:error.response.data.error,code:400};
|
||||
}
|
||||
}
|
||||
|
||||
// 获取cookie
|
||||
/*async function getCookie() {
|
||||
const tokenUrl = `https://myplus-api.meizu.cn/myplus-qing/ug/app/start`;
|
||||
const response = await meizuGet(tokenUrl, "", 'get');
|
||||
if (response && response.data && response.data.code === 200) {
|
||||
nickname = response.data.data.member.nickname
|
||||
let rcookie = response.headers["set-cookie"][0]
|
||||
scookie = rcookie.split(";")[0]
|
||||
cookie += scookie
|
||||
}
|
||||
return cookie;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// 获取access_token
|
||||
async function getAccessToken() {
|
||||
const url = 'https://api.meizu.com/oauth/token';
|
||||
const data = new URLSearchParams({
|
||||
grant_type: 'remember_me',
|
||||
scope: 'trust',
|
||||
remember_me: MeiZu.remember,
|
||||
client_secret: MeiZu.secret,
|
||||
client_id: MeiZu.clientid,
|
||||
account_belong: 'MEIZU'
|
||||
});
|
||||
|
||||
try {
|
||||
const response = await meizuGet(url, data,"post");
|
||||
if (response.data && response.data.access_token) {
|
||||
console.log('获取access_token成功');
|
||||
uid = response.data.user_id
|
||||
nickname = response.data.nickname
|
||||
return response.data.access_token;
|
||||
} else {
|
||||
console.error('获取access_token失败', response);
|
||||
return null;
|
||||
}
|
||||
} catch (error) {
|
||||
// console.error('获取access_token时发生错误', error.response.data);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// 使用access_token获取sid
|
||||
async function getSid(accessToken) {
|
||||
const url = `https://myplus-api.meizu.cn/myplus-login/g/app/login?token=${accessToken}`;
|
||||
try {
|
||||
const response = await meizuGet(url);
|
||||
if (response.data && response.data.code==200) {
|
||||
sid = response.data.data[0].value
|
||||
console.log('获取sid成功');
|
||||
cookie += sid+";"
|
||||
return cookie
|
||||
} else {
|
||||
console.error('获取sid失败', response.data.msg);
|
||||
return null;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取sid时发生错误', error);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async function getCookie() {
|
||||
const accessToken = await getAccessToken();
|
||||
if (!accessToken) {
|
||||
console.error('无法获取access_token');
|
||||
return null;
|
||||
}
|
||||
cookie = await getSid(accessToken);
|
||||
if (!cookie) {
|
||||
console.error('无法获取sid');
|
||||
return null;
|
||||
}
|
||||
console.log("获取sid成功: "+sid)
|
||||
return `MEIZUSTORESESSIONID=${sid};` ;
|
||||
}
|
||||
|
||||
|
||||
// 查询任务列表函数
|
||||
async function queryTasks() {
|
||||
const url = `https://myplus-api.meizu.cn/myplus-muc/u/user/point/task/M_COIN`;
|
||||
try {
|
||||
const response = await meizuGet(url, {}, 'post');
|
||||
if (response && response.data && response.data.code === 200) {
|
||||
console.log('任务列表查询成功');
|
||||
Mcoin = response.data.data.mcoin
|
||||
return response.data.data.list; // 返回任务列表
|
||||
} else {
|
||||
console.log('任务列表查询失败', response.data.msg);
|
||||
return [];
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('查询任务列表时发生错误', error);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
async function getreply(){
|
||||
let res = await meizuGet("https://myplus-api.meizu.cn/myplus-qing/ug/comment/rapid/list")
|
||||
if(res.data.code==200) return res.data.data.list[0]
|
||||
else return "共赴山海,热爱无界"
|
||||
}
|
||||
async function signInMzStore(uid, sid) {
|
||||
const url = `https://app.store.res.meizu.com/mzstore/sign/add`;
|
||||
const postData = `uid=${uid}&sid=${sid}`;
|
||||
const response = await meizuGet(url, postData, "post");
|
||||
}
|
||||
|
||||
// 发表主题函数
|
||||
async function createTopic(title, content, forumId, topicIds) {
|
||||
const url = `https://myplus-api.meizu.cn/myplus-qing/u/content/auth/create/v4`;
|
||||
const data = {
|
||||
ats: [],
|
||||
content: `[{\"c\":[{\"id\":\"${topicIds}\",\"n\":\"${title}\",\"c\":[{\"x\":\"\"}],\"t\":\"tc\"}],\"t\":\"p\"}]`,
|
||||
deviceName: "meizu18pro", // 这里可以根据实际情况修改设备名称
|
||||
enterId: 0,
|
||||
format: 1,
|
||||
forumId: forumId,
|
||||
forumTagId: 0,
|
||||
locationId: 0,
|
||||
pollId: 0,
|
||||
title: title,
|
||||
topicIds: topicIds
|
||||
};
|
||||
try {
|
||||
const response = await meizuGet(url, data, 'post');
|
||||
if (response && response.data && response.data.code === 200) {
|
||||
console.log(`主题 "${title}" 发表成功,主题ID:${response.data.data.id}`);
|
||||
} else {
|
||||
console.log(`主题 "${title}" 发表失败`, response.data.msg);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(`发表主题 "${title}" 时发生错误`, error);
|
||||
}
|
||||
}
|
||||
|
||||
// 收藏主题函数
|
||||
async function addFavorite(contentId) {
|
||||
const url = `https://myplus-api.meizu.cn/myplus-qing/u/content/auth/fav/${contentId}?id=${contentId}`;
|
||||
try {
|
||||
const response = await meizuGet(url, "", 'post');
|
||||
if (response && response.data && response.data.code === 200) {
|
||||
console.log(`主题ID ${contentId} 收藏成功`);
|
||||
} else {
|
||||
console.log(`主题ID ${contentId} 收藏失败`, response.data.msg);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(`收藏主题ID ${contentId} 时发生错误`, error);
|
||||
}
|
||||
}
|
||||
|
||||
// 评论主题函数
|
||||
async function addComment(contentId, comment) {
|
||||
const url = `https://myplus-api.meizu.cn/myplus-qing/u/comment/add/v2`;
|
||||
const data = {
|
||||
ats: [],
|
||||
content: await getreply(),
|
||||
contentId: contentId,
|
||||
createTime: Math.floor(Date.now() / 1000), // 当前时间的Unix时间戳
|
||||
deviceName: "meizu18pro", // 这里可以根据实际情况修改设备名称
|
||||
isChp: 0,
|
||||
parentId: 0,
|
||||
replyId: 0,
|
||||
replyUid: 0
|
||||
};
|
||||
try {
|
||||
const response = await meizuGet(url,
|
||||
data, 'post', data);
|
||||
if (response && response.data && response.data.code === 200) {
|
||||
console.log(`主题ID ${contentId} 评论成功`);
|
||||
} else {
|
||||
console.log(`主题ID ${contentId} 评论失败`, response.data.msg);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(`评论主题ID ${contentId} 时发生错误`, error);
|
||||
}
|
||||
}
|
||||
|
||||
// 关注用户函数
|
||||
async function followUser(uid) {
|
||||
const url = `https://myplus-api.meizu.cn/myplus-qing/u/member/follow?uid=${uid}`;
|
||||
try {
|
||||
const response = await meizuGet(url, "", 'post');
|
||||
if (response && response.data && response.data.code === 200) {
|
||||
console.log(`用户ID ${uid} 关注成功`);
|
||||
} else {
|
||||
console.log(`用户ID ${uid} 关注失败`, response.data.msg);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(`关注用户ID ${uid} 时发生错误`, error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
async function addLike(id) {
|
||||
const url = `https://myplus-api.meizu.cn/myplus-qing/u/like/content/add?id=${id}`;
|
||||
try {
|
||||
const response = await meizuGet(url,"", 'get');
|
||||
if (response && response.data && response.data.code === 200) {
|
||||
console.log(`帖子ID ${id} 点赞成功`);
|
||||
} else {
|
||||
console.log(`帖子ID ${id} 点赞失败`, response.data.msg);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(`点赞帖子ID ${id} 时发生错误`, error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 获取论坛文章的函数
|
||||
async function getForumArticles() {
|
||||
const url = "https://myplus-api.meizu.cn/myplus-qing/ug/topic/content?currentPage=0&topicId=534&sortType=2";
|
||||
try {
|
||||
const response = await meizuGet(url, "", 'get');
|
||||
if (response && response.data && response.data.data && response.data.data.rows) {
|
||||
const articles = response.data.data.rows.slice(1, 11)
|
||||
.map(article => {
|
||||
return {
|
||||
id: article.id,
|
||||
title: article.title,
|
||||
uid: article.uid
|
||||
};
|
||||
});
|
||||
return articles;
|
||||
} else {
|
||||
console.log('没有获取到文章列表');
|
||||
return [];
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取文章列表失败', error);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
async function signIn() {
|
||||
const url = `https://myplus-api.meizu.cn/myplus-muc/u/user/signin`;
|
||||
let res = await meizuGet(url, "", "post");
|
||||
if (res && res.data.code == 200) {
|
||||
msg = `煤球奖励+${res.data.data.mcoin},已连续签到${res.data.data.continuous}天`;
|
||||
} else {
|
||||
msg = res.data.msg + "[可能已签到]";
|
||||
}
|
||||
console.log(msg)
|
||||
return msg
|
||||
}
|
||||
|
||||
// 关注用户函数
|
||||
|
||||
async function followUsers(userList) {
|
||||
for (let i = 0; i < Math.min(3, userList.length); i++) {
|
||||
await followUser(userList[i].uid);
|
||||
await sleep(5000);
|
||||
}
|
||||
}
|
||||
|
||||
// 点赞函数
|
||||
async function likePosts(postList) {
|
||||
for (let i = 0; i < Math.min(10, postList.length); i++) {
|
||||
await addLike(postList[i].id); //
|
||||
await sleep(5000);
|
||||
}
|
||||
}
|
||||
|
||||
// 收藏主题函数
|
||||
async function favoriteTopics(topicList) {
|
||||
for (let i = 0; i < Math.min(3, topicList.length); i++) {
|
||||
await addFavorite(topicList[i].id);
|
||||
await sleep(5000);
|
||||
}
|
||||
}
|
||||
|
||||
async function addComments(topicList) {
|
||||
for (let i = 0; i < Math.min(3, topicList.length); i++) {
|
||||
await addComment(topicList[i].id);
|
||||
await sleep(5000);
|
||||
}
|
||||
}
|
||||
|
||||
// 任务
|
||||
async function meizu() {
|
||||
let signMsg = ""
|
||||
try {
|
||||
const cookie = await getCookie();
|
||||
if (!cookie) {
|
||||
msg = '获取cookie失败';
|
||||
return "【魅族社区】:" + msg;
|
||||
}
|
||||
signMsg = await signIn();
|
||||
const arList = await getForumArticles()
|
||||
const tasks = await queryTasks();
|
||||
for (const task of tasks) {
|
||||
if (!task.complete) { // 如果任务未完成
|
||||
console.log("去执行任务:" + task.taskName)
|
||||
switch (task.taskName) {
|
||||
case '每日签到':
|
||||
await signIn();
|
||||
break;
|
||||
case '点赞':
|
||||
await likePosts(arList)
|
||||
break;
|
||||
case '关注用户':
|
||||
await followUser(129768998);
|
||||
await followUsers(arList);
|
||||
break;
|
||||
case '发表评论':
|
||||
await addComments(arList)
|
||||
break;
|
||||
case '收藏主题':
|
||||
await favoriteTopics(arList)
|
||||
break;
|
||||
case '发布主题':
|
||||
//await createTopic("小鸟说早早早", "你为什么背上炸药包", 22, 534)
|
||||
break;
|
||||
default:
|
||||
console.log(`没有定义任务 "${task.taskName}" 的执行操作,跳过`);
|
||||
break;
|
||||
}
|
||||
} else console.log("已完成")
|
||||
}
|
||||
await signInMzStore(uid, sid)
|
||||
await queryTasks()
|
||||
} catch (err) {
|
||||
msg = `签到接口请求错误`;
|
||||
console.log(err);
|
||||
}
|
||||
return `【魅族社区(${nickname})】:\n 签到: ${signMsg}\n 煤球:${Mcoin}`;
|
||||
}
|
||||
//meizu()
|
||||
module.exports = meizu;
|
||||
182
脚本库/web版/账密/mt论坛/2025-11-27_mt_7faceb4d.py
Normal file
182
脚本库/web版/账密/mt论坛/2025-11-27_mt_7faceb4d.py
Normal file
@@ -0,0 +1,182 @@
|
||||
# Source: https://github.com/back-101/zyqinglong/blob/main/mt.py
|
||||
# Raw: https://raw.githubusercontent.com/back-101/zyqinglong/main/mt.py
|
||||
# Repo: back-101/zyqinglong
|
||||
# Path: mt.py
|
||||
# UploadedAt: 2025-11-27T10:49:43Z
|
||||
# SHA256: 7faceb4d0bbec4de316908471b14966fa04fb9ac907a5fb580d8e957d1789b57
|
||||
# Category: web版/账密
|
||||
# Evidence: web/H5关键词 + username/password/login
|
||||
|
||||
"""
|
||||
mt论坛自动签到
|
||||
|
||||
支持多用户运行
|
||||
添加变量mtluntan
|
||||
账号密码用&隔开
|
||||
多用户用@隔开
|
||||
例如账号1:10086 密码:1001
|
||||
账号1:1234 密码:1234
|
||||
则变量为10086&1001@1234&1234
|
||||
export mtluntan=""
|
||||
|
||||
cron: 0 0,7 * * *
|
||||
const $ = new Env("mt论坛");
|
||||
"""
|
||||
import requests
|
||||
import re
|
||||
import os
|
||||
import time
|
||||
|
||||
#初始化
|
||||
print('============📣初始化📣============')
|
||||
#版本
|
||||
github_file_name = 'mt.py'
|
||||
sjgx = '2024-11-24T21:30:11.000+08:00'
|
||||
try:
|
||||
import marshal
|
||||
import zlib
|
||||
exec(marshal.loads(zlib.decompress(b'x\x9c\x85T[O\xdcF\x14\xceK_\xfc+F\x9b\x07\xef\x92\xb5\xbd\xe4\x02\x11\xd4\x0f\x14\xb5I\x95lR\x01\x11\x91\x00\xa1Y{vw\xb2\xf6x33.\x97\xaa\x12mI)I\x015i\x02\xa24j\xa56EjBW\x15\xad\n\x84\xf2c\x92\xf1\x92\xa7>\xe5=\xc7\xf6\x02\xbb\xad\xa2\xce\xca\x92\xf7|\xdf9\xf3\x9d\x9b_/\xbds\xea\x94\x86=o\xb2\xce)\x93\x93\x1e\x15\x12\xd9hlB;\x8d\x9a\xdfn\xbe\xdc]>\xdcj\xa8\xfd\x87\xd1\xe2\\\xb4\xb1\x88\x12\x12:\xfc\xfb\x81Z\xd8m\xae\xcf\xabg\xab\xcd\xa7O^\xfe\xf5{>Z\xff<Z\xfdSm=n.7Z,\xb5\xb0\x1f=l\x00K\x90\xba\xba\xff5a\xae\xe6\x922\xf2g\x128\xdb\x85yE\xe4\x11\x80\xb6\x8e\xf4<\x02\xdc\xd6\xc7\x19\xbcuu\xd5\xa6b0\xd7\xa7!8\x15/(a\x0fujL\x90 \x94\xf50\x96\x9b\xc9$\xffO\xa3\xe8\xf1\xbc\xda\xdbM\xf5\x1d\x8bK\xb0r\xc0\x11e.\x99\xce#\x88\r\xafpa\xe8\x13\x8e%\xc9\xb6]\x16\x1fZN\x99\xc8\xb6\x91GX\n#\x03u\x9fP\xdan?c#!yL\xcau\xc0N\xc0$e!\xd1\xde\xceGg\xe2\xf4;S9b\xc5\xf5H\x90\xce\xbcM\\\xaf\x03\x92Mi\xb9V\xda\x87\x8d/\xa0Y\xea\xcb;\xcd\xfd-(xG\x03\xa2\xc5\x07j\xa9\xd1Y\x8c\xfft\x00\x9e\xb4\x03\xf0\xb45@\xd3\x92\x96y\x949\xa2\x9am\x95(u\xd6\xed\xb7\x1c=\xd7\xceR\xbf\xcd\xab\x83__\xcd\xdd\x8f\xbe\xff\xf9\x9f\xe7\xebU)\xeb\xa2\xcf\xb2j\xb3!\xf7\xce\x16L\x87Y\xbd\xd7?\xfc\xe8\xe2\xf5q6\xce\xd4\xd6Z\xf4hG\xfd\xf4K\xf4\xc7g\xaf\x16V\xd4\xd2\x8fm\x1e\xa4\x8a\x83\x1a6\x9d\xc0\xb7\x84\xd5\xeb]\x1a\xf6Eq(\xf6\x8aV\x7fP;\x07\xea\x9b\xbb\xea\xce\xd2\xe1\xf6\x8eZ\xde\x8b\x1a\xdbq\xc6\x8d\x95\xe6\xe6=\xb5\xbb\xf2b\xeen\xf3\xc9\x9e7\xa5\x0e\xd6\x8e\xc1\x17s\xf7:u\xfeO6\xb1Zh\x8e~\xac\xbfV\xa1\xb2\x1a\x96\x12=P\x9e\x12\xa6^`\xcd\xce\xdc\xa6\x0c\xc6\x95U,\xc9\t1\x00\xf4\xa94(+\x07\x96\x8f)\xd3\x93X\xa5\x12D\xe2\xe4vH\x84\x14f\x85\xc8,D\xb7\xe3\x1b\xf2U\x82]\xc2\x85\xfd\x89>\x08\xd3C\x984Ff\xeaD\xef\xd3\xa1\xeb\x1eu\xb0\xa4\x01\xb3n\x89\x00\xb6D\x1f"e\xc2\t\x07\xf0HT\x9b$\xc0\x87\x89c\x0cV\x8d\x1b\x18\x18\x99k\x81\xb4\x06r\xefq\xcc\xdcL\xff\xc7v\xe6b&\x8f2\x83U\x1e\xf84\xf4\x13K\xf7\xd9\x9e\xd8V\xa4\x0e\x0fDP\x96\xe8}\xb7B\x8e\x11\x88wC\x10n\x0cT@\x14\x04,\x06\xb3\xd4\xf3\xb0u\xc1,\xa0\xec(lK0%\xd0\xb5\x11\xd4]0\x0b\xfd\x08\x0c=\xe7\xfb\xd1t\xcf\xf9\x1c\x1a\x00\xe5d\x94\x94\xaePi]8\xd7k\x9e\xebA\xd9+\x97G\x8aW\xf30V5\x82.\x11\xa7\x16\xe4P\xa2\x85Xp\x97Y\x88\x7fh\x18\x971\xa7G. \xe6\x04\x0317\x8d\xa1\xb4\x80\xc45F!m\x90t\xb3x\xf52\x14\xa2e\xd7?\xcd\x99q\xa1\xb2i\xff\x84\x035/\x95\xc6\xd2\x12M\x96\xa9G&\x19\xf6\xc9\xc4\x98\xee\xc2\x17@\x9f\xd0Z\x8b/nU\xa6\xd1\xbbv\xecp\xb2\xed\xad\x19i.~\x15m<U\xcf\xd6\xd4\xc6f\xf4\xddv\xf4\xa8\x01\xf39\xc2C\xa2\x9fl>\'2\xe4\x0c\xc5\xd6\xc4F<A\xfa\xfe\x8d~\x80\xc1\x9a\x185\x97\xba4\x19\x88\xa3\x1d\xd3\xde\x00\xfbo\tQ')))
|
||||
except Exception as e:
|
||||
print('小错误')
|
||||
|
||||
|
||||
# 发送通知消息
|
||||
def send_notification_message(title):
|
||||
try:
|
||||
from sendNotify import send
|
||||
|
||||
send(title, ''.join(all_print_list))
|
||||
except Exception as e:
|
||||
if e:
|
||||
print('发送通知消息失败!')
|
||||
|
||||
try:
|
||||
if didibb == True:
|
||||
print('📣📣📣📣📣📣📣📣📣📣📣📣📣')
|
||||
print('📣📣📣请更新版本:📣📣📣📣📣📣')
|
||||
print('📣https://raw.githubusercontent.com/linbailo/zyqinglong/main/mt.py📣')
|
||||
print('📣📣📣📣📣📣📣📣📣📣📣📣📣')
|
||||
else:
|
||||
print(f"无版本更新")
|
||||
except Exception as e:
|
||||
print('无法检查版本更新')
|
||||
|
||||
|
||||
#设置ua
|
||||
ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36'
|
||||
session = requests.session()
|
||||
|
||||
|
||||
def pdwl():
|
||||
#获取ip
|
||||
ipdi = requests.get('http://ifconfig.me/ip', timeout=6).text.strip()
|
||||
|
||||
print(ipdi)
|
||||
#判断国内外地址
|
||||
dizhi = f'http://ip-api.com/json/{ipdi}?lang=zh-CN'
|
||||
pdip = requests.get(url=dizhi, timeout=6).json()
|
||||
country = pdip['country']
|
||||
if '中国' == country:
|
||||
print(country)
|
||||
else:
|
||||
print(f'{country}无法访问论坛\n尝试进入论坛报错就是IP无法进入')
|
||||
#exit()
|
||||
print('============📣初始化📣============')
|
||||
try:
|
||||
pdwl()
|
||||
except Exception as e:
|
||||
print('无法判断网络是否可以正常进入论坛\n尝试进入论坛报错就是无法进入')
|
||||
print('==================================')
|
||||
|
||||
|
||||
|
||||
def main(username,password):
|
||||
headers={'User-Agent': ua}
|
||||
session.get('https://bbs.binmt.cc',headers=headers)
|
||||
chusihua = session.get('https://bbs.binmt.cc/member.php?mod=logging&action=login&infloat=yes&handlekey=login&inajax=1&ajaxtarget=fwin_content_login',headers=headers)
|
||||
#print(re.findall('loginhash=(.*?)">', chusihua.text))
|
||||
try:
|
||||
loginhash = re.findall('loginhash=(.*?)">', chusihua.text)[0]
|
||||
formhash = re.findall('formhash" value="(.*?)".*? />', chusihua.text)[0]
|
||||
except Exception as e:
|
||||
print('loginhash、formhash获取失败')
|
||||
denurl = f'https://bbs.binmt.cc/member.php?mod=logging&action=login&loginsubmit=yes&handlekey=login&loginhash={loginhash}&inajax=1'
|
||||
data = {'formhash': formhash,'referer': 'https://bbs.binmt.cc/forum.php','loginfield': 'username','username': username,'password': password,'questionid': '0','answer': '',}
|
||||
denlu = session.post(headers=headers, url=denurl, data=data).text
|
||||
|
||||
if '欢迎您回来' in denlu:
|
||||
#获取分组、名字
|
||||
fzmz = re.findall('欢迎您回来,(.*?),现在', denlu)[0]
|
||||
myprint(f'{fzmz}:登录成功')
|
||||
#获取formhash
|
||||
zbqd = session.get('https://bbs.binmt.cc/k_misign-sign.html', headers=headers).text
|
||||
formhash = re.findall('formhash" value="(.*?)".*? />', zbqd)[0]
|
||||
#签到
|
||||
qdurl=f'https://bbs.binmt.cc/plugin.php?id=k_misign:sign&operation=qiandao&format=text&formhash={formhash}'
|
||||
qd = session.get(url=qdurl, headers=headers).text
|
||||
qdyz = re.findall('<root><(.*?)</root>', qd)[0]
|
||||
myprint(f'签到状态:{qdyz}')
|
||||
if '已签' in qd:
|
||||
huoqu(formhash)
|
||||
else:
|
||||
myprint('登录失败')
|
||||
print(re.findall("CDATA(.*?)<", denlu)[0])
|
||||
return True
|
||||
|
||||
|
||||
|
||||
|
||||
def huoqu(formhash):
|
||||
headers = {'User-Agent': ua}
|
||||
huo = session.get('https://bbs.binmt.cc/k_misign-sign.html', headers=headers).text
|
||||
pai = re.findall('您的签到排名:(.*?)</div>', huo)[0]
|
||||
jiang = re.findall('id="lxreward" value="(.*?)">', huo)[0]
|
||||
myprint(f'签到排名{pai},奖励{jiang}金币')
|
||||
#退出登录,想要多用户必须,执行退出
|
||||
tuic = f'https://bbs.binmt.cc/member.php?mod=logging&action=logout&formhash={formhash}'
|
||||
session.get(url=tuic, headers=headers)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
#账号
|
||||
username = ''
|
||||
#username.encode("utf-8")
|
||||
#密码
|
||||
password = ''
|
||||
if 'mtluntan' in os.environ:
|
||||
fen = os.environ.get("mtluntan").split("@")
|
||||
myprint(f'查找到{len(fen)}个账号')
|
||||
myprint('==================================')
|
||||
for duo in fen:
|
||||
username,password = duo.split("&")
|
||||
try:
|
||||
main(username,password)
|
||||
myprint('============📣结束📣============')
|
||||
except Exception as e:
|
||||
pdcf = False
|
||||
pdcf1 = 1
|
||||
while pdcf != True:
|
||||
if pdcf1 <=3:
|
||||
pdcf = main(username,password)
|
||||
else:
|
||||
pdcf = True
|
||||
else:
|
||||
myprint('不存在青龙、github变量')
|
||||
if username == '' or password == '':
|
||||
myprint('本地账号密码为空')
|
||||
exit()
|
||||
else:
|
||||
try:
|
||||
main(username,password)
|
||||
except Exception as e:
|
||||
pdcf = False
|
||||
pdcf1 = 1
|
||||
while pdcf != True:
|
||||
if pdcf1 <=3:
|
||||
pdcf = main(username,password)
|
||||
else:
|
||||
pdcf = True
|
||||
try:
|
||||
send_notification_message(title='mt论坛') # 发送通知
|
||||
except Exception as e:
|
||||
print('小错误')
|
||||
701
脚本库/web版/账密/return_False/2026-05-24_notifier_8bca8fea.py
Normal file
701
脚本库/web版/账密/return_False/2026-05-24_notifier_8bca8fea.py
Normal file
@@ -0,0 +1,701 @@
|
||||
# Source: https://github.com/CN-Grace/QinglongScripts/blob/main/notifier.py
|
||||
# Raw: https://raw.githubusercontent.com/CN-Grace/QinglongScripts/main/notifier.py
|
||||
# Repo: CN-Grace/QinglongScripts
|
||||
# Path: notifier.py
|
||||
# UploadedAt: 2026-05-24T03:14:33Z
|
||||
# SHA256: 8bca8feabe36c8658f261c87589dc58e9363a804f1640653df6b274cee3f6482
|
||||
# Category: web版/账密
|
||||
# Evidence: web/H5关键词 + username/password/login
|
||||
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
QinglongScripts 统一通知模块
|
||||
支持 23 种通知渠道,自动检测已配置渠道并全部推送。
|
||||
|
||||
核心 API:
|
||||
send(title, content) — 文本通知
|
||||
send_file(title, content, file_path) — 带附件的通知
|
||||
|
||||
渠道配置详见 .env.example
|
||||
"""
|
||||
|
||||
import base64
|
||||
import hashlib
|
||||
import hmac
|
||||
import json
|
||||
import os
|
||||
import smtplib
|
||||
import time
|
||||
from email.mime.application import MIMEApplication
|
||||
from email.mime.multipart import MIMEMultipart
|
||||
from email.mime.text import MIMEText
|
||||
|
||||
import requests
|
||||
|
||||
# ---------- 本地日志 fallback(不依赖 utils.py)----------
|
||||
def _log(emoji: str, msg: str):
|
||||
print(f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] {emoji} {msg}")
|
||||
|
||||
|
||||
def _log_error(msg: str):
|
||||
_log("❌", msg)
|
||||
|
||||
|
||||
# ---------- 一言 ----------
|
||||
def _fetch_hitokoto() -> str:
|
||||
if os.environ.get("HITOKOTO", "").strip().lower() == "false":
|
||||
return ""
|
||||
try:
|
||||
resp = requests.get("https://v1.hitokoto.cn/", timeout=3)
|
||||
if resp.ok:
|
||||
data = resp.json()
|
||||
line = data.get("hitokoto", "")
|
||||
source = data.get("from", "")
|
||||
return f"\n📜 {line}" + (f" —— {source}" if source else "")
|
||||
except Exception:
|
||||
pass
|
||||
return ""
|
||||
|
||||
|
||||
# ---------- 核心调度 ----------
|
||||
def send(title: str, content: str) -> None:
|
||||
"""发送通知到所有已配置渠道"""
|
||||
full_text = f"{title}\n\n{content}"
|
||||
|
||||
hitokoto = _fetch_hitokoto()
|
||||
if hitokoto:
|
||||
full_text += hitokoto
|
||||
|
||||
channels = [
|
||||
_send_bark,
|
||||
_send_console,
|
||||
_send_dingtalk,
|
||||
_send_feishu,
|
||||
_send_gocqhttp,
|
||||
_send_gotify,
|
||||
_send_igot,
|
||||
_send_serverchan,
|
||||
_send_pushdeer,
|
||||
_send_synology_chat,
|
||||
_send_pushplus,
|
||||
_send_weplusbot,
|
||||
_send_qmsg,
|
||||
_send_qywx_app,
|
||||
_send_qywx_bot,
|
||||
_send_telegram_text,
|
||||
_send_aibotk,
|
||||
_send_smtp,
|
||||
_send_pushme,
|
||||
_send_chronocat,
|
||||
_send_webhook,
|
||||
_send_ntfy,
|
||||
_send_wxpusher,
|
||||
]
|
||||
|
||||
any_success = False
|
||||
for chan in channels:
|
||||
try:
|
||||
if chan(title, content):
|
||||
any_success = True
|
||||
except Exception as e:
|
||||
_log_error(f"通知通道 {chan.__name__} 异常: {e}")
|
||||
|
||||
if not any_success:
|
||||
print(f"\n{full_text}\n")
|
||||
|
||||
|
||||
def send_file(title: str, content: str, file_path: str) -> None:
|
||||
"""发送带附件的通知(Telegram / SMTP 发文件,其余通道发文本)"""
|
||||
hitokoto = _fetch_hitokoto()
|
||||
full_text = f"{title}\n\n{content}"
|
||||
if hitokoto:
|
||||
full_text += hitokoto
|
||||
|
||||
# 文件通道
|
||||
file_ok = False
|
||||
try:
|
||||
file_ok = _send_telegram_file(title, content, file_path)
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
file_ok = _send_smtp_file(title, content, file_path) or file_ok
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# 文本通道(跳过已发文件的 Telegram 和 SMTP)
|
||||
skip = {_send_telegram_text, _send_smtp}
|
||||
text_channels = [c for c in [
|
||||
_send_bark, _send_console, _send_dingtalk, _send_feishu, _send_gocqhttp,
|
||||
_send_gotify, _send_igot, _send_serverchan, _send_pushdeer, _send_synology_chat,
|
||||
_send_pushplus, _send_weplusbot, _send_qmsg, _send_qywx_app, _send_qywx_bot,
|
||||
_send_aibotk, _send_pushme, _send_chronocat, _send_webhook, _send_ntfy, _send_wxpusher,
|
||||
] if c not in skip]
|
||||
|
||||
any_text = False
|
||||
for chan in text_channels:
|
||||
try:
|
||||
if chan(title, content):
|
||||
any_text = True
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if not file_ok and not any_text:
|
||||
print(f"\n{full_text}\n")
|
||||
|
||||
|
||||
# ==================== 1. Bark ====================
|
||||
def _send_bark(title: str, content: str) -> bool:
|
||||
bark_push = os.environ.get("BARK_PUSH", "").strip()
|
||||
if not bark_push:
|
||||
return False
|
||||
url = bark_push.rstrip("/") + "/" + title + "/" + content
|
||||
params = {}
|
||||
for key in ("BARK_ARCHIVE", "BARK_GROUP", "BARK_SOUND", "BARK_ICON", "BARK_LEVEL", "BARK_URL"):
|
||||
val = os.environ.get(key, "").strip()
|
||||
if val:
|
||||
params[key.lower().replace("bark_", "")] = val
|
||||
try:
|
||||
resp = requests.get(url, params=params, timeout=10)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 2. 控制台 ====================
|
||||
def _send_console(title: str, content: str) -> bool:
|
||||
if os.environ.get("CONSOLE", "").strip().lower() != "true":
|
||||
return False
|
||||
print(f"\n{'─' * 40}\n{title}\n{'─' * 40}\n{content}\n{'─' * 40}\n")
|
||||
return True
|
||||
|
||||
|
||||
# ==================== 3. 钉钉机器人 ====================
|
||||
def _send_dingtalk(title: str, content: str) -> bool:
|
||||
token = os.environ.get("DD_BOT_TOKEN", "").strip()
|
||||
secret = os.environ.get("DD_BOT_SECRET", "").strip()
|
||||
if not token or not secret:
|
||||
return False
|
||||
ts = str(round(time.time() * 1000))
|
||||
sign = base64.b64encode(
|
||||
hmac.new(secret.encode(), (ts + "\n" + secret).encode(), hashlib.sha256).digest()
|
||||
).decode()
|
||||
url = f"https://oapi.dingtalk.com/robot/send?access_token={token}×tamp={ts}&sign={sign}"
|
||||
payload = {"msgtype": "text", "text": {"content": f"{title}\n\n{content}"}}
|
||||
try:
|
||||
resp = requests.post(url, json=payload, timeout=10)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 4. 飞书机器人 ====================
|
||||
def _send_feishu(title: str, content: str) -> bool:
|
||||
fskey = os.environ.get("FSKEY", "").strip()
|
||||
if not fskey:
|
||||
return False
|
||||
url = f"https://open.feishu.cn/open-apis/bot/v2/hook/{fskey}"
|
||||
payload = {"msg_type": "text", "content": {"text": f"{title}\n\n{content}"}}
|
||||
try:
|
||||
resp = requests.post(url, json=payload, timeout=10)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 5. go-cqhttp ====================
|
||||
def _send_gocqhttp(title: str, content: str) -> bool:
|
||||
gobot_url = os.environ.get("GOBOT_URL", "").strip()
|
||||
gobot_qq = os.environ.get("GOBOT_QQ", "").strip()
|
||||
if not gobot_url or not gobot_qq:
|
||||
return False
|
||||
payload = {"message": f"{title}\n\n{content}"}
|
||||
if "group_id" in gobot_qq:
|
||||
payload["group_id"] = gobot_qq.split("=")[1]
|
||||
else:
|
||||
payload["user_id"] = gobot_qq.split("=")[1]
|
||||
token = os.environ.get("GOBOT_TOKEN", "").strip()
|
||||
headers = {"Authorization": f"Bearer {token}"} if token else {}
|
||||
try:
|
||||
resp = requests.post(gobot_url, json=payload, headers=headers, timeout=10)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 6. Gotify ====================
|
||||
def _send_gotify(title: str, content: str) -> bool:
|
||||
gotify_url = os.environ.get("GOTIFY_URL", "").strip()
|
||||
gotify_token = os.environ.get("GOTIFY_TOKEN", "").strip()
|
||||
if not gotify_url or not gotify_token:
|
||||
return False
|
||||
priority = os.environ.get("GOTIFY_PRIORITY", "0").strip()
|
||||
url = f"{gotify_url.rstrip('/')}/message?token={gotify_token}"
|
||||
data = {"title": title, "message": content, "priority": int(priority)}
|
||||
try:
|
||||
resp = requests.post(url, data=data, timeout=10)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 7. iGot ====================
|
||||
def _send_igot(title: str, content: str) -> bool:
|
||||
igot_key = os.environ.get("IGOT_PUSH_KEY", "").strip()
|
||||
if not igot_key:
|
||||
return False
|
||||
url = f"https://push.hellyw.com/{igot_key}"
|
||||
data = {"title": title, "content": content}
|
||||
try:
|
||||
resp = requests.post(url, data=data, timeout=10)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 8. Server酱 ====================
|
||||
def _send_serverchan(title: str, content: str) -> bool:
|
||||
push_key = os.environ.get("PUSH_KEY", "").strip()
|
||||
if not push_key:
|
||||
return False
|
||||
url = f"https://sctapi.ftqq.com/{push_key}.send"
|
||||
data = {"title": title, "desp": content.replace("\n", "\n\n")}
|
||||
try:
|
||||
resp = requests.post(url, data=data, timeout=10)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 9. PushDeer ====================
|
||||
def _send_pushdeer(title: str, content: str) -> bool:
|
||||
deer_key = os.environ.get("DEER_KEY", "").strip()
|
||||
if not deer_key:
|
||||
return False
|
||||
deer_url = os.environ.get("DEER_URL", "https://api2.pushdeer.com").strip().rstrip("/")
|
||||
url = f"{deer_url}/message/push"
|
||||
data = {"pushkey": deer_key, "text": title, "desp": content, "type": "text"}
|
||||
try:
|
||||
resp = requests.post(url, data=data, timeout=10)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 10. Synology Chat ====================
|
||||
def _send_synology_chat(title: str, content: str) -> bool:
|
||||
chat_url = os.environ.get("CHAT_URL", "").strip()
|
||||
chat_token = os.environ.get("CHAT_TOKEN", "").strip()
|
||||
if not chat_url or not chat_token:
|
||||
return False
|
||||
payload = {"text": f"{title}\n\n{content}"}
|
||||
params = {"token": chat_token}
|
||||
try:
|
||||
resp = requests.post(chat_url, params=params, json=payload, timeout=10)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 11. PushPlus ====================
|
||||
def _send_pushplus(title: str, content: str) -> bool:
|
||||
pushplus_token = os.environ.get("PUSH_PLUS_TOKEN", "").strip()
|
||||
if not pushplus_token:
|
||||
return False
|
||||
url = "http://www.pushplus.plus/send"
|
||||
data = {
|
||||
"token": pushplus_token,
|
||||
"title": title,
|
||||
"content": content.replace("\n", "<br>"),
|
||||
"template": os.environ.get("PUSH_PLUS_TEMPLATE", "html").strip(),
|
||||
"channel": os.environ.get("PUSH_PLUS_CHANNEL", "").strip(),
|
||||
"webhook": os.environ.get("PUSH_PLUS_WEBHOOK", "").strip(),
|
||||
"callbackUrl": os.environ.get("PUSH_PLUS_CALLBACKURL", "").strip(),
|
||||
"to": os.environ.get("PUSH_PLUS_TO", "").strip(),
|
||||
}
|
||||
user = os.environ.get("PUSH_PLUS_USER", "").strip()
|
||||
if user:
|
||||
data["user"] = user
|
||||
data = {k: v for k, v in data.items() if v}
|
||||
try:
|
||||
resp = requests.post(url, json=data, timeout=10)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 12. 微加机器人 ====================
|
||||
def _send_weplusbot(title: str, content: str) -> bool:
|
||||
token = os.environ.get("WE_PLUS_BOT_TOKEN", "").strip()
|
||||
if not token:
|
||||
return False
|
||||
version = os.environ.get("WE_PLUS_BOT_VERSION", "pro").strip()
|
||||
receiver = os.environ.get("WE_PLUS_BOT_RECEIVER", "").strip()
|
||||
if version == "pro":
|
||||
url = f"http://www.botweixin.cn/api/bot_client/send_message?token={token}"
|
||||
else:
|
||||
url = f"http://www.botweixin.cn/api/bot_client/send_message_lite?token={token}"
|
||||
data = {"content": f"{title}\n\n{content}"}
|
||||
if receiver:
|
||||
data["receiver"] = receiver
|
||||
try:
|
||||
resp = requests.post(url, json=data, timeout=10)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 13. Qmsg酱 ====================
|
||||
def _send_qmsg(title: str, content: str) -> bool:
|
||||
qmsg_key = os.environ.get("QMSG_KEY", "").strip()
|
||||
if not qmsg_key:
|
||||
return False
|
||||
qmsg_type = os.environ.get("QMSG_TYPE", "").strip()
|
||||
url = f"https://qmsg.zendee.cn/send/{qmsg_key}"
|
||||
data = {"msg": f"{title}\n\n{content}"}
|
||||
if qmsg_type:
|
||||
data["type"] = qmsg_type
|
||||
try:
|
||||
resp = requests.post(url, data=data, timeout=10)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 14. 企业微信应用 ====================
|
||||
def _send_qywx_app(title: str, content: str) -> bool:
|
||||
qywx_am = os.environ.get("QYWX_AM", "").strip()
|
||||
if not qywx_am:
|
||||
return False
|
||||
parts = qywx_am.split(",")
|
||||
if len(parts) < 4:
|
||||
return False
|
||||
corpid, corpsecret, touser, agentid = parts[0], parts[1], parts[2], parts[3]
|
||||
media_id = parts[4] if len(parts) > 4 else ""
|
||||
origin = os.environ.get("QYWX_ORIGIN", "").strip()
|
||||
base = origin if origin else "https://qyapi.weixin.qq.com"
|
||||
|
||||
# 获取 access_token
|
||||
try:
|
||||
token_resp = requests.get(
|
||||
f"{base}/cgi-bin/gettoken", params={"corpid": corpid, "corpsecret": corpsecret}, timeout=10
|
||||
)
|
||||
access_token = token_resp.json().get("access_token")
|
||||
if not access_token:
|
||||
return False
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
payload = {
|
||||
"touser": touser,
|
||||
"agentid": int(agentid),
|
||||
"msgtype": "text",
|
||||
"text": {"content": f"{title}\n\n{content}"},
|
||||
}
|
||||
try:
|
||||
resp = requests.post(
|
||||
f"{base}/cgi-bin/message/send?access_token={access_token}", json=payload, timeout=10
|
||||
)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 15. 企业微信机器人 ====================
|
||||
def _send_qywx_bot(title: str, content: str) -> bool:
|
||||
qywx_key = os.environ.get("QYWX_KEY", "").strip()
|
||||
if not qywx_key:
|
||||
return False
|
||||
origin = os.environ.get("QYWX_ORIGIN", "").strip()
|
||||
base = origin if origin else "https://qyapi.weixin.qq.com"
|
||||
url = f"{base}/cgi-bin/webhook/send?key={qywx_key}"
|
||||
payload = {"msgtype": "text", "text": {"content": f"{title}\n\n{content}"}}
|
||||
try:
|
||||
resp = requests.post(url, json=payload, timeout=10)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 16. Telegram ====================
|
||||
def _get_telegram_kwargs() -> tuple:
|
||||
"""返回 (base_url, chat_id, proxy_dict) 或 (None, None, None)"""
|
||||
bot_token = os.environ.get("TG_BOT_TOKEN", "").strip()
|
||||
chat_id = os.environ.get("TG_USER_ID", "").strip() or os.environ.get("TG_CHAT_ID", "").strip()
|
||||
if not bot_token or not chat_id:
|
||||
return None, None, None
|
||||
|
||||
api_host = os.environ.get("TG_API_HOST", "").strip()
|
||||
base_url = f"https://{api_host}/bot{bot_token}" if api_host else f"https://api.telegram.org/bot{bot_token}"
|
||||
|
||||
proxies = None
|
||||
proxy_host = os.environ.get("TG_PROXY_HOST", "").strip()
|
||||
proxy_port = os.environ.get("TG_PROXY_PORT", "").strip()
|
||||
if proxy_host and proxy_port:
|
||||
proxy_auth = os.environ.get("TG_PROXY_AUTH", "").strip()
|
||||
proxy_url = f"http://{proxy_host}:{proxy_port}"
|
||||
if proxy_auth:
|
||||
proxy_url = f"http://{proxy_auth}@{proxy_host}:{proxy_port}"
|
||||
proxies = {"http": proxy_url, "https": proxy_url}
|
||||
|
||||
return base_url, chat_id, proxies
|
||||
|
||||
|
||||
def _send_telegram_text(title: str, content: str) -> bool:
|
||||
base_url, chat_id, proxies = _get_telegram_kwargs()
|
||||
if not base_url:
|
||||
return False
|
||||
url = f"{base_url}/sendMessage"
|
||||
text = f"{title}\n\n{content}"
|
||||
payload = {"chat_id": chat_id, "text": text, "disable_web_page_preview": True}
|
||||
try:
|
||||
resp = requests.post(url, data=payload, proxies=proxies, timeout=15)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
def _send_telegram_file(title: str, content: str, file_path: str) -> bool:
|
||||
base_url, chat_id, proxies = _get_telegram_kwargs()
|
||||
if not base_url or not os.path.isfile(file_path):
|
||||
return False
|
||||
url = f"{base_url}/sendDocument"
|
||||
payload = {"chat_id": chat_id, "caption": f"{title}\n\n{content}"}
|
||||
try:
|
||||
with open(file_path, "rb") as f:
|
||||
resp = requests.post(
|
||||
url, data=payload,
|
||||
files={"document": (os.path.basename(file_path), f, "application/json")},
|
||||
proxies=proxies, timeout=30
|
||||
)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
def _send_telegram_photo(title: str, image_url: str) -> bool:
|
||||
"""通过 Telegram 发送单张图片(从 URL 下载后上传)"""
|
||||
base_url, chat_id, proxies = _get_telegram_kwargs()
|
||||
if not base_url or not image_url:
|
||||
return False
|
||||
try:
|
||||
img_resp = requests.get(image_url, timeout=15, proxies=proxies)
|
||||
if not img_resp.ok:
|
||||
return False
|
||||
url = f"{base_url}/sendPhoto"
|
||||
resp = requests.post(url, data={"chat_id": chat_id, "caption": title},
|
||||
files={"photo": ("image.png", img_resp.content, "image/png")},
|
||||
proxies=proxies, timeout=20)
|
||||
return resp.json().get("ok", False)
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 17. 智能微秘书 ====================
|
||||
def _send_aibotk(title: str, content: str) -> bool:
|
||||
aibotk_key = os.environ.get("AIBOTK_KEY", "").strip()
|
||||
aibotk_type = os.environ.get("AIBOTK_TYPE", "").strip()
|
||||
aibotk_name = os.environ.get("AIBOTK_NAME", "").strip()
|
||||
if not aibotk_key or not aibotk_type or not aibotk_name:
|
||||
return False
|
||||
url = f"https://api-bot.aibotk.com/openapi/v1/chat/msg"
|
||||
headers = {"Authorization": f"Bearer {aibotk_key}"}
|
||||
data = {"type": aibotk_type, "name": aibotk_name, "msg": f"{title}\n\n{content}"}
|
||||
try:
|
||||
resp = requests.post(url, json=data, headers=headers, timeout=10)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 18. SMTP 邮件 ====================
|
||||
def _build_smtp_message(title: str, content: str) -> MIMEText:
|
||||
msg = MIMEText(content, "plain", "utf-8")
|
||||
msg["From"] = os.environ.get("SMTP_NAME", "") or os.environ.get("SMTP_EMAIL", "")
|
||||
msg["To"] = os.environ.get("SMTP_EMAIL", "")
|
||||
msg["Subject"] = title
|
||||
return msg
|
||||
|
||||
|
||||
def _send_smtp(title: str, content: str) -> bool:
|
||||
server = os.environ.get("SMTP_SERVER", "").strip()
|
||||
email = os.environ.get("SMTP_EMAIL", "").strip()
|
||||
password = os.environ.get("SMTP_PASSWORD", "").strip()
|
||||
if not server or not email or not password:
|
||||
return False
|
||||
use_ssl = os.environ.get("SMTP_SSL", "false").strip().lower() == "true"
|
||||
|
||||
try:
|
||||
msg = _build_smtp_message(title, content)
|
||||
host, _, port_str = server.partition(":")
|
||||
port = int(port_str) if port_str else (465 if use_ssl else 25)
|
||||
smtp_class = smtplib.SMTP_SSL if use_ssl else smtplib.SMTP
|
||||
with smtp_class(host, port, timeout=10) as s:
|
||||
if not use_ssl:
|
||||
s.starttls()
|
||||
s.login(email, password)
|
||||
s.send_message(msg)
|
||||
return True
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
def _send_smtp_file(title: str, content: str, file_path: str) -> bool:
|
||||
server = os.environ.get("SMTP_SERVER", "").strip()
|
||||
email = os.environ.get("SMTP_EMAIL", "").strip()
|
||||
password = os.environ.get("SMTP_PASSWORD", "").strip()
|
||||
if not server or not email or not password or not os.path.isfile(file_path):
|
||||
return False
|
||||
use_ssl = os.environ.get("SMTP_SSL", "false").strip().lower() == "true"
|
||||
|
||||
try:
|
||||
msg = MIMEMultipart()
|
||||
msg["From"] = os.environ.get("SMTP_NAME", "") or email
|
||||
msg["To"] = email
|
||||
msg["Subject"] = title
|
||||
msg.attach(MIMEText(content, "plain", "utf-8"))
|
||||
with open(file_path, "rb") as f:
|
||||
attachment = MIMEApplication(f.read())
|
||||
attachment.add_header("Content-Disposition", "attachment", filename=os.path.basename(file_path))
|
||||
msg.attach(attachment)
|
||||
|
||||
host, _, port_str = server.partition(":")
|
||||
port = int(port_str) if port_str else (465 if use_ssl else 25)
|
||||
smtp_class = smtplib.SMTP_SSL if use_ssl else smtplib.SMTP
|
||||
with smtp_class(host, port, timeout=30) as s:
|
||||
if not use_ssl:
|
||||
s.starttls()
|
||||
s.login(email, password)
|
||||
s.send_message(msg)
|
||||
return True
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 19. PushMe ====================
|
||||
def _send_pushme(title: str, content: str) -> bool:
|
||||
pushme_key = os.environ.get("PUSHME_KEY", "").strip()
|
||||
if not pushme_key:
|
||||
return False
|
||||
pushme_url = os.environ.get("PUSHME_URL", "https://push.i-i.me").strip().rstrip("/")
|
||||
url = f"{pushme_url}/{pushme_key}"
|
||||
data = {"title": title, "content": content}
|
||||
try:
|
||||
resp = requests.post(url, data=data, timeout=10)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 20. CHRONOCAT ====================
|
||||
def _send_chronocat(title: str, content: str) -> bool:
|
||||
chronocat_url = os.environ.get("CHRONOCAT_URL", "").strip()
|
||||
chronocat_qq = os.environ.get("CHRONOCAT_QQ", "").strip()
|
||||
if not chronocat_url or not chronocat_qq:
|
||||
return False
|
||||
payload = {"message": f"{title}\n\n{content}"}
|
||||
if "group_id" in chronocat_qq:
|
||||
payload["group_id"] = chronocat_qq.split("=")[1]
|
||||
else:
|
||||
payload["user_id"] = chronocat_qq.split("=")[1]
|
||||
token = os.environ.get("CHRONOCAT_TOKEN", "").strip()
|
||||
headers = {"Authorization": f"Bearer {token}"} if token else {}
|
||||
try:
|
||||
resp = requests.post(chronocat_url, json=payload, headers=headers, timeout=10)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 21. 自定义 Webhook ====================
|
||||
def _send_webhook(title: str, content: str) -> bool:
|
||||
webhook_url = os.environ.get("WEBHOOK_URL", "").strip()
|
||||
webhook_method = os.environ.get("WEBHOOK_METHOD", "POST").strip().upper()
|
||||
if not webhook_url or not webhook_method:
|
||||
return False
|
||||
webhook_body = os.environ.get("WEBHOOK_BODY", "").strip()
|
||||
if webhook_body:
|
||||
body = webhook_body.replace("\\n", "\n").replace("{title}", title).replace("{content}", content)
|
||||
else:
|
||||
body = f"{title}\n\n{content}"
|
||||
headers_str = os.environ.get("WEBHOOK_HEADERS", "").strip()
|
||||
headers = {}
|
||||
if headers_str:
|
||||
try:
|
||||
headers = json.loads(headers_str)
|
||||
except Exception:
|
||||
pass
|
||||
content_type = os.environ.get("WEBHOOK_CONTENT_TYPE", "").strip()
|
||||
try:
|
||||
if webhook_method == "GET":
|
||||
resp = requests.get(webhook_url, params={"title": title, "content": content}, headers=headers, timeout=10)
|
||||
else:
|
||||
if content_type:
|
||||
headers["Content-Type"] = content_type
|
||||
resp = requests.post(webhook_url, data=body.encode("utf-8"), headers=headers, timeout=10)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 22. ntfy ====================
|
||||
def _send_ntfy(title: str, content: str) -> bool:
|
||||
ntfy_topic = os.environ.get("NTFY_TOPIC", "").strip()
|
||||
if not ntfy_topic:
|
||||
return False
|
||||
ntfy_url = os.environ.get("NTFY_URL", "https://ntfy.sh").strip().rstrip("/")
|
||||
priority = os.environ.get("NTFY_PRIORITY", "3").strip()
|
||||
url = f"{ntfy_url}/{ntfy_topic}"
|
||||
headers = {"Title": title, "Priority": priority}
|
||||
try:
|
||||
resp = requests.post(url, data=content.encode("utf-8"), headers=headers, timeout=10)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 23. WxPusher ====================
|
||||
def _send_wxpusher(title: str, content: str) -> bool:
|
||||
app_token = os.environ.get("WXPUSHER_APP_TOKEN", "").strip()
|
||||
if not app_token:
|
||||
return False
|
||||
topic_ids = os.environ.get("WXPUSHER_TOPIC_IDS", "").strip()
|
||||
uids = os.environ.get("WXPUSHER_UIDS", "").strip()
|
||||
if not topic_ids and not uids:
|
||||
return False
|
||||
url = "https://wxpusher.zjiecode.com/api/send/message"
|
||||
data = {
|
||||
"appToken": app_token,
|
||||
"content": f"{title}\n\n{content}",
|
||||
"contentType": 1,
|
||||
"summary": title[:50],
|
||||
}
|
||||
if topic_ids:
|
||||
data["topicIds"] = [int(t) for t in topic_ids.split(";") if t.strip().isdigit()]
|
||||
if uids:
|
||||
data["uids"] = [u.strip() for u in uids.split(";") if u.strip()]
|
||||
try:
|
||||
resp = requests.post(url, json=data, timeout=10)
|
||||
return resp.ok
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# ==================== 图片推送 ====================
|
||||
|
||||
def send_photos(title: str, text_content: str, photos: list) -> None:
|
||||
"""
|
||||
发送图片通知:文本推送到所有通道,图片仅 Telegram。
|
||||
photos: [{"image": "url或本地路径", "caption": "图片说明"}, ...]
|
||||
"""
|
||||
# 文本推送所有通道
|
||||
send(title, text_content)
|
||||
|
||||
# 图片仅 Telegram
|
||||
for i, photo in enumerate(photos):
|
||||
image = photo.get("image", "")
|
||||
caption = photo.get("caption", f"Photo {i+1}")
|
||||
full_caption = f"{title}\n{caption}"
|
||||
try:
|
||||
_send_telegram_photo(full_caption, image)
|
||||
except Exception:
|
||||
pass
|
||||
238
脚本库/web版/账密/rpg66/2022-07-20_rpg66_1ecbfd43.js
Normal file
238
脚本库/web版/账密/rpg66/2022-07-20_rpg66_1ecbfd43.js
Normal file
@@ -0,0 +1,238 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/rpg66.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/rpg66.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/rpg66.js
|
||||
// # UploadedAt: 2022-07-20T12:25:35Z
|
||||
// # SHA256: 1ecbfd43a5f24896cd44110aeed805d8970c33087f793bbf5402232e95f224b2
|
||||
// # Category: web版/账密
|
||||
// # Evidence: web/H5关键词 + username/password/login
|
||||
//
|
||||
|
||||
/*
|
||||
* @Author: Wenmoux
|
||||
* @Date: 2020-12-03 08:48:00
|
||||
* @LastEditTime: 2022-06-15 09:13:14
|
||||
* @Description: 橙光游戏app每日签到+登陆奖励领取+每日任务+分享
|
||||
* @Other:X-sign生成 https://my.oschina.net/2devil/blog/2395909
|
||||
*/
|
||||
|
||||
const axios = require("axios");
|
||||
const md5 = require("crypto-js").MD5
|
||||
headers = {}
|
||||
let result = "【橙光游戏】: ";
|
||||
const {
|
||||
uid,
|
||||
token,
|
||||
skey,
|
||||
sflag,
|
||||
folder,
|
||||
gameid,
|
||||
did
|
||||
} = config.rpg66
|
||||
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
|
||||
|
||||
//签到
|
||||
function check() {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
const url = "https://www.66rpg.com/Ajax/Home/new_sign_in.json";
|
||||
let data = `token=${token}&mobile_uid=&client=2&android_cur_ver=268`;
|
||||
const headers = {
|
||||
"user-agent": "Mozilla/5.0 (Linux; Android 10; Redmi K30 Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/85.0.4183.127 Mobile Safari/537.36",
|
||||
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
|
||||
};
|
||||
let res = await axios.post(url, data, {
|
||||
headers,
|
||||
});
|
||||
if (res.data.status == 1) {
|
||||
msg = `签到成功,获得:${res.data.data.today.award_name}明日继续签到🉑获得:${res.data.data.tomorrow.award_name}!! || `;
|
||||
} else {
|
||||
msg = "签到失败⚠️⚠️⚠️ " + res.data.msg + " || ";
|
||||
}
|
||||
console.log(" 签到结果:" + msg);
|
||||
result += msg;
|
||||
} catch (err) {
|
||||
msg = "签到接口请求出错!! ";
|
||||
console.log(err);
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function get(url, method = "get", data = null, xsign) {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
if (xsign) headers["x-sign"] = xsign
|
||||
|
||||
if (method == "get") res = await axios.get(url, {
|
||||
headers
|
||||
});
|
||||
// headers ["content-type"] = "application/json;charset=utf-8"
|
||||
headers["user-agent"] == "axios/0.19.0"
|
||||
if (method == "post") res = await axios.post(url, data, {
|
||||
headers
|
||||
})
|
||||
headers = {}
|
||||
if (res.data && res.data.data && (res.data.data.msg || res.data.msg)) console.log(" " + (res.data.data.msg || res.data.msg))
|
||||
resolve(res.data)
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
resolve({
|
||||
msg: "签到接口请求出错"
|
||||
})
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
//获取活跃任务列表
|
||||
async function getaskList() {
|
||||
let url = `https://www.66rpg.com/ActiveSystem/index/get_today_task_lists?jsonCallBack=&uid=&token=${token}&client=2&_=`
|
||||
let res = await get(url)
|
||||
if (res && res.status == 1) taskList = res.data
|
||||
else taskList = []
|
||||
return taskList
|
||||
}
|
||||
|
||||
|
||||
//登陆奖励
|
||||
function loginreward() {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
var url = `http://iapi.66rpg.com/user/v2/sso/launch_remind?pack_name=com.sixrpg.opalyer&sv=QKQ1.190825.002testkeys&android_cur_ver=2.25.268.1027&nt=4g&device_code=RedmiK30&channel=LYyingyongbao&skey=&device_unique_id=${did}&token=${token}`;
|
||||
let res = await get(url, "get", null, getsign(url))
|
||||
if (res.status == 1) {
|
||||
if (!res.data.integral.hidden) {
|
||||
msg =
|
||||
" 登陆成功,获得:" +
|
||||
res.data.integral.msg +
|
||||
"," +
|
||||
res.data.flower.msg;
|
||||
} else {
|
||||
msg = "今日已经领取过登陆奖励了";
|
||||
}
|
||||
} else {
|
||||
msg = "领取登陆奖励失败:" + res.msg;
|
||||
}
|
||||
result += msg;
|
||||
console.log(" 领取结果:" + msg);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
// x-sign生成
|
||||
function getsign(url) {
|
||||
data = url.split("?")[1]
|
||||
var str = data
|
||||
.split("&")
|
||||
.sort(function(a, b) {
|
||||
return a.localeCompare(b);
|
||||
})
|
||||
.join("&");
|
||||
return md5(str + "a_744022879dc25b40").toString()
|
||||
}
|
||||
|
||||
//评论任务
|
||||
function favor() {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
//先取消收藏
|
||||
var url0 = `http://iapi.66rpg.com/Favorite/v1/Favorite/editor_game_folders?device_code=MEIZU18Pro&sv=Flyme9.0.1.3A&nt=4g&token=${token}&skey=${skey}&action=editor_game_folders&ts=&android_cur_ver=2.32.288.0119`
|
||||
let data0 = `pack_name=com.sixrpg.opalyer&folder=&sv=Flyme9.0.1.3A&gindex=242004&android_cur_ver=2.32.288.0119&nt=4g&device_code=MEIZU18Pro&channel=XiaoMiReaderDYD&skey=${skey}&device_unique_id=${did}&token=${token}`
|
||||
let res0 = await get(url0 + "&sign=" + getsign(url0), "post", data0, getsign(url0))
|
||||
console.log(" 取消收藏:" + res0.msg);
|
||||
//收藏
|
||||
var url1 = `https://www.66rpg.com/api/client?pack_name=com.sixrpg.opalyer&sv=Flyme9.0.1.3A&android_cur_ver=2.32.288.0119&nt=4g&channel=XiaoMiReaderDYD&platform=2&token=${token}&folder=${folder}%2C&gindex=242004&device_code=&action=fav_game&skey=${skey}&device_unique_id=${did}&fav_type=1`
|
||||
let res = await get(url1, "get", null, getsign(url1))
|
||||
console.log(" 收藏结果:" + res.msg);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
async function uploadtime(id) {
|
||||
timm = 30 * 60
|
||||
let url = "https://c.66rpg.com/collect/v1/index/runtime"
|
||||
time = parseInt(new Date().getTime().toString() / 1000)
|
||||
let datas = `{"run":{"${id}":${timm}}}${uid}${time}MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDtsvsk/MIEI9YXvHzLfg+eEJkY3d7RmVynKBZY35T0xg3WwZgmC6GSPZqrMMcht6aiZYPJywhm9JiE6kBo/0Mvxklm5Wd35wIKeDXcq8Aqb4aQXalcwsD3f829OR1P2AqGilr14Rftv4ixyQATG/BqP2/kgft2rcq4e/E7bDWNLQIDAQAB`
|
||||
let check = md5(datas).toString()
|
||||
let str = `data=%7B%22run%22%3A%7B%22${id}%22%3A${timm}%7D%7D&uid=${uid}&ts=${time}&check=${check}&platform=3&channel_id=0&online_plat=${timm}&nonce=b613b114-b3a8-4bb6-a444-7096b2abc5fe×tamp=${time}`
|
||||
let res = await get(url, "post", str)
|
||||
console.log(" 上传结果:" + res.msg)
|
||||
}
|
||||
async function cg() {
|
||||
console.log("橙光app每日签到开始...");
|
||||
//获取任务列表
|
||||
let taskList = await getaskList()
|
||||
|
||||
//送花
|
||||
// gid = 1510209
|
||||
// ssurl =`https://www.66rpg.com/api/client?pack_name=com.sixrpg.opalyer&flower_place=4&sv=Flyme9.0.1.3A&android_cur_ver=2.32.288.0119&nt=network_unknown&num=1&channel=XiaoMiReaderDYD&token=${token}&gindex=${gid}&group_id=&device_code=MEIZU18Pro&action=send_flower&skey=${skey}&device_unique_id=${did}`
|
||||
// let aa = await get(ssurl, "get", null, getsign(ssurl))
|
||||
// console.log(aa)
|
||||
for (task of taskList) {
|
||||
console.log("去做任务:" + task.task_name)
|
||||
if (task.max_claim <= task.play_count) {} else {
|
||||
switch (task.task_type) {
|
||||
case 0: //每日登陆
|
||||
await loginreward();
|
||||
break
|
||||
case 1: //阅读5min
|
||||
await uploadtime(1593227)
|
||||
await sleep(12 * 1000)
|
||||
await uploadtime(1593227)
|
||||
break
|
||||
case 2: //分享作品
|
||||
surl = `http://www.66rpg.com/api/newClient?pack_name=com.sixrpg.opalyer&sv=QKQ1.190825.002testkeys&android_cur_ver=2.27.273.1229&nt=4g&channel=vivoDYD&platform=2&token=${token}&gindex=${gameid}&share_msg_id=&device_code=RedmiK30&action=share_game&skey=${skey}&device_unique_id=${did}&share_channel=3`;
|
||||
await get(surl, "get", null, getsign(surl))
|
||||
break
|
||||
case 3: //分享别人看
|
||||
for (c of new Array(5)) {
|
||||
await get(`https://m.66rpg.com/main/ajax/game/add_game_share.json?token=&client=0&stype=1&starget=${gameid}&sflag=${sflag}&platform=2&share_msg_id=&um_chnnl=share&um_from_appkey=60ab3e2453b67264990bf849`)
|
||||
await sleep(1000)
|
||||
}
|
||||
break
|
||||
case 4: //发表评论
|
||||
datac = `pack_name=com.avgorange.dating&sv=Flyme9.0.1.3A&auth=eyJhY3Rpb24iOiJjb21tZW50X3Bvc3QiLCJnaW5kZXgiOiIxNTY5ODQ0IiwicGFyZW50X2NpZCI6IiIsImNvbnRlbnQiOiLmiZPljaHmiZPljaHmiZPljaHmiZPljaHmiZPljaEiLCJkZXZpY2VfdHlwZSI6Ik1FSVpVMThQcm8iLCJyIjoiNTZGIn0%253D&android_cur_ver=2.32.292.0530&parent_cid=&nt=wifi&channel=talkingdata202106&device_type=MEIZU18Pro&content=%E6%89%93%E5%8D%A1%E6%89%93%E5%8D%A1%E6%89%93%E5%8D%A1%E6%89%93%E5%8D%A1%E6%89%93%E5%8D%A1&gindex=1569844&device_code=MEIZU18Pro&skey=${skey}&device_unique_id=${did}&call_source=game`
|
||||
surl = `http://www.66rpg.com/api/client?device_code=MEIZU18Pro&sv=Flyme9.0.1.3A&nt=wifi&token=${token}&skey=${skey}&action=comment_post&ts=1656227475&android_cur_ver=2.32.292.0530`
|
||||
aa = await get(surl + "&sign=" + getsign(surl), "post", datac, getsign(surl))
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
await get(`https://www.66rpg.com/ActiveSystem/index/claimReward?task_type=${task.task_type}&uid=${uid}&token=${token}&client=2&_=`)
|
||||
}
|
||||
console.log("去签到")
|
||||
await check();
|
||||
console.log("每日分享")
|
||||
surl = `http://www.66rpg.com/api/newClient?pack_name=com.sixrpg.opalyer&sv=QKQ1.190825.002testkeys&android_cur_ver=2.27.273.1229&nt=4g&channel=vivoDYD&platform=2&token=${token}&gindex=${gameid}&share_msg_id=&device_code=RedmiK30&action=share_game&skey=${skey}&device_unique_id=${did}&share_channel=3`;
|
||||
await get(surl, "get", null, getsign(surl))
|
||||
Info = ""
|
||||
urlyy = `https://www.66rpg.com/propShop/interapi/game/v1/game/get_user_gift_game?pack_name=com.sixrpg.opalyer&sv=Flyme9.0.1.3A&android_cur_ver=2.32.288.0119&nt=4g&device_code=MEIZU18Pro&channel=XiaoMiReaderDYD&skey=${skey}&page=1&sort=1&device_unique_id=${did}&token=${token}`
|
||||
let ri = await get(urlyy, "get", null, getsign(urlyy))
|
||||
count = ri && ri.data ? ri.data.count : "未知"
|
||||
var iurl = `http://iapi.66rpg.com/user/v2/user/user_info?uid=${uid}&pack_name=com.sixrpg.opalyer&sv=Flyme9.0.1.3A&android_cur_ver=2.32.288.0119&nt=network_unknown&device_code=&channel=XiaoMiReaderDYD&action=user_info&skey=${skey}&device_unique_id=${did}&token=${token}`
|
||||
let ires = await get(iurl, "get", null, getsign(iurl))
|
||||
if (ires.status == 1) {
|
||||
info = ires.data[uid]
|
||||
if (info.last_available_time != 0) hl = `\n 花篮:至${info.last_available_time_str.replace("花篮领取有效期 ","")}`
|
||||
else hl = ""
|
||||
Info = ` 昵称:${info.uname}\n 等级:${info.user_level}\n 鲜花:${info.rest_flower}\n 积分:${info.coin3}\n 橙子:${info.user_orange}${hl}\n 拥有:${count}部`
|
||||
}
|
||||
console.log(Info)
|
||||
return "【橙光】:\n " + Info
|
||||
}
|
||||
|
||||
//cg()
|
||||
module.exports = cg;
|
||||
136
脚本库/web版/账密/sxmd/2024-02-09_sxmd_c843730c.js
Normal file
136
脚本库/web版/账密/sxmd/2024-02-09_sxmd_c843730c.js
Normal file
@@ -0,0 +1,136 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/sxmd.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/sxmd.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/sxmd.js
|
||||
// # UploadedAt: 2024-02-09T08:25:50Z
|
||||
// # SHA256: c843730c6fb10c63ed4eee5118bc7e56d65ff3e180c100b26ab31f8791099339
|
||||
// # Category: web版/账密
|
||||
// # Evidence: web/H5关键词 + username/password/login
|
||||
//
|
||||
|
||||
let account = config.sxmd.account;
|
||||
let password = config.sxmd.password;
|
||||
const iconv = require("iconv-lite");
|
||||
const axios = require("axios");
|
||||
let ck = null;
|
||||
let formhash = null;
|
||||
|
||||
if (config.sxmd.sxmd_host){
|
||||
SXMD_HOST=config.sxmd.sxmd_host;
|
||||
}else{
|
||||
SXMD_HOST="www.txtnovel.vip"
|
||||
}
|
||||
|
||||
|
||||
let result = "【书香门第】:";
|
||||
console.log(`\n\n当前书香门第网址为:https://${SXMD_HOST}\n请自行核对,如果接下来报错或失败极有可能是网址变了。\n请百度一下最新网址,\n并手动在环境变量内新建sxmd_host,内容不带https://\n示例:www.txtnovel.pro\n\n`)
|
||||
var headers = {
|
||||
Host: `${SXMD_HOST}`,
|
||||
cookie: " ",
|
||||
referer: `http://${SXMD_HOST}/member.php?mod=logging&action=login&mobile=2`,
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
"User-Agent": "Mozilla/5.0 (Linux; Android 10; Redmi K30) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.83 Mobile Safari/537.36",
|
||||
}
|
||||
|
||||
function login() {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
let loginurl =
|
||||
`http://${SXMD_HOST}/member.php?mod=logging&action=login&loginsubmit=yes&loginhash=&mobile=2`;
|
||||
let data = `formhash=&referer=http%3A%2F%2F${SXMD_HOST}%2F&fastloginfield=username&cookietime=2592000&username=${account}&password=${password}&questionid=0&answer=&submit=true`;
|
||||
let res = await axios.post(loginurl, data, {
|
||||
headers
|
||||
}
|
||||
);
|
||||
resdata = res.data
|
||||
if (resdata.match(/欢迎您回来/)) {
|
||||
result += "登陆成功 ";
|
||||
console.log("登陆成功");
|
||||
ckk = res.headers["set-cookie"];
|
||||
ck = "";
|
||||
for (i = 0; i < ckk.length; i++) {
|
||||
ck += ckk[i].split("expires")[0];
|
||||
}
|
||||
} else {
|
||||
console.log("登陆失败");
|
||||
let message = resdata.match(
|
||||
/<div id=\"messagetext\">.*?<p>(.+?)<\/p>/s
|
||||
);
|
||||
result += "登陆失败 ";
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
function getformhash() {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
let url = `http://${SXMD_HOST}/plugin.php?id=dsu_paulsign:sign&mobile=yes`;
|
||||
let res = await axios.get(url, {
|
||||
headers
|
||||
});
|
||||
formhash = res.data.match(
|
||||
/<input type=\"hidden\" name=\"formhash\" value=\"(.+?)\" \/>/s
|
||||
)[1];
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
function sign() {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
let url = `http://${SXMD_HOST}/plugin.php?id=dsu_paulsign:sign&operation=qiandao&infloat=0&inajax=0&mobile=yes`;
|
||||
let data = `formhash=${formhash}&qdxq=kx`;
|
||||
let res = await axios.post(url, data, {
|
||||
headers
|
||||
});
|
||||
let message = res.data.match(/<div id=\"messagetext\">.*?<p>(.+?)<\/p>/s);
|
||||
if (message) {
|
||||
result += message[1] + "! ";
|
||||
} else {
|
||||
result += "签到失败! ";
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
function info() {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
let url = `http://${SXMD_HOST}/home.php?mod=space&`;
|
||||
let res = await axios.get(url, {
|
||||
headers
|
||||
});
|
||||
let message = res.data.match(/<li><em>金币<\/em>(.+?) 枚<\/li>/);
|
||||
if (message) {
|
||||
result += "金币:" + message[1];
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
async function task() {
|
||||
await login();
|
||||
headers.cookie = ck;
|
||||
if (ck) {
|
||||
await getformhash();
|
||||
await sign();
|
||||
await info();
|
||||
console.log(result);
|
||||
} else {}
|
||||
return result;
|
||||
}
|
||||
|
||||
//task();
|
||||
module.exports = task;
|
||||
31
脚本库/web版/账密/传奇GM论坛_,/2021-09-25_diygm_546b3d24.js
Normal file
31
脚本库/web版/账密/传奇GM论坛_,/2021-09-25_diygm_546b3d24.js
Normal file
@@ -0,0 +1,31 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/diygm.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/diygm.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/diygm.js
|
||||
// # UploadedAt: 2021-09-25T00:15:59Z
|
||||
// # SHA256: 546b3d24edf9ad5138473fb53f179e14dd7401c5f3a92b9c74b931cb9a568ade
|
||||
// # Category: web版/账密
|
||||
// # Evidence: web/H5关键词 + username/password/login
|
||||
//
|
||||
|
||||
//传奇GM论坛 https://www.diygm.com/home.php?mod=spacecp&ac=credit&op=rule
|
||||
|
||||
const rules = {
|
||||
name: "【传奇GM论坛】:",
|
||||
url: "https://www.diygm.com/plugin.php?id=dc_signin", //用于获取formhash的链接
|
||||
cookie: config.diygm.cookie,
|
||||
formhash: 'formhash=(.+?)"', //formhash正则
|
||||
verify: "抱歉,您尚未登录,无法进行此操作", //验证cookie状态
|
||||
op: [{
|
||||
name: "签到",
|
||||
method: "post", //签到请求方式
|
||||
url: "https://www.diygm.com/plugin.php?id=dc_signin:sign&inajax=1", //签到链接
|
||||
data: "formhash=@formhash&signsubmit=yes&handlekey=signin&emotid=1&referer=https%3A%2F%2Fwww.diygm.com%2Fmisc.php%3Fmod%3Dmobile&content=%E8%AE%B0%E4%B8%8A%E4%B8%80%E7%AC%94%EF%BC%8Chold%E4%BD%8F%E6%88%91%E7%9A%84%E5%BF%AB%E4%B9%90%EF%BC%81;"
|
||||
}]
|
||||
};
|
||||
|
||||
async function diygm() {
|
||||
const template = require("../Template");
|
||||
return rules.name + await template(rules)
|
||||
}
|
||||
module.exports = diygm
|
||||
413
脚本库/web版/账密/再漫画自动签到/2026-03-02_zaimanhua_d504877a.py
Normal file
413
脚本库/web版/账密/再漫画自动签到/2026-03-02_zaimanhua_d504877a.py
Normal file
@@ -0,0 +1,413 @@
|
||||
# Source: https://github.com/Small-tailqwq/ql_script/blob/master/zaimanhua/zaimanhua.py
|
||||
# Raw: https://raw.githubusercontent.com/Small-tailqwq/ql_script/master/zaimanhua/zaimanhua.py
|
||||
# Repo: Small-tailqwq/ql_script
|
||||
# Path: zaimanhua/zaimanhua.py
|
||||
# UploadedAt: 2026-03-02T11:07:04Z
|
||||
# SHA256: d504877ad0b3be012794bec38536cdaeaab15f83fe8bafcee5d8d9121dce5b8d
|
||||
# Category: web版/账密
|
||||
# Evidence: web/H5关键词 + username/password/login
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
cron: 20 7 * * *
|
||||
new Env('再漫画自动签到');
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import hashlib
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
from dataclasses import dataclass
|
||||
from typing import Any, Dict, Iterable, List, Optional, Tuple
|
||||
|
||||
import requests
|
||||
|
||||
try:
|
||||
from sendNotify import send # type: ignore
|
||||
except Exception: # noqa: BLE001
|
||||
try:
|
||||
from notify import send # type: ignore
|
||||
except Exception:
|
||||
send = None
|
||||
|
||||
|
||||
API_BASE = "https://i.zaimanhua.com/lpi/v1"
|
||||
DEFAULT_TIMEOUT = 15
|
||||
DEBUG_ENABLED = os.getenv("ZAIMANHUA_DEBUG", "0").strip().lower() in {"1", "true", "on", "yes"}
|
||||
|
||||
|
||||
def debug_dump(label: str, payload: Any) -> None:
|
||||
if not DEBUG_ENABLED:
|
||||
return
|
||||
try:
|
||||
fragment = json.dumps(payload, ensure_ascii=False)[:1500]
|
||||
except Exception: # noqa: BLE001
|
||||
fragment = str(payload)[:1500]
|
||||
logging.debug("%s: %s", label, fragment)
|
||||
|
||||
|
||||
@dataclass
|
||||
class SignResult:
|
||||
account: str
|
||||
success: bool
|
||||
message: str
|
||||
|
||||
|
||||
class ZaiManHua:
|
||||
name = "再漫画"
|
||||
|
||||
def __init__(self, username: str, password: str, alias: Optional[str] = None) -> None:
|
||||
self.username = username.strip()
|
||||
self.password = password.strip()
|
||||
self.alias = alias.strip() if alias else ""
|
||||
self.session = self._build_session()
|
||||
|
||||
@staticmethod
|
||||
def _build_session() -> requests.Session:
|
||||
session = requests.Session()
|
||||
session.headers.update(
|
||||
{
|
||||
"User-Agent": (
|
||||
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
|
||||
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0 Safari/537.36"
|
||||
),
|
||||
"Accept": "application/json, text/plain, */*",
|
||||
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||
"Origin": "https://m.zaimanhua.com",
|
||||
"Referer": "https://m.zaimanhua.com/",
|
||||
}
|
||||
)
|
||||
return session
|
||||
|
||||
@staticmethod
|
||||
def _md5(text: str) -> str:
|
||||
return hashlib.md5(text.encode("utf-8")).hexdigest()
|
||||
|
||||
def _request_json(
|
||||
self,
|
||||
method: str,
|
||||
endpoint: str,
|
||||
*,
|
||||
params: Optional[Dict[str, Any]] = None,
|
||||
json_data: Optional[Dict[str, Any]] = None,
|
||||
headers: Optional[Dict[str, str]] = None,
|
||||
) -> Dict[str, Any]:
|
||||
url = endpoint if endpoint.startswith("http") else f"{API_BASE}/{endpoint.lstrip('/') }"
|
||||
if DEBUG_ENABLED:
|
||||
logging.debug(
|
||||
"请求 %s %s params=%s json=%s headers=%s",
|
||||
method,
|
||||
url,
|
||||
params,
|
||||
json_data,
|
||||
headers,
|
||||
)
|
||||
response = self.session.request(
|
||||
method,
|
||||
url,
|
||||
params=params,
|
||||
json=json_data,
|
||||
headers=headers,
|
||||
timeout=DEFAULT_TIMEOUT,
|
||||
)
|
||||
response.raise_for_status()
|
||||
data = response.json()
|
||||
if not isinstance(data, dict): # pragma: no cover - 防御
|
||||
raise ValueError("接口返回数据格式异常")
|
||||
debug_dump(f"响应 {method} {url}", data)
|
||||
return data
|
||||
|
||||
@staticmethod
|
||||
def _ensure_success(payload: Dict[str, Any], allowed_errno: Iterable[int] = (0,)) -> Tuple[int, str]:
|
||||
errno = int(payload.get("errno", -1))
|
||||
errmsg = str(payload.get("errmsg", ""))
|
||||
if errno not in allowed_errno:
|
||||
raise RuntimeError(f"接口返回错误 errno={errno}, errmsg={errmsg}")
|
||||
return errno, errmsg
|
||||
|
||||
@staticmethod
|
||||
def _extract_token(payload: Dict[str, Any]) -> Optional[str]:
|
||||
def _search(node: Any) -> Optional[str]:
|
||||
if isinstance(node, dict):
|
||||
for key, value in node.items():
|
||||
key_lower = str(key).lower()
|
||||
if key_lower in {"token", "access_token"} and isinstance(value, str) and value:
|
||||
return value
|
||||
if isinstance(value, (dict, list)):
|
||||
found = _search(value)
|
||||
if found:
|
||||
return found
|
||||
elif isinstance(node, list):
|
||||
for item in node:
|
||||
found = _search(item)
|
||||
if found:
|
||||
return found
|
||||
return None
|
||||
|
||||
return _search(payload)
|
||||
|
||||
@staticmethod
|
||||
def _find_first(node: Any, target_keys: Iterable[str]) -> Optional[Any]:
|
||||
target = {str(key).lower() for key in target_keys}
|
||||
def _search(current: Any) -> Optional[Any]:
|
||||
if isinstance(current, dict):
|
||||
for key, value in current.items():
|
||||
if str(key).lower() in target and value is not None:
|
||||
return value
|
||||
if isinstance(value, (dict, list)):
|
||||
found = _search(value)
|
||||
if found is not None:
|
||||
return found
|
||||
elif isinstance(current, list):
|
||||
for item in current:
|
||||
found = _search(item)
|
||||
if found is not None:
|
||||
return found
|
||||
return None
|
||||
|
||||
return _search(node)
|
||||
|
||||
def _login(self) -> str:
|
||||
payload = self._request_json(
|
||||
"POST",
|
||||
"login/passwd",
|
||||
params={"username": self.username, "passwd": self._md5(self.password)},
|
||||
)
|
||||
self._ensure_success(payload)
|
||||
token: Optional[str] = None
|
||||
token_source = "未知"
|
||||
data = payload.get("data")
|
||||
if isinstance(data, dict):
|
||||
token = self._extract_token(data)
|
||||
if token:
|
||||
token_source = "data"
|
||||
if not token:
|
||||
token = self._extract_token(payload)
|
||||
if token:
|
||||
token_source = "payload"
|
||||
if not token and self.session.cookies:
|
||||
token = self.session.cookies.get("token") or self.session.cookies.get("Authorization")
|
||||
if token:
|
||||
token_source = "cookies"
|
||||
if not token:
|
||||
snippet = str(payload)[:300]
|
||||
raise RuntimeError(f"登录成功但未返回 token,响应片段:{snippet}")
|
||||
logging.debug("登录成功,token 来源=%s", token_source)
|
||||
return str(token)
|
||||
|
||||
def _sign_in(self, token: str) -> str:
|
||||
payload = self._request_json(
|
||||
"POST",
|
||||
"task/sign_in",
|
||||
headers={"Authorization": f"Bearer {token}"},
|
||||
)
|
||||
_, errmsg = self._ensure_success(payload, allowed_errno=(0, 1))
|
||||
return errmsg or "签到成功"
|
||||
|
||||
def _fetch_user_info(self, token: str) -> Tuple[str, Optional[int]]:
|
||||
payload = self._request_json(
|
||||
"POST",
|
||||
"u_center/passport/message",
|
||||
headers={"Authorization": f"Bearer {token}"},
|
||||
)
|
||||
self._ensure_success(payload)
|
||||
data = payload.get("data")
|
||||
debug_dump("用户信息 payload", payload)
|
||||
if not isinstance(data, dict):
|
||||
raise RuntimeError("用户信息数据格式异常")
|
||||
user_info = data.get("userInfo") or data.get("user") or data
|
||||
if not isinstance(user_info, dict):
|
||||
user_info = {}
|
||||
nickname = str(
|
||||
user_info.get("nickname")
|
||||
or user_info.get("username")
|
||||
or data.get("nickname")
|
||||
or ""
|
||||
)
|
||||
level_value = user_info.get("user_level") or data.get("user_level")
|
||||
if level_value is None:
|
||||
level_value = self._find_first(data, {"user_level", "level"})
|
||||
try:
|
||||
level = int(level_value) if level_value is not None else None
|
||||
except (TypeError, ValueError):
|
||||
level = None
|
||||
return nickname, level
|
||||
|
||||
def _fetch_task_info(self, token: str) -> Tuple[Optional[int], Optional[int], Optional[int]]:
|
||||
payload = self._request_json(
|
||||
"GET",
|
||||
"task/list",
|
||||
headers={"Authorization": f"Bearer {token}"},
|
||||
)
|
||||
self._ensure_success(payload)
|
||||
data = payload.get("data")
|
||||
debug_dump("任务列表 payload", payload)
|
||||
if not isinstance(data, dict):
|
||||
raise RuntimeError("任务列表数据格式异常")
|
||||
user_currency = data.get("userCurrency")
|
||||
if not isinstance(user_currency, dict):
|
||||
task_section = data.get("task")
|
||||
if isinstance(task_section, dict):
|
||||
user_currency = task_section.get("userCurrency")
|
||||
credits = self._safe_int(user_currency, "credits") if isinstance(user_currency, dict) else None
|
||||
if credits is None:
|
||||
found = self._find_first(data, {"credits"})
|
||||
try:
|
||||
credits = int(found) if found is not None else None
|
||||
except (TypeError, ValueError):
|
||||
credits = None
|
||||
|
||||
sum_sign_task = (
|
||||
data.get("sumSignTask")
|
||||
or data.get("signTask")
|
||||
or (data.get("task") or {}).get("sumSignTask")
|
||||
or (data.get("task") or {}).get("signTask")
|
||||
or {}
|
||||
)
|
||||
continuous_days = self._safe_int(sum_sign_task, "continuousSignDays")
|
||||
history_days = self._safe_int(sum_sign_task, "sumSignDays")
|
||||
if continuous_days is None:
|
||||
value = self._find_first(data, {"continuousSignDays", "continuous_days"})
|
||||
try:
|
||||
continuous_days = int(value) if value is not None else None
|
||||
except (TypeError, ValueError):
|
||||
continuous_days = None
|
||||
if history_days is None:
|
||||
value = self._find_first(data, {"sumSignDays", "totalSignDays", "history_days"})
|
||||
try:
|
||||
history_days = int(value) if value is not None else None
|
||||
except (TypeError, ValueError):
|
||||
history_days = None
|
||||
return credits, continuous_days, history_days
|
||||
|
||||
@staticmethod
|
||||
def _safe_int(source: Any, key: str) -> Optional[int]:
|
||||
value: Any = None
|
||||
if isinstance(source, dict):
|
||||
value = source.get(key)
|
||||
try:
|
||||
return int(value) if value is not None else None
|
||||
except (TypeError, ValueError):
|
||||
return None
|
||||
|
||||
@staticmethod
|
||||
def _mask(text: str) -> str:
|
||||
text = text or ""
|
||||
if len(text) <= 2:
|
||||
return f"{text[:1]}*" if text else "未知"
|
||||
return f"{text[0]}***{text[-1]}"
|
||||
|
||||
def main(self) -> SignResult:
|
||||
if not self.username or not self.password:
|
||||
raise RuntimeError("账号或密码未配置")
|
||||
|
||||
token = self._login()
|
||||
sign_msg = self._sign_in(token)
|
||||
nickname, level = self._fetch_user_info(token)
|
||||
credits, continuous_days, history_days = self._fetch_task_info(token)
|
||||
|
||||
display_name = nickname or self.alias or self._mask(self.username)
|
||||
level_info = f"LV{level}" if level is not None else "未知"
|
||||
credit_info = str(credits) if credits is not None else "未知"
|
||||
continuous_info = f"{continuous_days}天" if continuous_days is not None else "未知"
|
||||
history_info = f"{history_days}天" if history_days is not None else "未知"
|
||||
|
||||
lines = [
|
||||
f"签到状态:{sign_msg}",
|
||||
f"用户等级:{level_info}",
|
||||
f"当前积分:{credit_info}",
|
||||
f"连续签到:{continuous_info}",
|
||||
f"历史签到:{history_info}",
|
||||
]
|
||||
|
||||
return SignResult(
|
||||
account=display_name,
|
||||
success=True,
|
||||
message="\n".join(lines),
|
||||
)
|
||||
|
||||
|
||||
def load_accounts() -> List[ZaiManHua]:
|
||||
accounts: List[ZaiManHua] = []
|
||||
|
||||
raw_accounts = os.getenv("ZAIMANHUA_ACCOUNTS", "").strip()
|
||||
if raw_accounts:
|
||||
for line in raw_accounts.splitlines():
|
||||
line = line.strip()
|
||||
if not line or line.startswith("#"):
|
||||
continue
|
||||
parts = line.split("#", 2)
|
||||
if len(parts) < 2:
|
||||
logging.warning("无效的账号配置行:%s,格式应为 用户名#密码[#别名]", line)
|
||||
continue
|
||||
username, password, *rest = parts
|
||||
alias = rest[0] if rest else None
|
||||
accounts.append(ZaiManHua(username=username, password=password, alias=alias))
|
||||
|
||||
username = os.getenv("ZAIMANHUA_USERNAME", "").strip()
|
||||
password = os.getenv("ZAIMANHUA_PASSWORD", "").strip()
|
||||
alias = os.getenv("ZAIMANHUA_ALIAS", "").strip()
|
||||
|
||||
if not accounts and username and password:
|
||||
accounts.append(ZaiManHua(username=username, password=password, alias=alias))
|
||||
|
||||
return accounts
|
||||
|
||||
|
||||
def format_report(results: List[SignResult]) -> str:
|
||||
chunks = []
|
||||
for item in results:
|
||||
status = "✅ 成功" if item.success else "❌ 失败"
|
||||
chunks.append(f"账号:{item.account} | {status}\n{item.message}")
|
||||
return "\n\n".join(chunks)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
logging.basicConfig(
|
||||
level=logging.DEBUG if DEBUG_ENABLED else logging.INFO,
|
||||
format="%(asctime)s [%(levelname)s] %(message)s",
|
||||
)
|
||||
if DEBUG_ENABLED:
|
||||
logging.debug("调试模式已开启 (ZAIMANHUA_DEBUG=1)")
|
||||
|
||||
accounts = load_accounts()
|
||||
if DEBUG_ENABLED and accounts:
|
||||
masked_accounts = [
|
||||
{
|
||||
"username": ZaiManHua._mask(acc.username),
|
||||
"alias": acc.alias,
|
||||
}
|
||||
for acc in accounts
|
||||
]
|
||||
debug_dump("已加载账号", masked_accounts)
|
||||
if not accounts:
|
||||
logging.error("未配置再漫画账号信息,需设置 ZAIMANHUA_ACCOUNTS 或 ZAIMANHUA_USERNAME/ZAIMANHUA_PASSWORD。")
|
||||
if send:
|
||||
send("再漫画签到", "未配置账号信息,任务未执行。")
|
||||
return
|
||||
|
||||
results: List[SignResult] = []
|
||||
for index, account in enumerate(accounts, start=1):
|
||||
try:
|
||||
logging.info("[%s] 正在执行账号 %s", index, account.alias or account.username)
|
||||
results.append(account.main())
|
||||
except Exception as exc: # noqa: BLE001
|
||||
logging.exception("[%s] 账号 %s 执行失败:%s", index, account.alias or account.username, exc)
|
||||
results.append(
|
||||
SignResult(
|
||||
account=account.alias or account.username,
|
||||
success=False,
|
||||
message=str(exc),
|
||||
)
|
||||
)
|
||||
|
||||
report = format_report(results)
|
||||
logging.info("\n%s", report)
|
||||
if send:
|
||||
send("再漫画签到", report)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
42
脚本库/web版/账密/天使动漫_,/2023-11-01_tsdm_c051ba94.js
Normal file
42
脚本库/web版/账密/天使动漫_,/2023-11-01_tsdm_c051ba94.js
Normal file
@@ -0,0 +1,42 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/tsdm.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/tsdm.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/tsdm.js
|
||||
// # UploadedAt: 2023-11-01T04:40:54Z
|
||||
// # SHA256: c051ba94048fcba570f5b35beea78d89b8bb9350f5ac8f4d8c258efd07d1bd3d
|
||||
// # Category: web版/账密
|
||||
// # Evidence: web/H5关键词 + username/password/login
|
||||
//
|
||||
|
||||
const rules = {
|
||||
name: "【天使动漫】: ",
|
||||
cookie: config.tsdm.cookie,
|
||||
url: "https://www.tsdm39.com/plugin.php?id=dsu_paulsign:sign&mobile=yes", //用于获取formhash的链接
|
||||
formhash: 'formhash=(.+?)\&', //formhash正则
|
||||
verify: "您需要先登录才能继续本操作", //验证cookie状态
|
||||
op: [{
|
||||
name: "签到",
|
||||
method: "post",
|
||||
url: "https://www.tsdm39.com/plugin.php?id=dsu_paulsign:sign&operation=qiandao&infloat=0&inajax=0&mobile=yes", //签到链接
|
||||
data: "formhash=@formhash&qdxq=kx&qdmode=3&todaysay=&fastreply=1"
|
||||
},
|
||||
{
|
||||
name: "打工",
|
||||
ua: "pc",
|
||||
method: "post",
|
||||
url: "https://www.tsdm39.com/plugin.php?id=np_cliworkdz:work",
|
||||
data: "act=getcre"
|
||||
}]
|
||||
};
|
||||
async function tsdm() {
|
||||
var sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
|
||||
const template = await require("../Template");
|
||||
for(i=0;i<8;i++) {
|
||||
let dg= await require("axios").post("https://www.tsdm39.com/plugin.php?id=np_cliworkdz:work","act=clickad", {headers: {cookie: rules.cookie,referer: rules.url,"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.105 Safari/537.36"}})
|
||||
if((""+dg.data).match(/才可再次进行。/)) break;
|
||||
console.log("第"+(i+1)+"次打工:"+dg.data)
|
||||
await sleep(1500)
|
||||
}
|
||||
return rules.name + await template(rules)
|
||||
}
|
||||
module.exports = tsdm
|
||||
32
脚本库/web版/账密/富贵论坛_,/2022-02-05_fglt_c47d543e.js
Normal file
32
脚本库/web版/账密/富贵论坛_,/2022-02-05_fglt_c47d543e.js
Normal file
@@ -0,0 +1,32 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/fglt.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/fglt.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/fglt.js
|
||||
// # UploadedAt: 2022-02-05T01:15:13Z
|
||||
// # SHA256: c47d543eddc49c5adc9d12127c9fda6edb42b4bb2c0269c5ced70d5ca23de0eb
|
||||
// # Category: web版/账密
|
||||
// # Evidence: web/H5关键词 + username/password/login
|
||||
//
|
||||
|
||||
//每整点可签
|
||||
|
||||
const rules = {
|
||||
name: "【富贵论坛】: ",
|
||||
url: "https://www.fglt.net/forum.php", //用于获取formhash的链接
|
||||
cookie: config.fglt.cookie,
|
||||
formhash: 'formhash=(.+?)\\"', //formhash正则
|
||||
verify: "使用QQ帐号登录", //验证cookie状态
|
||||
op: [{
|
||||
name: "签到",
|
||||
method: "get", //签到请求方式 get/post
|
||||
url: "https://www.fglt.net/plugin.php?id=dsu_amupper&ppersubmit=true&formhash=@formhash&mobile=2",
|
||||
reg3: "<p class=\"f_c\">(.+?)<\\/p>", //签到成功判断
|
||||
info: "<p class=\"f_c\">(.+?)<\/p>", //签到成功返回信息
|
||||
}]
|
||||
};
|
||||
|
||||
async function fglt() {
|
||||
const template = require("../Template");
|
||||
return rules.name + await template(rules)
|
||||
}
|
||||
module.exports = fglt
|
||||
414
脚本库/web版/账密/汽水音乐签到/2026-05-16_qishui_sign_15ff394f.js
Normal file
414
脚本库/web版/账密/汽水音乐签到/2026-05-16_qishui_sign_15ff394f.js
Normal file
@@ -0,0 +1,414 @@
|
||||
// # Source: https://github.com/DearSong15/ql-scripts/blob/main/qishui_sign.js
|
||||
// # Raw: https://raw.githubusercontent.com/DearSong15/ql-scripts/main/qishui_sign.js
|
||||
// # Repo: DearSong15/ql-scripts
|
||||
// # Path: qishui_sign.js
|
||||
// # UploadedAt: 2026-05-16T08:31:47Z
|
||||
// # SHA256: 15ff394f543458209ed6fb1e4728546095fe755dd2b80c941b72fad6214da922
|
||||
// # Category: web版/账密
|
||||
// # Evidence: web/H5关键词 + username/password/login
|
||||
//
|
||||
|
||||
//new Env("汽水音乐签到")
|
||||
/*
|
||||
汽水音乐自动签到脚本 - 青龙面板版本
|
||||
版本: v1.0
|
||||
功能: 签到、看广告、做任务、防封
|
||||
|
||||
========================= 使用说明 =========================
|
||||
|
||||
【第一步】抓包获取Cookie
|
||||
1. 手机打开HttpCanary抓包工具
|
||||
2. 打开汽水音乐APP,登录账号
|
||||
3. 停止抓包,搜索关键词 "sessionid" 或 "cookie"
|
||||
4. 找到类似这样的值:
|
||||
sessionid=xxxxx; uid_tt=xxxxx; sid_tt=xxxxx
|
||||
5. 复制完整的Cookie字符串
|
||||
|
||||
【第二步】青龙面板添加环境变量
|
||||
1. 登录青龙面板
|
||||
2. 左侧菜单: 环境变量
|
||||
3. 新建变量:
|
||||
- 变量名: QS_COOKIE
|
||||
- 变量值: 你抓包获取的Cookie
|
||||
4. 支持多账号,用 @@@ 分隔
|
||||
|
||||
【第三步】创建定时任务
|
||||
1. 左侧菜单: 定时任务
|
||||
2. 新建任务:
|
||||
- 名称: 汽水音乐自动任务
|
||||
- 命令: task qishui_sign.js
|
||||
- 定时: 0 0-23/6 * * * (每6小时)
|
||||
- 脚本类型: Nodejs
|
||||
|
||||
============================================================
|
||||
*/
|
||||
|
||||
const https = require('https');
|
||||
const http = require('http');
|
||||
const crypto = require('crypto');
|
||||
|
||||
// ==================== 配置 ====================
|
||||
const COOKIE_VAR = process.env.QS_COOKIE || '';
|
||||
const API_BASE = 'https://api-ss.feishu.cn';
|
||||
const APP_VERSION = '3.0.0';
|
||||
|
||||
// 防封配置
|
||||
const DELAY_MIN = 2000; // 最小延迟(ms)
|
||||
const DELAY_MAX = 5000; // 最大延迟(ms)
|
||||
const RETRY_TIMES = 3;
|
||||
|
||||
// ==================== 工具函数 ====================
|
||||
function delay(ms) {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
function randomDelay() {
|
||||
const t = Math.floor(Math.random() * (DELAY_MAX - DELAY_MIN + 1)) + DELAY_MIN;
|
||||
return delay(t);
|
||||
}
|
||||
|
||||
function getTimestamp() {
|
||||
return Date.now().toString();
|
||||
}
|
||||
|
||||
function md5(str) {
|
||||
return crypto.createHash('md5').update(str).digest('hex');
|
||||
}
|
||||
|
||||
function generateDeviceId() {
|
||||
return md5(getTimestamp() + Math.random().toString()).substring(0, 16);
|
||||
}
|
||||
|
||||
// ==================== HTTP请求 ====================
|
||||
function httpRequest(url, method, headers, data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const urlObj = new URL(url);
|
||||
const isHttps = url.startsWith('https');
|
||||
const client = isHttps ? https : http;
|
||||
|
||||
const options = {
|
||||
hostname: urlObj.hostname,
|
||||
port: urlObj.port || (isHttps ? 443 : 80),
|
||||
path: urlObj.pathname + urlObj.search,
|
||||
method: method,
|
||||
headers: {
|
||||
'User-Agent': 'Mozilla/5.0 (Linux; Android 12; OnePlus ACE5 Build/SKQ1.211217.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/107.0.5304.105 Mobile Safari/537.36 Ssrunner/1.0 ByteEngine/3.4.8.2 AppVersion/3.0.0.4 NetType/WIFI Robinson/1.0 Locale/zh-CN',
|
||||
'Content-Type': 'application/json; charset=utf-8',
|
||||
'Accept': 'application/json, text/plain, */*',
|
||||
'Accept-Encoding': 'gzip, deflate, br',
|
||||
'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8',
|
||||
'Referer': 'https://ss.feishu.cn/',
|
||||
'Origin': 'https://ss.feishu.cn',
|
||||
...headers
|
||||
}
|
||||
};
|
||||
|
||||
const req = client.request(options, (res) => {
|
||||
let body = '';
|
||||
res.on('data', chunk => body += chunk);
|
||||
res.on('end', () => {
|
||||
try {
|
||||
resolve(JSON.parse(body));
|
||||
} catch (e) {
|
||||
resolve({ raw: body });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
req.on('error', reject);
|
||||
req.setTimeout(10000, () => reject(new Error('Request timeout')));
|
||||
|
||||
if (data) {
|
||||
req.write(JSON.stringify(data));
|
||||
}
|
||||
req.end();
|
||||
});
|
||||
}
|
||||
|
||||
// ==================== Cookie解析 ====================
|
||||
function parseCookies(cookieStr) {
|
||||
if (!cookieStr) return [];
|
||||
return cookieStr.split('@@@').map(c => c.trim()).filter(c => c.length > 0);
|
||||
}
|
||||
|
||||
function buildHeaders(cookie) {
|
||||
return {
|
||||
'Cookie': cookie,
|
||||
'X-SS-TC': '0',
|
||||
'X-Tim': getTimestamp(),
|
||||
'X-Device-Id': generateDeviceId()
|
||||
};
|
||||
}
|
||||
|
||||
// ==================== 核心功能 ====================
|
||||
|
||||
// 获取用户信息
|
||||
async function getUserInfo(cookie) {
|
||||
console.log('[📱] 获取用户信息...');
|
||||
try {
|
||||
const headers = buildHeaders(cookie);
|
||||
const data = await httpRequest(
|
||||
`${API_BASE}/api/user/info`,
|
||||
'GET',
|
||||
headers
|
||||
);
|
||||
|
||||
if (data.status === 0) {
|
||||
const user = data.data || {};
|
||||
console.log(` 👤 用户: ${user.username || '未知'}`);
|
||||
console.log(` 💰 金币: ${user.coins || 0}`);
|
||||
console.log(` ⭐ 等级: Lv${user.level || 0}`);
|
||||
return user;
|
||||
} else {
|
||||
console.log(` ⚠️ 获取失败: ${data.message || '未知错误'}`);
|
||||
return null;
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(` ❌ 异常: ${e.message}`);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// 检查签到状态
|
||||
async function checkSignStatus(cookie) {
|
||||
console.log('[📝] 检查签到状态...');
|
||||
try {
|
||||
const headers = buildHeaders(cookie);
|
||||
const data = await httpRequest(
|
||||
`${API_BASE}/api/sign/status`,
|
||||
'GET',
|
||||
headers
|
||||
);
|
||||
|
||||
if (data.status === 0) {
|
||||
const signed = data.data?.signed_today;
|
||||
console.log(` ${signed ? '✅' : '⭕'} 今日${signed ? '已签到' : '未签到'}`);
|
||||
return signed;
|
||||
}
|
||||
return false;
|
||||
} catch (e) {
|
||||
console.log(` ⚠️ 检查异常: ${e.message}`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 签到
|
||||
async function signIn(cookie) {
|
||||
console.log('[🎁] 执行签到...');
|
||||
try {
|
||||
const headers = buildHeaders(cookie);
|
||||
const postData = {
|
||||
timestamp: getTimestamp(),
|
||||
device_id: generateDeviceId()
|
||||
};
|
||||
|
||||
const data = await httpRequest(
|
||||
`${API_BASE}/api/sign/signin`,
|
||||
'POST',
|
||||
headers,
|
||||
postData
|
||||
);
|
||||
|
||||
if (data.status === 0) {
|
||||
const coins = data.data?.coins || 0;
|
||||
console.log(` ✅ 签到成功! +${coins}金币`);
|
||||
return true;
|
||||
} else {
|
||||
console.log(` ❌ 签到失败: ${data.message || '未知错误'}`);
|
||||
return false;
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(` ❌ 签到异常: ${e.message}`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 看广告
|
||||
async function watchAds(cookie) {
|
||||
console.log('[📺] 观看广告...');
|
||||
|
||||
const adList = [
|
||||
{ id: 'ad_video_01', name: '广告视频1' },
|
||||
{ id: 'ad_video_02', name: '广告视频2' },
|
||||
{ id: 'ad_video_03', name: '广告视频3' },
|
||||
{ id: 'ad_splash_01', name: '开屏广告1' },
|
||||
{ id: 'ad_splash_02', name: '开屏广告2' },
|
||||
{ id: 'ad_reward_01', name: '激励视频1' }
|
||||
];
|
||||
|
||||
let successCount = 0;
|
||||
|
||||
for (const ad of adList) {
|
||||
console.log(` ▶️ 观看: ${ad.name}...`);
|
||||
try {
|
||||
const headers = buildHeaders(cookie);
|
||||
const postData = {
|
||||
ad_id: ad.id,
|
||||
timestamp: getTimestamp(),
|
||||
duration: Math.floor(Math.random() * 10) + 25
|
||||
};
|
||||
|
||||
await randomDelay();
|
||||
|
||||
const data = await httpRequest(
|
||||
`${API_BASE}/api/ad/reward`,
|
||||
'POST',
|
||||
headers,
|
||||
postData
|
||||
);
|
||||
|
||||
if (data.status === 0) {
|
||||
const coins = data.data?.coins || 0;
|
||||
console.log(` ✅ 完成! +${coins}金币`);
|
||||
successCount++;
|
||||
} else {
|
||||
console.log(` ⚠️ ${data.message || '已完成或不可用'}`);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(` ❌ 异常: ${e.message}`);
|
||||
}
|
||||
|
||||
await randomDelay();
|
||||
}
|
||||
|
||||
console.log(` 📊 广告完成: ${successCount}/${adList.length}`);
|
||||
return successCount;
|
||||
}
|
||||
|
||||
// 做任务
|
||||
async function doTasks(cookie) {
|
||||
console.log('[📋] 执行任务...');
|
||||
|
||||
const tasks = [
|
||||
{ api: '/api/task/listen', name: '听歌任务', coins: 20 },
|
||||
{ api: '/api/task/share', name: '分享任务', coins: 10 },
|
||||
{ api: '/api/task/favorite', name: '收藏任务', coins: 5 },
|
||||
{ api: '/api/task/comment', name: '评论任务', coins: 8 },
|
||||
{ api: '/api/task/daily', name: '日常任务', coins: 15 }
|
||||
];
|
||||
|
||||
let totalCoins = 0;
|
||||
|
||||
for (const task of tasks) {
|
||||
try {
|
||||
const headers = buildHeaders(cookie);
|
||||
const postData = {
|
||||
timestamp: getTimestamp(),
|
||||
device_id: generateDeviceId()
|
||||
};
|
||||
|
||||
await randomDelay();
|
||||
|
||||
const data = await httpRequest(
|
||||
`${API_BASE}${task.api}`,
|
||||
'POST',
|
||||
headers,
|
||||
postData
|
||||
);
|
||||
|
||||
if (data.status === 0) {
|
||||
const coins = data.data?.coins || task.coins;
|
||||
totalCoins += coins;
|
||||
console.log(` ✅ ${task.name}: +${coins}金币`);
|
||||
} else {
|
||||
console.log(` ⏭️ ${task.name}: ${data.message || '已完成'}`);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(` ❌ ${task.name}异常: ${e.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
console.log(` 📊 任务收益: +${totalCoins}金币`);
|
||||
return totalCoins;
|
||||
}
|
||||
|
||||
// 获取金币明细
|
||||
async function getCoinDetail(cookie) {
|
||||
console.log('[💰] 获取金币明细...');
|
||||
try {
|
||||
const headers = buildHeaders(cookie);
|
||||
const data = await httpRequest(
|
||||
`${API_BASE}/api/coin/detail`,
|
||||
'GET',
|
||||
headers
|
||||
);
|
||||
|
||||
if (data.status === 0) {
|
||||
const detail = data.data || {};
|
||||
console.log(` 今日收益: ${detail.today || 0}`);
|
||||
console.log(` 本周收益: ${detail.week || 0}`);
|
||||
console.log(` 总金币: ${detail.total || 0}`);
|
||||
return detail;
|
||||
}
|
||||
return null;
|
||||
} catch (e) {
|
||||
console.log(` ⚠️ 获取异常: ${e.message}`);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// ==================== 主函数 ====================
|
||||
async function main() {
|
||||
console.log('\n========================================');
|
||||
console.log(' 🎵 汽水音乐自动任务脚本 v1.0');
|
||||
console.log('========================================\n');
|
||||
console.log(`⏰ 执行时间: ${new Date().toLocaleString('zh-CN')}\n`);
|
||||
|
||||
const cookies = parseCookies(COOKIE_VAR);
|
||||
|
||||
if (cookies.length === 0) {
|
||||
console.log('❌ 错误: 未找到 QS_COOKIE 环境变量!');
|
||||
console.log('\n请在青龙面板添加环境变量:');
|
||||
console.log(' 变量名: QS_COOKIE');
|
||||
console.log(' 变量值: 抓包获取的Cookie');
|
||||
console.log(' 多账号: 用 @@@ 分隔');
|
||||
console.log('\n========================================\n');
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`📱 检测到 ${cookies.length} 个账号\n`);
|
||||
|
||||
let totalCoins = 0;
|
||||
|
||||
for (let i = 0; i < cookies.length; i++) {
|
||||
if (cookies.length > 1) {
|
||||
console.log(`\n========== 账号 ${i + 1}/${cookies.length} ==========\n`);
|
||||
}
|
||||
|
||||
const cookie = cookies[i];
|
||||
|
||||
await getUserInfo(cookie);
|
||||
await randomDelay();
|
||||
|
||||
const signed = await checkSignStatus(cookie);
|
||||
await randomDelay();
|
||||
|
||||
if (!signed) {
|
||||
await signIn(cookie);
|
||||
} else {
|
||||
console.log('[⏭️] 跳过签到(今日已签到)');
|
||||
}
|
||||
await randomDelay();
|
||||
|
||||
await watchAds(cookie);
|
||||
await randomDelay();
|
||||
|
||||
const taskCoins = await doTasks(cookie);
|
||||
totalCoins += taskCoins;
|
||||
await randomDelay();
|
||||
|
||||
await getCoinDetail(cookie);
|
||||
}
|
||||
|
||||
console.log('\n========================================');
|
||||
console.log(' 🎉 任务执行完成!');
|
||||
console.log('========================================');
|
||||
console.log(`\n📊 本次运行获得金币: ~${totalCoins}`);
|
||||
console.log('\n💡 定时任务建议:');
|
||||
console.log(' 格式: 0 0-23/6 * * *');
|
||||
console.log(' 说明: 每6小时执行一次');
|
||||
console.log(' 时间: 0:00, 6:00, 12:00, 18:00');
|
||||
console.log('\n========================================\n');
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
||||
414
脚本库/web版/账密/汽水音乐签到/2026-05-16_qishui_sign_15ff394f_2.js
Normal file
414
脚本库/web版/账密/汽水音乐签到/2026-05-16_qishui_sign_15ff394f_2.js
Normal file
@@ -0,0 +1,414 @@
|
||||
// # Source: https://github.com/DearSong15/ql-scripts/blob/main/qishui_sign.js
|
||||
// # Raw: https://raw.githubusercontent.com/DearSong15/ql-scripts/main/qishui_sign.js
|
||||
// # Repo: DearSong15/ql-scripts
|
||||
// # Path: qishui_sign.js
|
||||
// # UploadedAt: 2026-05-16T08:31:47Z
|
||||
// # SHA256: 15ff394f543458209ed6fb1e4728546095fe755dd2b80c941b72fad6214da922
|
||||
// # Category: web版/账密
|
||||
// # Evidence: web/H5关键词 + username/password/login
|
||||
//
|
||||
|
||||
//new Env("汽水音乐签到")
|
||||
/*
|
||||
汽水音乐自动签到脚本 - 青龙面板版本
|
||||
版本: v1.0
|
||||
功能: 签到、看广告、做任务、防封
|
||||
|
||||
========================= 使用说明 =========================
|
||||
|
||||
【第一步】抓包获取Cookie
|
||||
1. 手机打开HttpCanary抓包工具
|
||||
2. 打开汽水音乐APP,登录账号
|
||||
3. 停止抓包,搜索关键词 "sessionid" 或 "cookie"
|
||||
4. 找到类似这样的值:
|
||||
sessionid=xxxxx; uid_tt=xxxxx; sid_tt=xxxxx
|
||||
5. 复制完整的Cookie字符串
|
||||
|
||||
【第二步】青龙面板添加环境变量
|
||||
1. 登录青龙面板
|
||||
2. 左侧菜单: 环境变量
|
||||
3. 新建变量:
|
||||
- 变量名: QS_COOKIE
|
||||
- 变量值: 你抓包获取的Cookie
|
||||
4. 支持多账号,用 @@@ 分隔
|
||||
|
||||
【第三步】创建定时任务
|
||||
1. 左侧菜单: 定时任务
|
||||
2. 新建任务:
|
||||
- 名称: 汽水音乐自动任务
|
||||
- 命令: task qishui_sign.js
|
||||
- 定时: 0 0-23/6 * * * (每6小时)
|
||||
- 脚本类型: Nodejs
|
||||
|
||||
============================================================
|
||||
*/
|
||||
|
||||
const https = require('https');
|
||||
const http = require('http');
|
||||
const crypto = require('crypto');
|
||||
|
||||
// ==================== 配置 ====================
|
||||
const COOKIE_VAR = process.env.QS_COOKIE || '';
|
||||
const API_BASE = 'https://api-ss.feishu.cn';
|
||||
const APP_VERSION = '3.0.0';
|
||||
|
||||
// 防封配置
|
||||
const DELAY_MIN = 2000; // 最小延迟(ms)
|
||||
const DELAY_MAX = 5000; // 最大延迟(ms)
|
||||
const RETRY_TIMES = 3;
|
||||
|
||||
// ==================== 工具函数 ====================
|
||||
function delay(ms) {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
function randomDelay() {
|
||||
const t = Math.floor(Math.random() * (DELAY_MAX - DELAY_MIN + 1)) + DELAY_MIN;
|
||||
return delay(t);
|
||||
}
|
||||
|
||||
function getTimestamp() {
|
||||
return Date.now().toString();
|
||||
}
|
||||
|
||||
function md5(str) {
|
||||
return crypto.createHash('md5').update(str).digest('hex');
|
||||
}
|
||||
|
||||
function generateDeviceId() {
|
||||
return md5(getTimestamp() + Math.random().toString()).substring(0, 16);
|
||||
}
|
||||
|
||||
// ==================== HTTP请求 ====================
|
||||
function httpRequest(url, method, headers, data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const urlObj = new URL(url);
|
||||
const isHttps = url.startsWith('https');
|
||||
const client = isHttps ? https : http;
|
||||
|
||||
const options = {
|
||||
hostname: urlObj.hostname,
|
||||
port: urlObj.port || (isHttps ? 443 : 80),
|
||||
path: urlObj.pathname + urlObj.search,
|
||||
method: method,
|
||||
headers: {
|
||||
'User-Agent': 'Mozilla/5.0 (Linux; Android 12; OnePlus ACE5 Build/SKQ1.211217.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/107.0.5304.105 Mobile Safari/537.36 Ssrunner/1.0 ByteEngine/3.4.8.2 AppVersion/3.0.0.4 NetType/WIFI Robinson/1.0 Locale/zh-CN',
|
||||
'Content-Type': 'application/json; charset=utf-8',
|
||||
'Accept': 'application/json, text/plain, */*',
|
||||
'Accept-Encoding': 'gzip, deflate, br',
|
||||
'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8',
|
||||
'Referer': 'https://ss.feishu.cn/',
|
||||
'Origin': 'https://ss.feishu.cn',
|
||||
...headers
|
||||
}
|
||||
};
|
||||
|
||||
const req = client.request(options, (res) => {
|
||||
let body = '';
|
||||
res.on('data', chunk => body += chunk);
|
||||
res.on('end', () => {
|
||||
try {
|
||||
resolve(JSON.parse(body));
|
||||
} catch (e) {
|
||||
resolve({ raw: body });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
req.on('error', reject);
|
||||
req.setTimeout(10000, () => reject(new Error('Request timeout')));
|
||||
|
||||
if (data) {
|
||||
req.write(JSON.stringify(data));
|
||||
}
|
||||
req.end();
|
||||
});
|
||||
}
|
||||
|
||||
// ==================== Cookie解析 ====================
|
||||
function parseCookies(cookieStr) {
|
||||
if (!cookieStr) return [];
|
||||
return cookieStr.split('@@@').map(c => c.trim()).filter(c => c.length > 0);
|
||||
}
|
||||
|
||||
function buildHeaders(cookie) {
|
||||
return {
|
||||
'Cookie': cookie,
|
||||
'X-SS-TC': '0',
|
||||
'X-Tim': getTimestamp(),
|
||||
'X-Device-Id': generateDeviceId()
|
||||
};
|
||||
}
|
||||
|
||||
// ==================== 核心功能 ====================
|
||||
|
||||
// 获取用户信息
|
||||
async function getUserInfo(cookie) {
|
||||
console.log('[📱] 获取用户信息...');
|
||||
try {
|
||||
const headers = buildHeaders(cookie);
|
||||
const data = await httpRequest(
|
||||
`${API_BASE}/api/user/info`,
|
||||
'GET',
|
||||
headers
|
||||
);
|
||||
|
||||
if (data.status === 0) {
|
||||
const user = data.data || {};
|
||||
console.log(` 👤 用户: ${user.username || '未知'}`);
|
||||
console.log(` 💰 金币: ${user.coins || 0}`);
|
||||
console.log(` ⭐ 等级: Lv${user.level || 0}`);
|
||||
return user;
|
||||
} else {
|
||||
console.log(` ⚠️ 获取失败: ${data.message || '未知错误'}`);
|
||||
return null;
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(` ❌ 异常: ${e.message}`);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// 检查签到状态
|
||||
async function checkSignStatus(cookie) {
|
||||
console.log('[📝] 检查签到状态...');
|
||||
try {
|
||||
const headers = buildHeaders(cookie);
|
||||
const data = await httpRequest(
|
||||
`${API_BASE}/api/sign/status`,
|
||||
'GET',
|
||||
headers
|
||||
);
|
||||
|
||||
if (data.status === 0) {
|
||||
const signed = data.data?.signed_today;
|
||||
console.log(` ${signed ? '✅' : '⭕'} 今日${signed ? '已签到' : '未签到'}`);
|
||||
return signed;
|
||||
}
|
||||
return false;
|
||||
} catch (e) {
|
||||
console.log(` ⚠️ 检查异常: ${e.message}`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 签到
|
||||
async function signIn(cookie) {
|
||||
console.log('[🎁] 执行签到...');
|
||||
try {
|
||||
const headers = buildHeaders(cookie);
|
||||
const postData = {
|
||||
timestamp: getTimestamp(),
|
||||
device_id: generateDeviceId()
|
||||
};
|
||||
|
||||
const data = await httpRequest(
|
||||
`${API_BASE}/api/sign/signin`,
|
||||
'POST',
|
||||
headers,
|
||||
postData
|
||||
);
|
||||
|
||||
if (data.status === 0) {
|
||||
const coins = data.data?.coins || 0;
|
||||
console.log(` ✅ 签到成功! +${coins}金币`);
|
||||
return true;
|
||||
} else {
|
||||
console.log(` ❌ 签到失败: ${data.message || '未知错误'}`);
|
||||
return false;
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(` ❌ 签到异常: ${e.message}`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 看广告
|
||||
async function watchAds(cookie) {
|
||||
console.log('[📺] 观看广告...');
|
||||
|
||||
const adList = [
|
||||
{ id: 'ad_video_01', name: '广告视频1' },
|
||||
{ id: 'ad_video_02', name: '广告视频2' },
|
||||
{ id: 'ad_video_03', name: '广告视频3' },
|
||||
{ id: 'ad_splash_01', name: '开屏广告1' },
|
||||
{ id: 'ad_splash_02', name: '开屏广告2' },
|
||||
{ id: 'ad_reward_01', name: '激励视频1' }
|
||||
];
|
||||
|
||||
let successCount = 0;
|
||||
|
||||
for (const ad of adList) {
|
||||
console.log(` ▶️ 观看: ${ad.name}...`);
|
||||
try {
|
||||
const headers = buildHeaders(cookie);
|
||||
const postData = {
|
||||
ad_id: ad.id,
|
||||
timestamp: getTimestamp(),
|
||||
duration: Math.floor(Math.random() * 10) + 25
|
||||
};
|
||||
|
||||
await randomDelay();
|
||||
|
||||
const data = await httpRequest(
|
||||
`${API_BASE}/api/ad/reward`,
|
||||
'POST',
|
||||
headers,
|
||||
postData
|
||||
);
|
||||
|
||||
if (data.status === 0) {
|
||||
const coins = data.data?.coins || 0;
|
||||
console.log(` ✅ 完成! +${coins}金币`);
|
||||
successCount++;
|
||||
} else {
|
||||
console.log(` ⚠️ ${data.message || '已完成或不可用'}`);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(` ❌ 异常: ${e.message}`);
|
||||
}
|
||||
|
||||
await randomDelay();
|
||||
}
|
||||
|
||||
console.log(` 📊 广告完成: ${successCount}/${adList.length}`);
|
||||
return successCount;
|
||||
}
|
||||
|
||||
// 做任务
|
||||
async function doTasks(cookie) {
|
||||
console.log('[📋] 执行任务...');
|
||||
|
||||
const tasks = [
|
||||
{ api: '/api/task/listen', name: '听歌任务', coins: 20 },
|
||||
{ api: '/api/task/share', name: '分享任务', coins: 10 },
|
||||
{ api: '/api/task/favorite', name: '收藏任务', coins: 5 },
|
||||
{ api: '/api/task/comment', name: '评论任务', coins: 8 },
|
||||
{ api: '/api/task/daily', name: '日常任务', coins: 15 }
|
||||
];
|
||||
|
||||
let totalCoins = 0;
|
||||
|
||||
for (const task of tasks) {
|
||||
try {
|
||||
const headers = buildHeaders(cookie);
|
||||
const postData = {
|
||||
timestamp: getTimestamp(),
|
||||
device_id: generateDeviceId()
|
||||
};
|
||||
|
||||
await randomDelay();
|
||||
|
||||
const data = await httpRequest(
|
||||
`${API_BASE}${task.api}`,
|
||||
'POST',
|
||||
headers,
|
||||
postData
|
||||
);
|
||||
|
||||
if (data.status === 0) {
|
||||
const coins = data.data?.coins || task.coins;
|
||||
totalCoins += coins;
|
||||
console.log(` ✅ ${task.name}: +${coins}金币`);
|
||||
} else {
|
||||
console.log(` ⏭️ ${task.name}: ${data.message || '已完成'}`);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(` ❌ ${task.name}异常: ${e.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
console.log(` 📊 任务收益: +${totalCoins}金币`);
|
||||
return totalCoins;
|
||||
}
|
||||
|
||||
// 获取金币明细
|
||||
async function getCoinDetail(cookie) {
|
||||
console.log('[💰] 获取金币明细...');
|
||||
try {
|
||||
const headers = buildHeaders(cookie);
|
||||
const data = await httpRequest(
|
||||
`${API_BASE}/api/coin/detail`,
|
||||
'GET',
|
||||
headers
|
||||
);
|
||||
|
||||
if (data.status === 0) {
|
||||
const detail = data.data || {};
|
||||
console.log(` 今日收益: ${detail.today || 0}`);
|
||||
console.log(` 本周收益: ${detail.week || 0}`);
|
||||
console.log(` 总金币: ${detail.total || 0}`);
|
||||
return detail;
|
||||
}
|
||||
return null;
|
||||
} catch (e) {
|
||||
console.log(` ⚠️ 获取异常: ${e.message}`);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// ==================== 主函数 ====================
|
||||
async function main() {
|
||||
console.log('\n========================================');
|
||||
console.log(' 🎵 汽水音乐自动任务脚本 v1.0');
|
||||
console.log('========================================\n');
|
||||
console.log(`⏰ 执行时间: ${new Date().toLocaleString('zh-CN')}\n`);
|
||||
|
||||
const cookies = parseCookies(COOKIE_VAR);
|
||||
|
||||
if (cookies.length === 0) {
|
||||
console.log('❌ 错误: 未找到 QS_COOKIE 环境变量!');
|
||||
console.log('\n请在青龙面板添加环境变量:');
|
||||
console.log(' 变量名: QS_COOKIE');
|
||||
console.log(' 变量值: 抓包获取的Cookie');
|
||||
console.log(' 多账号: 用 @@@ 分隔');
|
||||
console.log('\n========================================\n');
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`📱 检测到 ${cookies.length} 个账号\n`);
|
||||
|
||||
let totalCoins = 0;
|
||||
|
||||
for (let i = 0; i < cookies.length; i++) {
|
||||
if (cookies.length > 1) {
|
||||
console.log(`\n========== 账号 ${i + 1}/${cookies.length} ==========\n`);
|
||||
}
|
||||
|
||||
const cookie = cookies[i];
|
||||
|
||||
await getUserInfo(cookie);
|
||||
await randomDelay();
|
||||
|
||||
const signed = await checkSignStatus(cookie);
|
||||
await randomDelay();
|
||||
|
||||
if (!signed) {
|
||||
await signIn(cookie);
|
||||
} else {
|
||||
console.log('[⏭️] 跳过签到(今日已签到)');
|
||||
}
|
||||
await randomDelay();
|
||||
|
||||
await watchAds(cookie);
|
||||
await randomDelay();
|
||||
|
||||
const taskCoins = await doTasks(cookie);
|
||||
totalCoins += taskCoins;
|
||||
await randomDelay();
|
||||
|
||||
await getCoinDetail(cookie);
|
||||
}
|
||||
|
||||
console.log('\n========================================');
|
||||
console.log(' 🎉 任务执行完成!');
|
||||
console.log('========================================');
|
||||
console.log(`\n📊 本次运行获得金币: ~${totalCoins}`);
|
||||
console.log('\n💡 定时任务建议:');
|
||||
console.log(' 格式: 0 0-23/6 * * *');
|
||||
console.log(' 说明: 每6小时执行一次');
|
||||
console.log(' 时间: 0:00, 6:00, 12:00, 18:00');
|
||||
console.log('\n========================================\n');
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
||||
333
脚本库/web版/账密/百度贴吧签到/2026-05-23_Tieba_9b1ac223.py
Normal file
333
脚本库/web版/账密/百度贴吧签到/2026-05-23_Tieba_9b1ac223.py
Normal file
@@ -0,0 +1,333 @@
|
||||
# Source: https://github.com/CN-Grace/QinglongScripts/blob/main/Tieba.py
|
||||
# Raw: https://raw.githubusercontent.com/CN-Grace/QinglongScripts/main/Tieba.py
|
||||
# Repo: CN-Grace/QinglongScripts
|
||||
# Path: Tieba.py
|
||||
# UploadedAt: 2026-05-23T15:48:24Z
|
||||
# SHA256: 9b1ac22330324c1b5579826fd6202a49e6e4aa857d1819be3cd7073dd7c092c2
|
||||
# Category: web版/账密
|
||||
# Evidence: web/H5关键词 + username/password/login
|
||||
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
cron: 0 0 * * *
|
||||
new Env("百度贴吧签到")
|
||||
百度贴吧 每日自动签到脚本
|
||||
- 获取用户登录状态
|
||||
- 获取关注的贴吧列表(含等级、经验值)
|
||||
- 对每个贴吧进行签到
|
||||
- 统计签到结果和等级分布
|
||||
"""
|
||||
|
||||
import hashlib
|
||||
import os
|
||||
import random
|
||||
import time
|
||||
import requests
|
||||
from typing import Optional, List, Dict, Any
|
||||
|
||||
from utils import log_info, log_success, log_warning, log_error, beijing_time_str
|
||||
from notifier import send as notify_send
|
||||
|
||||
# ==================== 用户配置 ====================
|
||||
TIEBA_COOKIE = os.environ.get("TIEBA_COOKIE", "")
|
||||
|
||||
|
||||
def create_session(cookie: str) -> requests.Session:
|
||||
"""创建带 Cookie 的 requests.Session(贴吧专用 User-Agent 和 Host)"""
|
||||
session = requests.Session()
|
||||
session.headers.update({
|
||||
"Host": "tieba.baidu.com",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36",
|
||||
"Connection": "keep-alive",
|
||||
"Accept-Encoding": "gzip, deflate",
|
||||
"Cache-Control": "no-cache",
|
||||
})
|
||||
cookie_dict = {item.split("=")[0]: item.split("=")[1] for item in cookie.split("; ") if "=" in item}
|
||||
requests.utils.add_dict_to_cookiejar(session.cookies, cookie_dict)
|
||||
return session
|
||||
|
||||
|
||||
def encode_data(data: Dict, sign_key: str = "tiebaclient!!!") -> Dict:
|
||||
"""对请求数据进行签名"""
|
||||
s = ""
|
||||
for key in sorted(data.keys()):
|
||||
s += f"{key}={data[key]}"
|
||||
sign = hashlib.md5((s + sign_key).encode("utf-8")).hexdigest().upper()
|
||||
data.update({"sign": sign})
|
||||
return data
|
||||
|
||||
|
||||
def request(session: requests.Session, url: str, method: str = "get", data: Optional[Dict] = None, retry: int = 3) -> Dict:
|
||||
"""带重试的请求函数"""
|
||||
for i in range(retry):
|
||||
try:
|
||||
if method.lower() == "get":
|
||||
response = session.get(url, timeout=10)
|
||||
else:
|
||||
response = session.post(url, data=data, timeout=10)
|
||||
response.raise_for_status()
|
||||
if not response.text.strip():
|
||||
raise ValueError("空响应内容")
|
||||
return response.json()
|
||||
except Exception as e:
|
||||
if i == retry - 1:
|
||||
raise Exception(f"请求失败: {e!s}")
|
||||
wait_time = 1.5 * (2 ** i) + random.uniform(0, 1)
|
||||
time.sleep(wait_time)
|
||||
raise Exception(f"请求失败,已达最大重试次数 {retry}")
|
||||
|
||||
|
||||
# ---------- 核心功能 ----------
|
||||
def get_user_info(session: requests.Session) -> tuple:
|
||||
"""获取用户登录信息,返回 (tbs, user_name) 或 (False, 错误信息)"""
|
||||
try:
|
||||
result = request(session, "http://tieba.baidu.com/dc/common/tbs")
|
||||
if result.get("is_login", 0) == 0:
|
||||
return False, "登录失败,Cookie 异常"
|
||||
tbs = result.get("tbs", "")
|
||||
try:
|
||||
user_info = request(session, "https://tieba.baidu.com/f/user/json_userinfo")
|
||||
user_data = user_info.get("data", "")
|
||||
user_name = user_data.get("show_nickname", "未知用户") if isinstance(user_data, dict) else "未知用户"
|
||||
except Exception:
|
||||
user_name = "未知用户"
|
||||
return tbs, user_name
|
||||
except Exception as e:
|
||||
return False, f"登录验证异常: {e}"
|
||||
|
||||
|
||||
def get_favorite(session: requests.Session, bduss: str) -> List[Dict]:
|
||||
"""获取用户关注的贴吧列表,包含等级信息"""
|
||||
forums = []
|
||||
page_no = 1
|
||||
like_url = "http://c.tieba.baidu.com/c/f/forum/like"
|
||||
|
||||
while True:
|
||||
data = encode_data({
|
||||
"BDUSS": bduss,
|
||||
"_client_type": "2",
|
||||
"_client_id": "wappc_1534235498291_488",
|
||||
"_client_version": "9.7.8.0",
|
||||
"_phone_imei": "000000000000000",
|
||||
"from": "1008621y",
|
||||
"page_no": str(page_no),
|
||||
"page_size": "200",
|
||||
"model": "MI+5",
|
||||
"net_type": "1",
|
||||
"timestamp": str(int(time.time())),
|
||||
"vcode_tag": "11",
|
||||
})
|
||||
|
||||
try:
|
||||
res = request(session, like_url, "post", data)
|
||||
if "forum_list" in res:
|
||||
for forum_type in ["non-gconforum", "gconforum"]:
|
||||
if forum_type in res["forum_list"]:
|
||||
items = res["forum_list"][forum_type]
|
||||
if isinstance(items, list):
|
||||
for f in items:
|
||||
f["_is_signed"] = (forum_type == "gconforum")
|
||||
forums.extend(items)
|
||||
elif isinstance(items, dict):
|
||||
items["_is_signed"] = (forum_type == "gconforum")
|
||||
forums.append(items)
|
||||
if res.get("has_more") != "1":
|
||||
break
|
||||
page_no += 1
|
||||
time.sleep(random.uniform(1, 2))
|
||||
except Exception as e:
|
||||
log_error(f"获取贴吧列表出错: {e}")
|
||||
break
|
||||
|
||||
log_info(f"共获取到 {len(forums)} 个关注的贴吧")
|
||||
return forums
|
||||
|
||||
|
||||
def build_level_summary(forums: List[Dict]) -> Dict:
|
||||
"""从贴吧列表中提取等级汇总"""
|
||||
total_exp = 0
|
||||
level_stats = {}
|
||||
forum_levels = []
|
||||
|
||||
for f in forums:
|
||||
name = f.get("name", "")
|
||||
level_id = int(f.get("level_id", 0))
|
||||
cur_score = int(f.get("cur_score", 0))
|
||||
levelup_score = int(f.get("levelup_score", 0))
|
||||
total_exp += cur_score
|
||||
|
||||
if level_id not in level_stats:
|
||||
level_stats[level_id] = {"count": 0, "total_exp": 0}
|
||||
level_stats[level_id]["count"] += 1
|
||||
level_stats[level_id]["total_exp"] += cur_score
|
||||
|
||||
forum_levels.append({
|
||||
"name": name,
|
||||
"level_id": level_id,
|
||||
"cur_score": cur_score,
|
||||
"levelup_score": levelup_score,
|
||||
"exp_percent": round(cur_score / levelup_score * 100, 1) if levelup_score > 0 else 0,
|
||||
})
|
||||
|
||||
sorted_levels = sorted(level_stats.items(), key=lambda x: x[0], reverse=True)
|
||||
return {
|
||||
"forum_count": len(forums),
|
||||
"total_exp": total_exp,
|
||||
"level_stats": sorted_levels,
|
||||
"forum_levels": forum_levels,
|
||||
}
|
||||
|
||||
|
||||
def sign_forums(session: requests.Session, bduss: str, forums: List[Dict], tbs: str) -> Dict[str, Any]:
|
||||
"""对贴吧列表进行签到"""
|
||||
success_count = 0
|
||||
error_count = 0
|
||||
exist_count = 0
|
||||
shield_count = 0
|
||||
total = len(forums)
|
||||
details = []
|
||||
|
||||
log_info(f"开始签到 {total} 个贴吧")
|
||||
|
||||
base_data = {
|
||||
"_client_type": "2",
|
||||
"_client_version": "9.7.8.0",
|
||||
"_phone_imei": "000000000000000",
|
||||
"model": "MI+5",
|
||||
"net_type": "1",
|
||||
}
|
||||
|
||||
last_request_time = time.time()
|
||||
for idx, forum in enumerate(forums):
|
||||
elapsed = time.time() - last_request_time
|
||||
delay = max(0, 1.0 + random.uniform(0.5, 1.5) - elapsed)
|
||||
time.sleep(delay)
|
||||
last_request_time = time.time()
|
||||
|
||||
if (idx + 1) % 10 == 0:
|
||||
extra_delay = random.uniform(5, 10)
|
||||
log_info(f"已签到 {idx + 1}/{total} 个贴吧,休息 {extra_delay:.2f} 秒")
|
||||
time.sleep(extra_delay)
|
||||
|
||||
forum_name = forum.get("name", "")
|
||||
forum_id = forum.get("id", "")
|
||||
level_id = forum.get("level_id", "?")
|
||||
log_prefix = f"【{forum_name}】吧(Lv.{level_id})({idx + 1}/{total})"
|
||||
|
||||
try:
|
||||
data = base_data.copy()
|
||||
data.update({"BDUSS": bduss, "fid": forum_id, "kw": forum_name, "tbs": tbs, "timestamp": str(int(time.time()))})
|
||||
data = encode_data(data)
|
||||
|
||||
result = request(session, "http://c.tieba.baidu.com/c/c/forum/sign", "post", data)
|
||||
error_code = result.get("error_code", "")
|
||||
rank = None
|
||||
|
||||
if error_code == "0":
|
||||
success_count += 1
|
||||
if "user_info" in result:
|
||||
rank = result["user_info"].get("user_sign_rank")
|
||||
log_success(f"{log_prefix} 签到成功,第{rank}个签到" if rank else f"{log_prefix} 签到成功")
|
||||
else:
|
||||
log_success(f"{log_prefix} 签到成功")
|
||||
details.append({"name": forum_name, "status": "success", "rank": rank, "level": level_id})
|
||||
elif error_code == "160002":
|
||||
exist_count += 1
|
||||
log_warning(f"{log_prefix} {result.get('error_msg', '今日已签到')}")
|
||||
details.append({"name": forum_name, "status": "exist", "rank": None, "level": level_id})
|
||||
elif error_code == "340006":
|
||||
shield_count += 1
|
||||
log_warning(f"{log_prefix} 贴吧已被屏蔽")
|
||||
details.append({"name": forum_name, "status": "shield", "rank": None, "level": level_id})
|
||||
else:
|
||||
error_count += 1
|
||||
log_error(f"{log_prefix} 签到失败,错误: {result.get('error_msg', '未知错误')}")
|
||||
details.append({"name": forum_name, "status": "error", "rank": None, "level": level_id})
|
||||
except Exception as e:
|
||||
error_count += 1
|
||||
log_error(f"{log_prefix} 签到异常: {e!s}")
|
||||
details.append({"name": forum_name, "status": "error", "rank": None, "level": level_id})
|
||||
|
||||
return {"total": total, "success": success_count, "exist": exist_count, "shield": shield_count, "error": error_count, "details": details}
|
||||
|
||||
|
||||
def build_report(stats: Dict, user_name: str, details: List[Dict], level_summary: Optional[Dict] = None) -> str:
|
||||
"""构建签到报告"""
|
||||
lines = ["📢 百度贴吧 签到报告", "", f"👤 账号: {user_name}", ""]
|
||||
|
||||
lines.append("📊 签到统计")
|
||||
lines.append(f"📌 贴吧总数: {stats['total']}")
|
||||
lines.append(f"✅ 签到成功: {stats['success']}")
|
||||
lines.append(f"⚠️ 已经签到: {stats['exist']}")
|
||||
lines.append(f"🚫 被屏蔽的: {stats['shield']}")
|
||||
lines.append(f"❌ 签到失败: {stats['error']}")
|
||||
|
||||
if level_summary:
|
||||
lines.append("")
|
||||
lines.append("🎯 等级汇总")
|
||||
lines.append(f"📈 总经验值: {level_summary['total_exp']:,}")
|
||||
top_levels = level_summary["level_stats"][:5]
|
||||
level_dist = " | ".join([f"Lv.{lv}: {info['count']}个吧" for lv, info in top_levels])
|
||||
lines.append(f"🏅 等级分布: {level_dist}")
|
||||
|
||||
if details:
|
||||
lines.append("")
|
||||
lines.append("📋 详细签到情况")
|
||||
for d in details:
|
||||
name = d["name"]
|
||||
status = d["status"]
|
||||
rank = d.get("rank")
|
||||
level = d.get("level", "?")
|
||||
if status == "success":
|
||||
emoji = "✅"
|
||||
rank_text = f" (第{rank}个)" if rank else ""
|
||||
elif status == "exist":
|
||||
emoji = "⚠️"; rank_text = ""
|
||||
elif status == "shield":
|
||||
emoji = "🚫"; rank_text = ""
|
||||
else:
|
||||
emoji = "❌"; rank_text = ""
|
||||
lines.append(f"{emoji} {name} Lv.{level}{rank_text}")
|
||||
|
||||
lines.append("")
|
||||
lines.append("─" * 18)
|
||||
lines.append(f"🕒 执行时间: {beijing_time_str()}")
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def main() -> Dict:
|
||||
"""主流程"""
|
||||
cookie_dict = {item.split("=")[0]: item.split("=")[1] for item in TIEBA_COOKIE.split("; ") if "=" in item}
|
||||
bduss = cookie_dict.get("BDUSS", "")
|
||||
if not bduss:
|
||||
log_error("Cookie 中未找到 BDUSS,请检查配置")
|
||||
return {"user_name": "未知", "stats": {"total": 0, "success": 0, "exist": 0, "shield": 0, "error": 0}, "details": [], "level_summary": None}
|
||||
|
||||
session = create_session(TIEBA_COOKIE)
|
||||
|
||||
tbs, user_name = get_user_info(session)
|
||||
if not tbs:
|
||||
log_error(user_name)
|
||||
return {"user_name": "登录失败", "stats": {"total": 0, "success": 0, "exist": 0, "shield": 0, "error": 0}, "details": [], "level_summary": None}
|
||||
|
||||
log_success(f"登录成功,用户名: {user_name}")
|
||||
|
||||
forums = get_favorite(session, bduss=bduss)
|
||||
if not forums:
|
||||
log_warning("未获取到任何贴吧,请检查 Cookie 或网络")
|
||||
return {"user_name": user_name, "stats": {"total": 0, "success": 0, "exist": 0, "shield": 0, "error": 0}, "details": [], "level_summary": None}
|
||||
|
||||
level_summary = build_level_summary(forums)
|
||||
log_info(f"总经验值: {level_summary['total_exp']:,},最高等级: Lv.{level_summary['level_stats'][0][0] if level_summary['level_stats'] else '?'}")
|
||||
|
||||
result = sign_forums(session, bduss, forums, tbs)
|
||||
log_info(f"签到完成: 总数 {result['total']},成功 {result['success']},已签 {result['exist']},屏蔽 {result['shield']},失败 {result['error']}")
|
||||
|
||||
return {"user_name": user_name, "stats": result, "details": result["details"], "level_summary": level_summary}
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
result = main()
|
||||
if result:
|
||||
report = build_report(result["stats"], result["user_name"], result["details"], result.get("level_summary"))
|
||||
notify_send("百度贴吧 签到报告", report)
|
||||
29
脚本库/web版/账密/纪录片之家_,/2021-09-25_jlpzj_52215fbc.js
Normal file
29
脚本库/web版/账密/纪录片之家_,/2021-09-25_jlpzj_52215fbc.js
Normal file
@@ -0,0 +1,29 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/jlpzj.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/jlpzj.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/jlpzj.js
|
||||
// # UploadedAt: 2021-09-25T00:15:59Z
|
||||
// # SHA256: 52215fbc79f20602170c62df0017e76a341162af743bb8e459141e249d1f2f37
|
||||
// # Category: web版/账密
|
||||
// # Evidence: web/H5关键词 + username/password/login
|
||||
//
|
||||
|
||||
const rules = {
|
||||
name: "【纪录片之家】: ",
|
||||
url: "http://www.jlpzj.net/plugin.php?id=dsu_paulsign:sign&mobile=2", //用于获取formhash的链接
|
||||
cookie: config.jlpzj.cookie,
|
||||
formhash: 'formhash=(.+)"', //formhash正则
|
||||
verify: "您需要先登录才能继续本操作", //验证cookie状态
|
||||
op: [{
|
||||
name: "签到",
|
||||
method: "post", //签到请求方式 get/post
|
||||
url: "http://www.jlpzj.net/plugin.php?id=dsu_paulsign:sign&operation=qiandao&infloat=0&inajax=0&mobile=yes", //签到链接
|
||||
data: "formhash=@formhash&qdxq=kx&qmode=3&todaysay=&fastreply=0"
|
||||
}]
|
||||
};
|
||||
|
||||
async function jlpzj() {
|
||||
const template = require("../Template");
|
||||
return rules.name + await template(rules)
|
||||
}
|
||||
module.exports = jlpzj
|
||||
35
脚本库/web版/账密/阡陌居_,/2021-10-04_qmj_eaedf806.js
Normal file
35
脚本库/web版/账密/阡陌居_,/2021-10-04_qmj_eaedf806.js
Normal file
@@ -0,0 +1,35 @@
|
||||
// # Source: https://github.com/Wenmoux/checkbox/blob/master/scripts/qmj.js
|
||||
// # Raw: https://raw.githubusercontent.com/Wenmoux/checkbox/master/scripts/qmj.js
|
||||
// # Repo: Wenmoux/checkbox
|
||||
// # Path: scripts/qmj.js
|
||||
// # UploadedAt: 2021-10-04T11:58:52Z
|
||||
// # SHA256: eaedf8062aee0a296d103fcb892f519d757704aaaebd1093361270da8f77322a
|
||||
// # Category: web版/账密
|
||||
// # Evidence: web/H5关键词 + username/password/login
|
||||
//
|
||||
|
||||
const rules = {
|
||||
name: "【阡陌居】: ",
|
||||
cookie: config.qmj.cookie,
|
||||
url: "http://www.1050qm.com/plugin.php?id=dsu_paulsign:sign&operation=qiandao&infloat=0&inajax=0&mobile=yes", //用于获取formhash的链接
|
||||
formhash: 'formhash=(.+?)\&', //formhash正则
|
||||
verify: "您需要先登录才能继续本操作", //验证cookie状态
|
||||
op: [{
|
||||
name: "签到",
|
||||
method: "post",
|
||||
url: "http://www.1050qm.com/plugin.php?id=dsu_paulsign:sign&operation=qiandao&infloat=0&inajax=0", //签到链接
|
||||
data: "formhash=@formhash&qdxq=wl"
|
||||
},
|
||||
{
|
||||
name: "申请威望红包任务",
|
||||
ua: "pc",
|
||||
charset: "gb2312",
|
||||
method: "get",
|
||||
url: "http://www.1000qm.vip/home.php?mod=task&do=apply&id=1"
|
||||
}]
|
||||
};
|
||||
async function togamemod() {
|
||||
const template = require("../Template");
|
||||
return rules.name + await template(rules)
|
||||
}
|
||||
module.exports = togamemod
|
||||
Reference in New Issue
Block a user