ing
This commit is contained in:
parent
fb41fef80c
commit
56ed908c50
11
discovery/service/service-tcp.go
Normal file
11
discovery/service/service-tcp.go
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
package service
|
||||||
|
|
||||||
|
import (
|
||||||
|
omd "git.loafle.net/overflow/model/discovery"
|
||||||
|
"git.loafle.net/overflow_scanner/probe/discovery/session"
|
||||||
|
)
|
||||||
|
|
||||||
|
func scanTCP(discoverySession session.DiscoverySession, targetPort *omd.Port) error {
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
11
discovery/service/service-udp.go
Normal file
11
discovery/service/service-udp.go
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
package service
|
||||||
|
|
||||||
|
import (
|
||||||
|
omd "git.loafle.net/overflow/model/discovery"
|
||||||
|
"git.loafle.net/overflow_scanner/probe/discovery/session"
|
||||||
|
)
|
||||||
|
|
||||||
|
func scanUDP(discoverySession session.DiscoverySession, targetPort *omd.Port) error {
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
20
discovery/service/service.go
Normal file
20
discovery/service/service.go
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
package service
|
||||||
|
|
||||||
|
import (
|
||||||
|
omd "git.loafle.net/overflow/model/discovery"
|
||||||
|
omm "git.loafle.net/overflow/model/meta"
|
||||||
|
"git.loafle.net/overflow_scanner/probe/discovery/session"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Scan(discoverySession session.DiscoverySession, targetPort *omd.Port) error {
|
||||||
|
metaPortTypeEnum := omm.ToMetaPortTypeEnum(targetPort.MetaPortType)
|
||||||
|
|
||||||
|
switch metaPortTypeEnum {
|
||||||
|
case omm.MetaPortTypeEnumTCP:
|
||||||
|
return scanTCP(discoverySession, targetPort)
|
||||||
|
case omm.MetaPortTypeEnumUDP:
|
||||||
|
return scanUDP(discoverySession, targetPort)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user