Skip to content

Commit 74ecd3a

Browse files
committed
Don't break out of loop if one file doesn't have meaningful content
1 parent 17e03d2 commit 74ecd3a

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

nxc/modules/notepad.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ def read_and_decode_file(self, connection, context, file_path, user):
122122
]
123123

124124
def on_admin_login(self, context, connection):
125+
self.context = context
125126
context.log.display("Searching for Notepad cache...")
126127
for directory in connection.conn.listPath("C$", "Users\\*"):
127128
found = 0
@@ -169,8 +170,6 @@ def on_admin_login(self, context, connection):
169170
output_file.write(f"Source: C:\\{file_path}\n\n")
170171
output_file.write("\n".join(content_lines)) # Write strings line by line
171172
context.log.success(f"Notepad tab state content written to: {path}")
172-
else:
173-
break
174173
except SessionError as e:
175174
error = self.get_error_string(e)
176175
if error == "STATUS_OBJECT_NAME_NOT_FOUND" or error == "STATUS_OBJECT_PATH_NOT_FOUND":

0 commit comments

Comments
 (0)