Skip to content

Commit c1e1205

Browse files
authored
Merge pull request Pennyw0rth#588 from Pennyw0rth/neff-patch-1
2 parents e68cc41 + d0a4be4 commit c1e1205

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

nxc/protocols/nfs.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def create_conn_obj(self):
116116
self.port = self.mnt_port
117117
self.proto_logger()
118118
except Exception as e:
119-
self.logger.fail(f"Error during Initialization: {e}")
119+
self.logger.info(f"Error during Initialization: {e}")
120120
return False
121121
return True
122122

@@ -590,6 +590,10 @@ def try_root_escape(self) -> bool:
590590
self.logger.debug(f"Trying root escape on shares: {shares}")
591591
for share in shares:
592592
mount_info = self.mount.mnt(share, self.auth)
593+
if mount_info["status"] != 0:
594+
self.logger.debug(f"Root escape: can't list directory {share}: {NFSSTAT3[mount_info['status']]}")
595+
self.mount.umnt(self.auth)
596+
continue
593597
mount_fh = mount_info["mountinfo"]["fhandle"]
594598
try:
595599
possible_root_fhs = self.get_root_handles(mount_fh)

0 commit comments

Comments
 (0)