Skip to content

Commit

Permalink
Improved output of GPPPasswords
Browse files Browse the repository at this point in the history
  • Loading branch information
p0dalirius committed Jun 3, 2024
1 parent b781889 commit e721a5b
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions smbclientng/modules/GPPPasswords.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,17 @@ def __find_callback(self, entry, fullpath, depth):
if (not entry.is_directory()) and (entry.get_longname().lower().endswith('.xml')):
data = self.parse_xmlfile_content(fullpath)
if data is not None:
print("[+] %s" % fullpath)
for entry in data:
print(" | username: %s" % entry["attributes"]["username"])
print(" | password: %s" % entry["attributes"]["password"])
if len(data) > 1:
print("|")
if len(data) != 0:
print("[+] %s" % fullpath)
for entry in data:
if self.config.no_colors:
print(" | username: '%s'" % entry["attributes"]["username"])
print(" | password: '%s'" % entry["attributes"]["password"])
else:
print(" | \x1b[94musername\x1b[0m: '\x1b[93m%s\x1b[0m'" % entry["attributes"]["username"])
print(" | \x1b[94mpassword\x1b[0m: '\x1b[93m%s\x1b[0m'" % entry["attributes"]["password"])
if len(data) > 1:
print("|")
return None

def run(self, arguments):
Expand Down

0 comments on commit e721a5b

Please sign in to comment.