This commit is contained in:
crusader
2018-09-11 16:59:21 +09:00
parent 502ff3ef89
commit d2e70072e3
14 changed files with 221 additions and 138 deletions

View File

@@ -47,7 +47,7 @@ func scanV4(discoverySession session.DiscoverySession, targetHost *omd.Host) err
}
delay.Store(true)
if p := handlePacketTCP4(discoverySession, targetHost, ports, packet); nil != p {
go discoverySession.AddPort(p)
go discoverySession.AddPort("TCP SYN", p, nil)
}
case <-ticker.C:
if false == delay.Load().(bool) {
@@ -132,7 +132,6 @@ func handlePacketTCP4(discoverySession session.DiscoverySession, host *omd.Host,
p := &omd.Port{
MetaPortType: omm.ToMetaPortType(omm.MetaPortTypeEnumTCP),
PortNumber: json.Number(strconv.Itoa(port)),
DiscoveredBy: "TCP SYN",
DiscoveredDate: omu.NowPtr(),
}
p.Host = host