mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-22 03:10:42 +08:00
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:
@@ -37,12 +37,7 @@ func (p *RedisPlugin) Scan(ctx context.Context, info *common.HostInfo, session *
|
||||
config := session.Config
|
||||
target := info.Target()
|
||||
|
||||
// 如果禁用暴力破解,只做服务识别
|
||||
if config.DisableBrute {
|
||||
return p.identifyService(ctx, info, session)
|
||||
}
|
||||
|
||||
// 首先检查未授权访问
|
||||
// 首先检查未授权访问(无论是否禁用爆破都要检测)
|
||||
if result := p.testUnauthorizedAccess(ctx, info, session); result != nil && result.Success {
|
||||
session.LogVuln(i18n.Tr("redis_unauth_success", target)) //nolint:govet
|
||||
|
||||
@@ -53,6 +48,11 @@ func (p *RedisPlugin) Scan(ctx context.Context, info *common.HostInfo, session *
|
||||
return result
|
||||
}
|
||||
|
||||
// 禁用爆破时不继续密码测试
|
||||
if config.DisableBrute {
|
||||
return p.identifyService(ctx, info, session)
|
||||
}
|
||||
|
||||
// 生成测试凭据
|
||||
credentials := GenerateCredentials("redis", config)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user