Skip to content

Commit

Permalink
Fix null results in fox module (#294)
Browse files Browse the repository at this point in the history
Co-authored-by: vl4deee11 <boi4enkovlad@yandex.ru>
Co-authored-by: vl4deee11 <boi4chenkovlad@yandex.ru>
Co-authored-by: vl4deee11 <boi4enkovlad@yandex>
  • Loading branch information
4 people authored Mar 13, 2021
1 parent 0d51d0d commit d3d2a37
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/fox/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package fox

import (
"errors"
log "github.com/sirupsen/logrus"
"github.com/zmap/zgrab2"
)
Expand Down Expand Up @@ -107,6 +108,10 @@ func (scanner *Scanner) Scan(target zgrab2.ScanTarget) (zgrab2.ScanStatus, inter
err = GetFoxBanner(result, conn)
if !result.IsFox {
result = nil
err = &zgrab2.ScanError{
Err: errors.New("host responds, but is not a fox service"),
Status: zgrab2.SCAN_PROTOCOL_ERROR,
}
}
return zgrab2.TryGetScanStatus(err), result, err
}

0 comments on commit d3d2a37

Please sign in to comment.