Skip to content

Commit 32ad986

Browse files
committed
Handle session errors for all dialects
1 parent ce63a36 commit 32ad986

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

enum4linux-ng.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,11 @@ def check_smb_dialects(self):
994994
output["Preferred Dialect"] = "> SMB 3.0"
995995

996996
output["Supported dialects"] = supported
997+
998+
# When we end up here, a preferred dialect must have been set. If this is still set to None,
999+
# we can conclude that the target does not support any dialect at all.
1000+
if not output["Preferred dialect"]:
1001+
return Result(None, f"No supported dialects found")
9971002
return Result(output, f"Supported dialects and settings:\n{yamlize(output)}")
9981003

9991004
### Session Checks

0 commit comments

Comments
 (0)