fix: 让 -gt 全局超时参数真正生效

-gt 参数之前是死代码:flag 定义了 GlobalTimeout 但从未被使用。
现在在 RunScan 中用它创建带 deadline 的 context,
超时后所有扫描任务(端口扫描、插件执行)被取消。
This commit is contained in:
ZacharyZcR
2026-06-13 23:04:22 +08:00
parent b085df1878
commit 0356485595
3 changed files with 15 additions and 3 deletions
+3
View File
@@ -61,6 +61,9 @@ type Config struct {
LocalExploit LocalExploitConfig
Target TargetConfig // 扫描目标配置
// 全局超时
GlobalTimeout time.Duration
// SOCKS5代理端口配置
Socks5ProxyPort int // SOCKS5代理端口
}