Skip to content

Commit

Permalink
consider some version banners to be ok
Browse files Browse the repository at this point in the history
  • Loading branch information
Jozef Reisinger committed Sep 9, 2021
1 parent c984b53 commit 36281b9
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion shodan.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,19 @@ func (s *Shodan) isOK() bool {

func (s *Shodan) gotServiceVersion() bool {
for _, d := range s.Data {
if d.Version != "" {
if d.Version != "" && !okBanner(d.Product) {
return true
}
}
return false
}

func okBanner(product string) bool {
okBannersPrefixes := []string{
"OpenSSH",
}
for _, prefix := range okBannersPrefixes {
if strings.HasPrefix(product, prefix) {
return true
}
}
Expand Down

0 comments on commit 36281b9

Please sign in to comment.