mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-22 03:10:42 +08:00
修复全部SA1006: fmt.Errorf(i18n)统一使用"%s"前缀
This commit is contained in:
@@ -26,10 +26,10 @@ func NewWinBITSPlugin() *WinBITSPlugin {
|
||||
func (p *WinBITSPlugin) Scan(ctx context.Context, info *common.HostInfo, session *common.ScanSession) *plugins.Result {
|
||||
pePath := session.Config.WinPEFile
|
||||
if pePath == "" {
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf(i18n.GetText("local_pe_not_specified"))}
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf("%s", i18n.GetText("local_pe_not_specified"))}
|
||||
}
|
||||
if _, err := os.Stat(pePath); err != nil {
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf(i18n.Tr("local_pe_not_found", pePath))}
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf("%s", i18n.Tr("local_pe_not_found", pePath))}
|
||||
}
|
||||
|
||||
absPath, _ := filepath.Abs(pePath)
|
||||
|
||||
@@ -26,10 +26,10 @@ func NewWinIFEOPlugin() *WinIFEOPlugin {
|
||||
func (p *WinIFEOPlugin) Scan(ctx context.Context, info *common.HostInfo, session *common.ScanSession) *plugins.Result {
|
||||
pePath := session.Config.WinPEFile
|
||||
if pePath == "" {
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf(i18n.GetText("local_pe_not_specified"))}
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf("%s", i18n.GetText("local_pe_not_specified"))}
|
||||
}
|
||||
if _, err := os.Stat(pePath); err != nil {
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf(i18n.Tr("local_pe_not_found", pePath))}
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf("%s", i18n.Tr("local_pe_not_found", pePath))}
|
||||
}
|
||||
|
||||
absPath, _ := filepath.Abs(pePath)
|
||||
|
||||
@@ -26,10 +26,10 @@ func NewWinLogonPlugin() *WinLogonPlugin {
|
||||
func (p *WinLogonPlugin) Scan(ctx context.Context, info *common.HostInfo, session *common.ScanSession) *plugins.Result {
|
||||
pePath := session.Config.WinPEFile
|
||||
if pePath == "" {
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf(i18n.GetText("local_pe_not_specified"))}
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf("%s", i18n.GetText("local_pe_not_specified"))}
|
||||
}
|
||||
if _, err := os.Stat(pePath); err != nil {
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf(i18n.Tr("local_pe_not_found", pePath))}
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf("%s", i18n.Tr("local_pe_not_found", pePath))}
|
||||
}
|
||||
|
||||
absPath, _ := filepath.Abs(pePath)
|
||||
|
||||
@@ -28,10 +28,10 @@ func NewWinRegistryPlugin() *WinRegistryPlugin {
|
||||
func (p *WinRegistryPlugin) Scan(ctx context.Context, info *common.HostInfo, session *common.ScanSession) *plugins.Result {
|
||||
pePath := session.Config.WinPEFile
|
||||
if pePath == "" {
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf(i18n.GetText("local_pe_not_specified"))}
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf("%s", i18n.GetText("local_pe_not_specified"))}
|
||||
}
|
||||
if _, err := os.Stat(pePath); err != nil {
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf(i18n.Tr("local_pe_not_found", pePath))}
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf("%s", i18n.Tr("local_pe_not_found", pePath))}
|
||||
}
|
||||
|
||||
absPath, _ := filepath.Abs(pePath)
|
||||
|
||||
@@ -28,14 +28,14 @@ func NewWinSchTaskPlugin() *WinSchTaskPlugin {
|
||||
func (p *WinSchTaskPlugin) Scan(ctx context.Context, info *common.HostInfo, session *common.ScanSession) *plugins.Result {
|
||||
pePath := session.Config.WinPEFile
|
||||
if pePath == "" {
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf(i18n.GetText("local_pe_not_specified"))}
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf("%s", i18n.GetText("local_pe_not_specified"))}
|
||||
}
|
||||
if _, err := os.Stat(pePath); err != nil {
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf(i18n.Tr("local_pe_not_found", pePath))}
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf("%s", i18n.Tr("local_pe_not_found", pePath))}
|
||||
}
|
||||
ext := strings.ToLower(filepath.Ext(pePath))
|
||||
if ext != ".exe" && ext != ".dll" {
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf(i18n.Tr("local_invalid_pe", pePath))}
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf("%s", i18n.Tr("local_invalid_pe", pePath))}
|
||||
}
|
||||
|
||||
absPath, _ := filepath.Abs(pePath)
|
||||
|
||||
@@ -28,10 +28,10 @@ func NewWinServicePlugin() *WinServicePlugin {
|
||||
func (p *WinServicePlugin) Scan(ctx context.Context, info *common.HostInfo, session *common.ScanSession) *plugins.Result {
|
||||
pePath := session.Config.WinPEFile
|
||||
if pePath == "" {
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf(i18n.GetText("local_pe_not_specified"))}
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf("%s", i18n.GetText("local_pe_not_specified"))}
|
||||
}
|
||||
if _, err := os.Stat(pePath); err != nil {
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf(i18n.Tr("local_pe_not_found", pePath))}
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf("%s", i18n.Tr("local_pe_not_found", pePath))}
|
||||
}
|
||||
|
||||
absPath, _ := filepath.Abs(pePath)
|
||||
|
||||
@@ -28,10 +28,10 @@ func NewWinStartupPlugin() *WinStartupPlugin {
|
||||
func (p *WinStartupPlugin) Scan(ctx context.Context, info *common.HostInfo, session *common.ScanSession) *plugins.Result {
|
||||
pePath := session.Config.WinPEFile
|
||||
if pePath == "" {
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf(i18n.GetText("local_pe_not_specified"))}
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf("%s", i18n.GetText("local_pe_not_specified"))}
|
||||
}
|
||||
if _, err := os.Stat(pePath); err != nil {
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf(i18n.Tr("local_pe_not_found", pePath))}
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf("%s", i18n.Tr("local_pe_not_found", pePath))}
|
||||
}
|
||||
|
||||
absPath, _ := filepath.Abs(pePath)
|
||||
|
||||
@@ -28,10 +28,10 @@ func NewWinWMIPlugin() *WinWMIPlugin {
|
||||
func (p *WinWMIPlugin) Scan(ctx context.Context, info *common.HostInfo, session *common.ScanSession) *plugins.Result {
|
||||
pePath := session.Config.WinPEFile
|
||||
if pePath == "" {
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf(i18n.GetText("local_pe_not_specified"))}
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf("%s", i18n.GetText("local_pe_not_specified"))}
|
||||
}
|
||||
if _, err := os.Stat(pePath); err != nil {
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf(i18n.Tr("local_pe_not_found", pePath))}
|
||||
return &plugins.Result{Success: false, Error: fmt.Errorf("%s", i18n.Tr("local_pe_not_found", pePath))}
|
||||
}
|
||||
|
||||
absPath, _ := filepath.Abs(pePath)
|
||||
|
||||
@@ -267,7 +267,7 @@ func (p *ActiveMQPlugin) identifyService(ctx context.Context, info *common.HostI
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "activemq",
|
||||
Error: fmt.Errorf(i18n.Tr("service_not_identified", "ActiveMQ STOMP")),
|
||||
Error: fmt.Errorf("%s", i18n.Tr("service_not_identified", "ActiveMQ STOMP")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ func (p *CassandraPlugin) Scan(ctx context.Context, info *common.HostInfo, sessi
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "cassandra",
|
||||
Error: fmt.Errorf(i18n.GetText("service_no_credentials")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_no_credentials")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ func TestCredentialsConcurrently(
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: serviceName,
|
||||
Error: fmt.Errorf(i18n.GetText("service_no_test_creds")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_no_test_creds")),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ func TestCredentialsConcurrently(
|
||||
Type: plugins.ResultTypeCredential, // 标记这是凭据测试结果
|
||||
Success: false,
|
||||
Service: serviceName,
|
||||
Error: fmt.Errorf(i18n.GetText("service_no_weak_pass")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_no_weak_pass")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ func (p *ElasticsearchPlugin) Scan(ctx context.Context, info *common.HostInfo, s
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "elasticsearch",
|
||||
Error: fmt.Errorf(i18n.GetText("service_no_credentials")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_no_credentials")),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ func (p *ElasticsearchPlugin) Scan(ctx context.Context, info *common.HostInfo, s
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "elasticsearch",
|
||||
Error: fmt.Errorf(i18n.GetText("service_no_weak_pass")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_no_weak_pass")),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ func (p *ElasticsearchPlugin) identifyService(ctx context.Context, info *common.
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "elasticsearch",
|
||||
Error: fmt.Errorf(i18n.Tr("service_not_identified", "Elasticsearch")),
|
||||
Error: fmt.Errorf("%s", i18n.Tr("service_not_identified", "Elasticsearch")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ func (p *FindNetPlugin) Scan(ctx context.Context, info *common.HostInfo, session
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "findnet",
|
||||
Error: fmt.Errorf(i18n.Tr("service_port_restriction", "FindNet", "135")),
|
||||
Error: fmt.Errorf("%s", i18n.Tr("service_port_restriction", "FindNet", "135")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ func (p *FTPPlugin) Scan(ctx context.Context, info *common.HostInfo, session *co
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "ftp",
|
||||
Error: fmt.Errorf(i18n.GetText("service_no_credentials")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_no_credentials")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ func (p *KafkaPlugin) Scan(ctx context.Context, info *common.HostInfo, session *
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "kafka",
|
||||
Error: fmt.Errorf(i18n.GetText("service_no_credentials")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_no_credentials")),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ func (p *KafkaPlugin) identifyService(ctx context.Context, info *common.HostInfo
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "kafka",
|
||||
Error: fmt.Errorf(i18n.Tr("service_not_identified", "Kafka")),
|
||||
Error: fmt.Errorf("%s", i18n.Tr("service_not_identified", "Kafka")),
|
||||
}
|
||||
}
|
||||
state.IncrementTCPSuccessPacketCount()
|
||||
|
||||
@@ -44,7 +44,7 @@ func (p *LDAPPlugin) Scan(ctx context.Context, info *common.HostInfo, session *c
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "ldap",
|
||||
Error: fmt.Errorf(i18n.GetText("service_no_credentials")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_no_credentials")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ func (p *MemcachedPlugin) identifyService(ctx context.Context, info *common.Host
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "memcached",
|
||||
Error: fmt.Errorf(i18n.Tr("service_not_identified", "Memcached")),
|
||||
Error: fmt.Errorf("%s", i18n.Tr("service_not_identified", "Memcached")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ func (p *MongoDBPlugin) Scan(ctx context.Context, info *common.HostInfo, session
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "mongodb",
|
||||
Error: fmt.Errorf(i18n.GetText("service_no_credentials")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_no_credentials")),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ func (p *MongoDBPlugin) mongodbUnauth(ctx context.Context, info *common.HostInfo
|
||||
return false, nil
|
||||
}
|
||||
|
||||
return false, fmt.Errorf(i18n.Tr("service_not_identified", "MongoDB"))
|
||||
return false, fmt.Errorf("%s", i18n.Tr("service_not_identified", "MongoDB"))
|
||||
}
|
||||
|
||||
// checkMongoAuth 检查MongoDB认证状态
|
||||
|
||||
@@ -39,7 +39,7 @@ func (p *MSSQLPlugin) Scan(ctx context.Context, info *common.HostInfo, session *
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "mssql",
|
||||
Error: fmt.Errorf(i18n.GetText("service_no_credentials")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_no_credentials")),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ func (p *MSSQLPlugin) identifyService(ctx context.Context, info *common.HostInfo
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "mssql",
|
||||
Error: fmt.Errorf(i18n.Tr("service_not_identified", "MSSQL")),
|
||||
Error: fmt.Errorf("%s", i18n.Tr("service_not_identified", "MSSQL")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ func (p *MySQLPlugin) Scan(ctx context.Context, info *common.HostInfo, session *
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "mysql",
|
||||
Error: fmt.Errorf(i18n.GetText("service_no_credentials")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_no_credentials")),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ func (p *MySQLPlugin) identifyService(ctx context.Context, info *common.HostInfo
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "mysql",
|
||||
Error: fmt.Errorf(i18n.Tr("service_not_identified", "MySQL")),
|
||||
Error: fmt.Errorf("%s", i18n.Tr("service_not_identified", "MySQL")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ func (p *Neo4jPlugin) Scan(ctx context.Context, info *common.HostInfo, session *
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "neo4j",
|
||||
Error: fmt.Errorf(i18n.GetText("service_no_credentials")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_no_credentials")),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ func (p *Neo4jPlugin) identifyService(ctx context.Context, info *common.HostInfo
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "neo4j",
|
||||
Error: fmt.Errorf(i18n.Tr("service_not_identified", "Neo4j")),
|
||||
Error: fmt.Errorf("%s", i18n.Tr("service_not_identified", "Neo4j")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ func (p *OraclePlugin) Scan(ctx context.Context, info *common.HostInfo, session
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "oracle",
|
||||
Error: fmt.Errorf(i18n.GetText("service_no_credentials")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_no_credentials")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ func (p *PostgreSQLPlugin) Scan(ctx context.Context, info *common.HostInfo, sess
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "postgresql",
|
||||
Error: fmt.Errorf(i18n.GetText("service_no_credentials")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_no_credentials")),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ func (p *PostgreSQLPlugin) identifyService(ctx context.Context, info *common.Hos
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "postgresql",
|
||||
Error: fmt.Errorf(i18n.Tr("service_not_identified", "PostgreSQL")),
|
||||
Error: fmt.Errorf("%s", i18n.Tr("service_not_identified", "PostgreSQL")),
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -46,7 +46,7 @@ func (p *RabbitMQPlugin) Scan(ctx context.Context, info *common.HostInfo, sessio
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "rabbitmq",
|
||||
Error: fmt.Errorf(i18n.GetText("service_no_credentials")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_no_credentials")),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ func (p *RabbitMQPlugin) testManagementInterface(ctx context.Context, info *comm
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "rabbitmq",
|
||||
Error: fmt.Errorf(i18n.Tr("service_not_identified", "RabbitMQ")),
|
||||
Error: fmt.Errorf("%s", i18n.Tr("service_not_identified", "RabbitMQ")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ func (p *RDPPlugin) Scan(ctx context.Context, info *common.HostInfo, session *co
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "rdp",
|
||||
Error: fmt.Errorf(i18n.GetText("service_auth_failed")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_auth_failed")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ func (p *RsyncPlugin) Scan(ctx context.Context, info *common.HostInfo, session *
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "rsync",
|
||||
Error: fmt.Errorf(i18n.GetText("service_no_credentials")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_no_credentials")),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -374,7 +374,7 @@ func (p *RsyncPlugin) identifyService(ctx context.Context, info *common.HostInfo
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "rsync",
|
||||
Error: fmt.Errorf(i18n.Tr("service_not_identified", "Rsync")),
|
||||
Error: fmt.Errorf("%s", i18n.Tr("service_not_identified", "Rsync")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@ func (a *SMB1Authenticator) Authenticate(ctx context.Context, host string, port
|
||||
resultChan <- &AuthResult{
|
||||
Success: false,
|
||||
ErrorType: ErrorTypeAuth,
|
||||
Error: fmt.Errorf(i18n.GetText("service_auth_failed")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_auth_failed")),
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -45,7 +45,7 @@ func (p *SMTPPlugin) Scan(ctx context.Context, info *common.HostInfo, session *c
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "smtp",
|
||||
Error: fmt.Errorf(i18n.GetText("service_no_credentials")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_no_credentials")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@ func (p *SSHPlugin) identifyService(ctx context.Context, info *common.HostInfo,
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "ssh",
|
||||
Error: fmt.Errorf(i18n.Tr("service_not_identified", "SSH")),
|
||||
Error: fmt.Errorf("%s", i18n.Tr("service_not_identified", "SSH")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ func (p *TelnetPlugin) Scan(ctx context.Context, info *common.HostInfo, session
|
||||
return &ScanResult{
|
||||
Success: false,
|
||||
Service: "telnet",
|
||||
Error: fmt.Errorf(i18n.GetText("service_no_credentials")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_no_credentials")),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ func (p *TelnetPlugin) doTelnetAuth(ctx context.Context, info *common.HostInfo,
|
||||
resultChan <- &AuthResult{
|
||||
Success: false,
|
||||
ErrorType: ErrorTypeAuth,
|
||||
Error: fmt.Errorf(i18n.GetText("service_auth_failed")),
|
||||
Error: fmt.Errorf("%s", i18n.GetText("service_auth_failed")),
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user