fix: 跳过snmp社区字符串暴力破解中的冗余public探测
测试构建 / 代码检查 (push) Has been cancelled
测试构建 / 单元测试和构建 (push) Has been cancelled
测试构建 / 构建验证 (push) Has been cancelled

This commit is contained in:
ZacharyZcR
2026-05-19 21:00:47 +08:00
parent bc2a8f653a
commit e0080555b4
+4
View File
@@ -40,8 +40,12 @@ func (p *SNMPPlugin) Scan(ctx context.Context, info *common.HostInfo, session *c
}
communities := p.buildCommunityList(config)
alreadyProbed := "public"
var found []string
for _, community := range communities {
if community == alreadyProbed {
continue
}
select {
case <-ctx.Done():
return result