mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-25 20:51:52 +08:00
修复凭证测试器计数器、消除panic、补齐i18n
- credential_tester: testCredentialWithRetry返回ErrorType,修复网络错误计数器永久不递增的bug - scanner: os.Exit(1)改为return,defer Cleanup可正常执行 - probe_parser: 5处panic改为error返回,调用链透传到init() - common库: parsers/initialize/network/session共17处硬编码中文改用i18n - services插件: 18个文件115处硬编码中文改用i18n - locale: 补齐service/parser/network相关~25个中英文键
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
"unicode"
|
||||
|
||||
"github.com/shadow1ng/fscan/common"
|
||||
"github.com/shadow1ng/fscan/common/i18n"
|
||||
"github.com/shadow1ng/fscan/plugins"
|
||||
)
|
||||
|
||||
@@ -45,7 +46,7 @@ func (p *FindNetPlugin) Scan(ctx context.Context, info *common.HostInfo, session
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "findnet",
|
||||
Error: fmt.Errorf("FindNet插件仅支持RPC端口135"),
|
||||
Error: fmt.Errorf(i18n.Tr("service_port_restriction", "FindNet", "135")),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +55,7 @@ func (p *FindNetPlugin) Scan(ctx context.Context, info *common.HostInfo, session
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "findnet",
|
||||
Error: fmt.Errorf("连接RPC端口失败: %w", err),
|
||||
Error: fmt.Errorf(i18n.Tr("service_conn_port_failed", "%w"), err),
|
||||
}
|
||||
}
|
||||
defer func() { _ = conn.Close() }()
|
||||
|
||||
Reference in New Issue
Block a user