We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e5d825 commit 9e6ba5aCopy full SHA for 9e6ba5a
1 file changed
nxc/protocols/nfs.py
@@ -224,7 +224,15 @@ def enum_shares(self):
224
for share, network in zip(shares, networks):
225
try:
226
mount_info = self.mount.mnt(share, self.auth)
227
- contents = self.list_dir(mount_info["mountinfo"]["fhandle"], share, self.args.enum_shares)
+ self.logger.debug(f"Mounted {share} - {mount_info}")
228
+ if mount_info["status"] != 0: # noqa: SIM102
229
+ if mount_info["status"] == 13:
230
+ self.logger.fail(f"{share} - Permission Denied")
231
+ continue
232
+ # check for other error codes here
233
+
234
+ fhandle = mount_info["mountinfo"]["fhandle"]
235
+ contents = self.list_dir(fhandle, share, self.args.enum_shares)
236
237
self.logger.success(share)
238
if contents:
0 commit comments