feat: 优化日志颜色方案,区分漏洞和普通信息

- 新增 LogVuln 级别(红色),用于漏洞和重要发现
- 密码爆破成功、未授权访问、POC漏洞等改用红色显示
- 普通信息(扫描统计等)改为白色
- Web指纹保持绿色
This commit is contained in:
ZacharyZcR
2026-01-17 13:21:43 +08:00
parent c3bff843a3
commit 5ebdbd3aa2
27 changed files with 68 additions and 52 deletions
+3 -3
View File
@@ -46,7 +46,7 @@ func (p *MongoDBPlugin) Scan(ctx context.Context, info *common.HostInfo, config
}
if isUnauth {
common.LogSuccess(i18n.Tr("mongodb_unauth", target))
common.LogVuln(i18n.Tr("mongodb_unauth", target))
return &ScanResult{
Type: plugins.ResultTypeVuln,
Success: true,
@@ -72,7 +72,7 @@ func (p *MongoDBPlugin) Scan(ctx context.Context, info *common.HostInfo, config
result := TestCredentialsConcurrently(ctx, credentials, authFn, "mongodb", testConfig)
if result.Success {
common.LogSuccess(i18n.Tr("mongodb_credential", target, result.Username, result.Password))
common.LogVuln(i18n.Tr("mongodb_credential", target, result.Username, result.Password))
}
return result
@@ -195,7 +195,7 @@ func (p *MongoDBPlugin) identifyService(ctx context.Context, info *common.HostIn
}
if isUnauth {
common.LogSuccess(i18n.Tr("mongodb_unauth", target))
common.LogVuln(i18n.Tr("mongodb_unauth", target))
return &ScanResult{
Type: plugins.ResultTypeVuln,
Success: true,