Skip to content

Commit f1e599e

Browse files
authored
Merge pull request #44 from exploide/timeout-error
Show error when getting timeout during share enumeration
2 parents 84fe683 + 186f4d3 commit f1e599e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

enum4linux-ng.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2449,6 +2449,9 @@ def check_access(self, share):
24492449

24502450
result = SambaSmbclient(['dir', f'{share}'], self.target, self.creds).run(log=f'Attempting to map share //{self.target.host}/{share}', error_filter=False)
24512451

2452+
if not result.retval:
2453+
return Result(None, f"Could not check share: {result.retmsg}")
2454+
24522455
if "NT_STATUS_BAD_NETWORK_NAME" in result.retmsg:
24532456
return Result(None, "Share doesn't exist")
24542457

@@ -2474,6 +2477,9 @@ def check_access(self, share):
24742477
if "NT_STATUS_INVALID_PARAMETER" in result.retmsg:
24752478
return Result(None, "Could not check share: STATUS_INVALID_PARAMETER")
24762479

2480+
if "NT_STATUS_IO_TIMEOUT" in result.retmsg:
2481+
return Result(None, "Could not check share: STATUS_IO_TIMEOUT")
2482+
24772483
if re.search(r"\n\s+\.\.\s+D.*\d{4}\n", result.retmsg) or re.search(r".*blocks\sof\ssize.*blocks\savailable.*", result.retmsg):
24782484
return Result({"mapping":"ok", "listing":"ok"}, "Mapping: OK, Listing: OK")
24792485

0 commit comments

Comments
 (0)