forked from p34709852/monkey
agent: add icmp property to VictimHost
Keep track of whether or not PingScanner was successful by storing a boolean in VictimHost objects. This information is communicated back to the Monkey Island via telemetry.
This commit is contained in:
parent
458e01cf24
commit
c7a1f246cb
|
@ -7,6 +7,7 @@ class VictimHost(object):
|
|||
self.domain_name = str(domain_name)
|
||||
self.os = {}
|
||||
self.services = {}
|
||||
self.icmp = False
|
||||
self.monkey_exe = None
|
||||
self.default_tunnel = None
|
||||
self.default_server = None
|
||||
|
@ -40,7 +41,7 @@ class VictimHost(object):
|
|||
victim += "] Services - ["
|
||||
for k, v in list(self.services.items()):
|
||||
victim += "%s-%s " % (k, v)
|
||||
victim += '] '
|
||||
victim += '] ICMP: %s ' % (self.icmp)
|
||||
victim += "target monkey: %s" % self.monkey_exe
|
||||
return victim
|
||||
|
||||
|
|
|
@ -62,6 +62,9 @@ class PingScanner(HostScanner, HostFinger):
|
|||
host.os['type'] = 'linux'
|
||||
else: # as far we we know, could also be OSX/BSD but lets handle that when it comes up.
|
||||
host.os['type'] = 'windows'
|
||||
|
||||
host.icmp = True
|
||||
|
||||
return True
|
||||
except Exception as exc:
|
||||
LOG.debug("Error parsing ping fingerprint: %s", exc)
|
||||
|
|
Loading…
Reference in New Issue