fix: 修复3个实测发现的问题

1. -pwd 支持逗号分隔多个密码
   之前 -pwd "123,456,root" 被当作单个密码,SSH root:123 无法匹配
   现在逗号分隔为独立密码,空格保留(可能是密码的一部分)

2. -nobr 禁用爆破时仍检测 Redis 未授权访问
   未授权访问是服务探测不是爆破,不应被 -nobr 跳过
   将未授权检测移到 DisableBrute 判断之前

3. 指定端口时跳过 UDP 插件调度
   -p 80 只扫 HTTP 时不需要 SNMP/BACnet/DNS 等 UDP 探测
   仅在默认端口扫描时才分发 UDP 插件
   效果: -p 80 从 9 秒降到 3 秒
This commit is contained in:
ZacharyZcR
2026-06-14 22:23:51 +08:00
parent a52e93e84c
commit 626d8f79bb
4 changed files with 20 additions and 11 deletions
+4 -1
View File
@@ -186,7 +186,10 @@ func (s *ServiceScanStrategy) performHostScan(ctx context.Context, session *comm
ep.TuneConfig(config, session)
}
s.dispatchUDPPlugins(ctx, session, hosts, info, config, ch, wg)
// 仅在默认端口扫描时调度 UDP 插件(用户指定 -p 时跳过,避免不相关的 UDP 探测拖慢扫描)
if config.Target.Ports == "" || config.Target.Ports == "all" {
s.dispatchUDPPlugins(ctx, session, hosts, info, config, ch, wg)
}
s.scanHostBatch(ctx, session, hosts, info, pluginsToRun, isCustomMode, ch, wg)
}