diff --git a/nxc/connection.py b/nxc/connection.py index 2f97e86be..2cf587de9 100755 --- a/nxc/connection.py +++ b/nxc/connection.py @@ -167,6 +167,9 @@ def __init__(self, args, db, target): except Exception as e: if "ERROR_DEPENDENT_SERVICES_RUNNING" in str(e): self.logger.error(f"Exception while calling proto_flow() on target {target}: {e}") + # Catching impacket SMB specific exceptions, which should not be imported due to performance reasons + elif e.__class__.__name__ in ["NetBIOSTimeout", "NetBIOSError"]: + self.logger.error(f"{e.__class__.__name__} on target {target}: {e}") else: self.logger.exception(f"Exception while calling proto_flow() on target {target}: {e}") finally: