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

推荐订阅源

P
Privacy & Cybersecurity Law Blog
V
V2EX
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Register - Security
The Register - Security
MongoDB | Blog
MongoDB | Blog
P
Privacy International News Feed
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
K
Kaspersky official blog
S
Secure Thoughts
T
Tenable Blog
Security Latest
Security Latest
The Cloudflare Blog
S
Security @ Cisco Blogs
H
Heimdal Security Blog
aimingoo的专栏
aimingoo的专栏
TaoSecurity Blog
TaoSecurity Blog
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
Schneier on Security
Schneier on Security
Webroot Blog
Webroot Blog
G
Google Developers Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
IT之家
IT之家
Latest news
Latest news
The Hacker News
The Hacker News
C
Check Point Blog
T
The Exploit Database - CXSecurity.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
腾讯CDC
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
N
News | PayPal Newsroom
Forbes - Security
Forbes - Security
P
Palo Alto Networks Blog
S
Security Affairs
S
Securelist
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
A
About on SuperTechFans

WishMeLz - JS

Electron 主进程起一个可用的 HTTPS 静态服务器 - WishMeLz ANSI 字体在前端展示 Jenkins日志 - WishMeLz 获取视频某一秒的截图 - WishMeLz 金额大写 - WishMeLz markdown 编辑器 md编辑器 - WishMeLz 零宽非连接符 [ZWNJ] U+200C - WishMeLz SSE(Server-Sent Events) - WishMeLz 随机渐变背景 - WishMeLz 文件处理 - WishMeLz
某x面板每月自动重置流量功能 - WishMeLz
WishMeLz · 2025-12-25 · via WishMeLz - JS
最新版貌似已经添加了重置功能
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 国际许可协议进行许可
可自由转载、引用,但需署名作者且注明文章出处

标签 : 无标签