Merge pull request #898 from acepace/bugfix_fingerprinter

Monkey: Guard against exceptions while fingerprinting
This commit is contained in:
Ace Pace 2020-12-07 17:30:54 +02:00 committed by GitHub
commit f07826d5d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -170,7 +170,11 @@ class InfectionMonkey(object):
for finger in self._fingerprint: for finger in self._fingerprint:
LOG.info("Trying to get OS fingerprint from %r with module %s", LOG.info("Trying to get OS fingerprint from %r with module %s",
machine, finger.__class__.__name__) machine, finger.__class__.__name__)
finger.get_host_fingerprint(machine) 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() ScanTelem(machine).send()