Skip to content

修复 Init 失败后 --force 继续运行爆破池#157

Merged
M09Ic merged 1 commit into
chainreactors:masterfrom
wuchulonly:fix/brute-init-force
Jun 26, 2026
Merged

修复 Init 失败后 --force 继续运行爆破池#157
M09Ic merged 1 commit into
chainreactors:masterfrom
wuchulonly:fix/brute-init-force

Conversation

@wuchulonly

Copy link
Copy Markdown
Contributor

背景

BrutePool.Init() 失败时,index/random 基线不可用。当前逻辑在开启 --force 后仍会继续进入 brutePool.Run(),后续比较阶段可能在 BaseCompare 中访问未初始化的基线并触发 nil pointer panic。

--force 应该只关闭运行期错误阈值,不应该允许半初始化的 pool 继续运行。

修改

  • RunWithBrutebrutePool.Init() 失败后一律关闭当前 pool、记录统计并返回,不再被 --force 绕过。
  • 增加 E2E 回归测试:初始化路径断开连接导致 Init 失败,即使开启 --force 也不会继续请求字典路径。

验证

go test ./core -run 'TestE2E_ForceDoesNotRunBruteAfterInitFailure|TestE2E_NormalBruteScan'\ngo test ./core/pool\n```

@wuchulonly wuchulonly force-pushed the fix/brute-init-force branch from acb8fdc to 2ad72ee Compare June 26, 2026 07:15
@M09Ic M09Ic merged commit 0b67342 into chainreactors:master Jun 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants