Skip to content

Commit

Permalink
Fixed error. Moved ssh key init to Init()
Browse files Browse the repository at this point in the history
  • Loading branch information
espegro committed Nov 19, 2021
1 parent 6d7a347 commit 324cfc7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions modules/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ func (f *SSHFlags) Help() string {
}

func (s *SSHScanner) Init(flags zgrab2.ScanFlags) error {
f, _ := flags.(*SSHFlags)
s.config = f
return nil
}

func (s *SSHScanner) InitPerSender(senderID int) error {
sc := ssh.MakeSSHConfig() //dummy variable to get default for host key, kex algorithm, ciphers
f, _ := flags.(*SSHFlags)
s.config = f
Expand All @@ -79,6 +73,11 @@ func (s *SSHScanner) InitPerSender(senderID int) error {
if len(s.config.HostKeyAlgorithms) == 0 {
s.config.HostKeyAlgorithms = string(strings.Join(sc.HostKeyAlgorithms, ","))
}
f, _ := flags.(*SSHFlags)
return nil
}

func (s *SSHScanner) InitPerSender(senderID int) error {
return nil
}

Expand Down

0 comments on commit 324cfc7

Please sign in to comment.