Skip to content

Commit

Permalink
Improved logic to keep the case of the remote share name in prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
p0dalirius committed Jun 2, 2024
1 parent 82389e1 commit 4912c97
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion smbclientng/core/SMBSession.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,14 @@ def set_share(self, shareName):
"""

if shareName is not None:
self.smb_share = shareName
self.list_shares()
if shareName.lower() in self.available_shares.keys():
# Doing this in order to keep the case of the share adevertised by the remote machine
self.smb_share = self.available_shares[shareName.lower()]
else:
print("[!] Could not set share '%s', it does not exist remotely." % shareName)



def set_cwd(self, path=None):
"""
Expand Down

0 comments on commit 4912c97

Please sign in to comment.