2018-08-31 14:00:08 +00:00
|
|
|
package syn
|
2018-08-31 10:46:52 +00:00
|
|
|
|
|
|
|
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, targetHost *omd.Host) error {
|
2018-08-31 12:56:36 +00:00
|
|
|
if nil == targetHost || nil == discoverySession.DiscoverPort() {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-08-31 10:46:52 +00:00
|
|
|
metaIPTypeEnum := omm.ToMetaIPTypeEnum(discoverySession.Zone().MetaIPType)
|
|
|
|
|
|
|
|
switch metaIPTypeEnum {
|
|
|
|
case omm.MetaIPTypeEnumV4:
|
|
|
|
return scanV4(discoverySession, targetHost)
|
|
|
|
case omm.MetaIPTypeEnumV6:
|
|
|
|
return scanV4(discoverySession, targetHost)
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|