抓包对比工具补一批一次性脚本:拆预设、对请求、跑 A/B 与拒答抽样。

这些脚本都是我对着酒馆真实请求手工核对用的,留在仓库里方便下次重跑;跑出来的本地数据目录含接口 key,已经写进忽略规则。
This commit is contained in:
2026-10-26 01:09:56 +08:00
parent e2413b0677
commit 1a5ef3b2bc
24 changed files with 1568 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
// 列出预设里所有正则脚本的开关(判断是否影响请求体)
import { readFileSync } from "node:fs";
const preset = JSON.parse(readFileSync(process.argv[2], "utf8"));
const rows = [];
for (const r of preset.extensions?.regex_scripts || []) rows.push({ from: "regex_scripts", ...r });
for (const r of preset.extensions?.SPreset?.RegexBinding?.regexes || []) rows.push({ from: "SPreset.RegexBinding", ...r });
console.log("共 " + rows.length + " 条");
for (const r of rows) {
console.log(
[
r.from,
(r.scriptName || r.id || "").slice(0, 24),
"promptOnly=" + r.promptOnly,
"markdownOnly=" + r.markdownOnly,
"disabled=" + r.disabled,
"depth=" + r.minDepth + "/" + r.maxDepth,
"repl=" + String(r.replaceString || "").length,
].join(" "),
);
}
const send = rows.filter((r) => r.promptOnly === true && r.disabled !== true);
const display = rows.filter((r) => r.markdownOnly === true);
console.log("\n影响请求体(promptOnly=true 且未禁用): " + send.length + " 条");
console.log("纯显示(markdownOnly=true): " + display.length + " 条");