Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

golint fix #27

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ linters-settings:

gofumpt:
# Select the Go version to target. The default is `1.15`.
lang-version: "1.18.2"
lang-version: "1.20"

# Choose whether or not to use the extra rules that are disabled
# by default
Expand Down
6 changes: 2 additions & 4 deletions pkg/plugins/services/rdp/rdp.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,8 @@ func (p *RDPPlugin) Run(conn net.Conn, timeout time.Duration, target plugins.Tar
OSFingerprint: fingerprint,
}
return plugins.CreateServiceFrom(target, payload, false, "", plugins.TCP), nil
} else {
return nil, err
}
return nil, err
}

func (p *TLSPlugin) Run(conn net.Conn, timeout time.Duration, target plugins.Target) (*plugins.Service, error) {
Expand All @@ -358,9 +357,8 @@ func (p *TLSPlugin) Run(conn net.Conn, timeout time.Duration, target plugins.Tar
return nil, nil
} else if check && info != nil && err == nil {
return plugins.CreateServiceFrom(target, *info, true, "", plugins.TCP), nil
} else {
return nil, err
}
return nil, err
}

func (p *RDPPlugin) Name() string {
Expand Down
6 changes: 3 additions & 3 deletions pkg/scan/simple_scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ func (c *Config) SimpleScanTarget(target plugins.Target) (*plugins.Service, erro
}
}

tlsConn, err := DialTLS(target)
isTLS := err == nil
tlsConn, tlsErr := DialTLS(target)
isTLS := tlsErr == nil
if isTLS {
for _, plugin := range sortedTCPTLSPlugins {
if plugin.PortPriority(port) {
Expand Down Expand Up @@ -167,7 +167,7 @@ func (c *Config) SimpleScanTarget(target plugins.Target) (*plugins.Service, erro

if isTLS {
for _, plugin := range sortedTCPTLSPlugins {
tlsConn, err = DialTLS(target)
tlsConn, err := DialTLS(target)
if err != nil {
return nil, fmt.Errorf("error connecting via TLS, err = %w", err)
}
Expand Down
Loading