惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
罗磊的独立博客
SecWiki News
SecWiki News
The Register - Security
The Register - Security
The GitHub Blog
The GitHub Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Schneier on Security
IT之家
IT之家
博客园 - 聂微东
T
The Exploit Database - CXSecurity.com
Recorded Future
Recorded Future
大猫的无限游戏
大猫的无限游戏
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Vercel News
Vercel News
G
GRAHAM CLULEY
D
DataBreaches.Net
D
Darknet – Hacking Tools, Hacker News & Cyber Security
S
SegmentFault 最新的问题
博客园_首页
雷峰网
雷峰网
T
Tenable Blog
Spread Privacy
Spread Privacy
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
酷 壳 – CoolShell
酷 壳 – CoolShell
Cisco Talos Blog
Cisco Talos Blog
V
Visual Studio Blog
J
Java Code Geeks
博客园 - Franky
The Cloudflare Blog
Apple Machine Learning Research
Apple Machine Learning Research
C
CERT Recently Published Vulnerability Notes
T
Threatpost
Google DeepMind News
Google DeepMind News
F
Fortinet All Blogs
P
Privacy International News Feed
T
Threat Research - Cisco Blogs
T
The Blog of Author Tim Ferriss
V
Vulnerabilities – Threatpost
Recent Announcements
Recent Announcements
Blog — PlanetScale
Blog — PlanetScale
Security Latest
Security Latest
U
Unit 42
M
MIT News - Artificial intelligence
Y
Y Combinator Blog
K
Kaspersky official blog
有赞技术团队
有赞技术团队
B
Blog
腾讯CDC

WishMeLz

柯尼卡美能达 bizhub C226 复印机 SMB 扫描到电脑配置教程 minio 最后的绝唱 搭建配置流程 - WishMeLz Namecrane/CraneMail 优化访问速度之 - Nginx stream 做 TCP 邮件代理 Scriptable 小组件 - 搬瓦工 - WishMeLz 港卡,CSL 记录 - WishMeLz Electron 主进程起一个可用的 HTTPS 静态服务器 - WishMeLz 目标域名在线测试 - WishMeLz Safari 解锁 120hz - WishMeLz CraneMail 优化访问速度之 - Stunnel/HAProxy - WishMeLz Linux 工具箱整理 - WishMeLz Docker 使用指南 - WishMeLz
某x面板每月自动重置流量功能 - WishMeLz
WishMeLz · 2025-12-25 · via WishMeLz
最新版貌似已经添加了重置功能
const axios = require("axios");
const https = require("https");

const baseUrl = "https://xxx.xxx.cn:12221/oG5g0pFGbeeL5Aq";

const api = axios.create({
    baseURL: baseUrl,
    httpsAgent: new https.Agent({
        rejectUnauthorized: false,
    }),
    timeout: 20000,
});

async function main() {
    // 登录
    const loginRes = await api.post("/login", {
        username: "",
        password: "",
    });

    // 提取 set-cookie
    const setCookies = loginRes.headers["set-cookie"];
    if (!setCookies || setCookies.length === 0) {
        throw new Error("login response has no set-cookie");
    }

    const cookieHeader = setCookies.map((c) => c.split(";")[0]).join("; ");

    console.log("cookie:", cookieHeader);

    // 重置所有入站
    const resAllInbound = await api.post("/panel/inbound/resetAllTraffics", null, {
        headers: {
            Cookie: cookieHeader,
        },
    });

    console.log(resAllInbound.data);
    // 重置所有用户
    const resAllUser = await api.post("/panel/inbound/resetAllClientTraffics/-1", null, {
        headers: {
            Cookie: cookieHeader,
        },
    });
    console.log(resAllUser.data);
    console.log("all reset done");
}

main().catch((err) => {
    console.error("FATAL:", err.message);
});

2025-12-25T07:52:39.png


最后编辑时间为: December 25th , 2025 at 03:37 pm
本文由 Wish 创作,采用 知识共享署名 4.0 国际许可协议进行许可
可自由转载、引用,但需署名作者且注明文章出处

标签 : 无标签