Agent: Skip SMBFingerprinter if SMB_PORT is not open

This commit is contained in:
Mike Salvatore 2022-02-09 09:56:29 -05:00
parent ab3daeb2e8
commit fec7d987d8
1 changed files with 4 additions and 0 deletions

View File

@ -150,6 +150,10 @@ class SMBFingerprinter(IFingerprinter):
}
os_type = None
os_version = None
if (SMB_PORT not in port_scan_data) or (port_scan_data[SMB_PORT].status != PortStatus.OPEN):
return FingerprintData(None, None, services)
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(0.7)