Skip to content

Commit 93446a5

Browse files
committed
Add Exception handling when we get rpc_access_denied
1 parent ddc00c9 commit 93446a5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

nxc/protocols/smb.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,11 @@ def disks(self):
12601260

12611261
def local_groups(self):
12621262
self.logger.display("Enumerating with SAMRPC protocol")
1263-
groups, members = SamrFunc(self).get_local_groups(self.args.local_groups)
1263+
try:
1264+
groups, members = SamrFunc(self).get_local_groups(self.args.local_groups)
1265+
except DCERPCException as e:
1266+
self.logger.fail(f"Error enumerating local groups: {e}")
1267+
return
12641268
if groups:
12651269
self.logger.success("Enumerated local groups")
12661270
self.logger.debug(f"Local groups: {groups}")

0 commit comments

Comments
 (0)