Monkey: Guard against exceptions while fingerprinting

This commit is contained in:
Ace Pace 2020-12-07 16:54:58 +02:00
parent db20ee10a8
commit 030b1c683e
1 changed files with 5 additions and 1 deletions

View File

@ -170,7 +170,11 @@ class InfectionMonkey(object):
for finger in self._fingerprint:
LOG.info("Trying to get OS fingerprint from %r with module %s",
machine, finger.__class__.__name__)
try:
finger.get_host_fingerprint(machine)
except BaseException as exc:
LOG.error("Failed to run fingerprinter %s, exception %s" % finger.__class__.__name__,
str(exc))
ScanTelem(machine).send()