forked from p15670423/monkey
Fix TTL split logic
This commit is contained in:
parent
c572e515a1
commit
151ec3dbc9
|
@ -59,10 +59,10 @@ class PingScanner(HostScanner, HostFinger):
|
|||
if regex_result:
|
||||
try:
|
||||
ttl = int(regex_result.group(0))
|
||||
if (ttl > LINUX_TTL) and (ttl <= WINDOWS_TTL):
|
||||
host.os['type'] = 'windows'
|
||||
if ttl <= LINUX_TTL:
|
||||
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'
|
||||
return True
|
||||
except Exception as exc:
|
||||
LOG.debug("Error parsing ping fingerprint: %s", exc)
|
||||
|
|
Loading…
Reference in New Issue