forked from p15670423/monkey
Agent: Change exceptions' log level to warning in IPScanner
This commit is contained in:
parent
e3fc5cf5e5
commit
58d4c33959
|
@ -64,13 +64,13 @@ class IPScanner:
|
||||||
try:
|
try:
|
||||||
ping_scan_data = self._puppet.ping(address.ip, icmp_timeout)
|
ping_scan_data = self._puppet.ping(address.ip, icmp_timeout)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
logger.debug(f"Exception encountered when pinging {address.ip}: {str(ex)}")
|
logger.warning(f"Exception encountered when pinging {address.ip}: {str(ex)}")
|
||||||
ping_scan_data = PingScanData(False, None)
|
ping_scan_data = PingScanData(False, None)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
port_scan_data = self._puppet.scan_tcp_ports(address.ip, tcp_ports, tcp_timeout)
|
port_scan_data = self._puppet.scan_tcp_ports(address.ip, tcp_ports, tcp_timeout)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
logger.debug(
|
logger.warning(
|
||||||
f"Exception encountered when scanning TCP ports on {address.ip}: {str(ex)}"
|
f"Exception encountered when scanning TCP ports on {address.ip}: {str(ex)}"
|
||||||
)
|
)
|
||||||
port_scan_data = {-1: PortScanData(-1, PortStatus.CLOSED, None, None)}
|
port_scan_data = {-1: PortScanData(-1, PortStatus.CLOSED, None, None)}
|
||||||
|
@ -83,7 +83,7 @@ class IPScanner:
|
||||||
address.ip, fingerprinters, ping_scan_data, port_scan_data, stop
|
address.ip, fingerprinters, ping_scan_data, port_scan_data, stop
|
||||||
)
|
)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
logger.debug(
|
logger.warning(
|
||||||
f"Exception encountered running fingerprinters on {address.ip}: "
|
f"Exception encountered running fingerprinters on {address.ip}: "
|
||||||
f"{str(ex)}"
|
f"{str(ex)}"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue