This commit is contained in:
crusader
2017-11-22 19:04:04 +09:00
parent 18fe18ccef
commit 40f2ebad23
12 changed files with 386 additions and 7 deletions

View File

@@ -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 {

View File

@@ -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
}