Skip to content

Commit

Permalink
fix panic when connection log cannot be taken from smb
Browse files Browse the repository at this point in the history
  • Loading branch information
5amu committed Feb 23, 2024
1 parent 198e3af commit 0b561b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/smb/smb.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ func GatherSMBInfo(host string) (*SMBInfo, error) {
}
}

if data != nil {
if data != nil && data.NegotiationLog != nil {
info.SigningRequired = data.NegotiationLog.SecurityMode&zgrabsmb.SecurityModeSigningRequired > 0
} else {
info.SigningRequired = true
}
return &info, nil
}
Expand Down

0 comments on commit 0b561b2

Please sign in to comment.