This commit is contained in:
crusader 2018-08-31 19:53:33 +09:00
parent fb41fef80c
commit 56ed908c50
3 changed files with 42 additions and 0 deletions

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

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

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