ing
This commit is contained in:
@@ -27,10 +27,10 @@ type DiscoveryPort struct {
|
||||
}
|
||||
|
||||
func (dp *DiscoveryPort) Contains(port int) bool {
|
||||
if dp.FirstScanRange < port {
|
||||
if dp.FirstScanRange > port {
|
||||
return false
|
||||
}
|
||||
if dp.LastScanRange > port {
|
||||
if dp.LastScanRange < port {
|
||||
return false
|
||||
}
|
||||
for _, p := range dp.ExcludePorts {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package model
|
||||
|
||||
import "github.com/google/gopacket"
|
||||
|
||||
const (
|
||||
PortTypeTCP = "TCP"
|
||||
PortTypeUDP = "UDP"
|
||||
@@ -13,4 +15,6 @@ type Port struct {
|
||||
ID int `json:"id,omitempty"`
|
||||
PortType string `json:"portType,omitempty"`
|
||||
PortNumber int `json:"portNumber,omitempty"`
|
||||
|
||||
UDPLayer gopacket.Layer
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user