Skip to content

Commit 80d03ad

Browse files
authored
Merge pull request Pennyw0rth#387 from Pennyw0rth/neff-fix-netbios
Stop NetBiosTimeout and error producing large stack traces
2 parents c0adbf1 + 4504cf2 commit 80d03ad

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

nxc/connection.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ def __init__(self, args, db, target):
167167
except Exception as e:
168168
if "ERROR_DEPENDENT_SERVICES_RUNNING" in str(e):
169169
self.logger.error(f"Exception while calling proto_flow() on target {target}: {e}")
170+
# Catching impacket SMB specific exceptions, which should not be imported due to performance reasons
171+
elif e.__class__.__name__ in ["NetBIOSTimeout", "NetBIOSError"]:
172+
self.logger.error(f"{e.__class__.__name__} on target {target}: {e}")
170173
else:
171174
self.logger.exception(f"Exception while calling proto_flow() on target {target}: {e}")
172175
finally:

0 commit comments

Comments
 (0)