mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-24 12:11:52 +08:00
Expand i18n coverage
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/shadow1ng/fscan/common"
|
||||
"github.com/shadow1ng/fscan/common/i18n"
|
||||
"github.com/shadow1ng/fscan/plugins"
|
||||
WebScan "github.com/shadow1ng/fscan/webscan"
|
||||
)
|
||||
@@ -92,7 +93,7 @@ func (p *WebPocPlugin) Scan(ctx context.Context, info *common.HostInfo, session
|
||||
if config.POC.Disabled {
|
||||
return &WebScanResult{
|
||||
Success: false,
|
||||
Error: fmt.Errorf("POC扫描已禁用"),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("webpoc_disabled")),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +107,7 @@ func (p *WebPocPlugin) Scan(ctx context.Context, info *common.HostInfo, session
|
||||
|
||||
// 全量模式:忽略指纹和CDN/WAF检测,直接扫描所有POC
|
||||
target := info.Target()
|
||||
common.LogDebug(fmt.Sprintf("WebPOC %s 全量扫描模式", target))
|
||||
common.LogDebug(i18n.Tr("webpoc_full_scan_mode", target))
|
||||
WebScan.WebScan(ctx, info, config)
|
||||
|
||||
return &WebScanResult{
|
||||
|
||||
@@ -13,6 +13,7 @@ import (
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/shadow1ng/fscan/common"
|
||||
"github.com/shadow1ng/fscan/common/i18n"
|
||||
"github.com/shadow1ng/fscan/core"
|
||||
"github.com/shadow1ng/fscan/plugins"
|
||||
WebScan "github.com/shadow1ng/fscan/webscan"
|
||||
@@ -222,18 +223,18 @@ func (p *WebTitlePlugin) triggerPocScan(ctx context.Context, info *common.HostIn
|
||||
|
||||
// 无指纹,跳过
|
||||
if len(fingerprints) == 0 {
|
||||
common.LogDebug(fmt.Sprintf("WebTitle %s 无匹配指纹,跳过POC扫描", target))
|
||||
common.LogDebug(i18n.Tr("webtitle_no_fingerprint_skip_poc", target))
|
||||
return
|
||||
}
|
||||
|
||||
// 检测CDN/WAF
|
||||
if cdnName := matchCDNorWAF(fingerprints); cdnName != "" {
|
||||
common.LogDebug(fmt.Sprintf("WebTitle %s 检测到%s,跳过POC扫描", target, cdnName))
|
||||
common.LogDebug(i18n.Tr("webtitle_cdn_waf_skip_poc", target, cdnName))
|
||||
return
|
||||
}
|
||||
|
||||
// 基于指纹执行POC扫描
|
||||
common.LogDebug(fmt.Sprintf("WebTitle %s 触发指纹POC扫描: %v", target, fingerprints))
|
||||
common.LogDebug(i18n.Tr("webtitle_trigger_fingerprint_poc", target, fingerprints))
|
||||
info.Info = fingerprints
|
||||
WebScan.WebScan(ctx, info, config)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user