Skip to content

Commit 849290a

Browse files
committed
Fix some linter issues
1 parent 6964394 commit 849290a

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

sshauditor/bannerworker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package sshauditor
22

33
import "sync"
44

5-
func bannerWorker(id int, jobs <-chan string, results chan<- ScanResult) {
5+
func bannerWorker(jobs <-chan string, results chan<- ScanResult) {
66
for host := range jobs {
77
results <- ScanPort(host)
88
}
@@ -16,7 +16,7 @@ func bannerFetcher(numWorkers int, hostports <-chan string) chan ScanResult {
1616
for w := 0; w <= numWorkers; w++ {
1717
wg.Add(1)
1818
go func() {
19-
bannerWorker(w, hostports, results)
19+
bannerWorker(hostports, results)
2020
wg.Done()
2121
}()
2222
}

sshauditor/brute.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type BruteForceResult struct {
1414
result string
1515
}
1616

17-
func bruteworker(id int, jobs <-chan ScanRequest, results chan<- BruteForceResult) {
17+
func bruteworker(jobs <-chan ScanRequest, results chan<- BruteForceResult) {
1818
for sr := range jobs {
1919
failures := 0
2020
for _, cred := range sr.credentials {
@@ -53,7 +53,7 @@ func bruteForcer(numWorkers int, requests []ScanRequest) chan BruteForceResult {
5353
for w := 0; w <= numWorkers; w++ {
5454
wg.Add(1)
5555
go func() {
56-
bruteworker(w, requestChan, results)
56+
bruteworker(requestChan, results)
5757
wg.Done()
5858
}()
5959
}

sshauditor/sshutil.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func SSHDialAttempt(client *ssh.Client, dest string) bool {
109109
func challengeReponder(password string) ssh.KeyboardInteractiveChallenge {
110110
return func(user, instruction string, questions []string, echos []bool) ([]string, error) {
111111
answers := make([]string, len(questions))
112-
for i, _ := range answers {
112+
for i := range answers {
113113
answers[i] = password
114114
}
115115
return answers, nil

sshauditor/sshworker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type SSHHost struct {
88
keyfp string
99
}
1010

11-
func keyworker(id int, jobs <-chan ScanResult, results chan<- SSHHost) {
11+
func keyworker(jobs <-chan ScanResult, results chan<- SSHHost) {
1212
for host := range jobs {
1313
if !host.success {
1414
continue
@@ -30,7 +30,7 @@ func fingerPrintFetcher(numWorkers int, scanResults <-chan ScanResult) chan SSHH
3030
for w := 0; w <= numWorkers; w++ {
3131
wg.Add(1)
3232
go func() {
33-
keyworker(w, scanResults, results)
33+
keyworker(scanResults, results)
3434
wg.Done()
3535
}()
3636
}

0 commit comments

Comments
 (0)