Skip to content

Commit da7cb78

Browse files
committed
Formatting and remove unnecessary check
1 parent 4546db8 commit da7cb78

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

nxc/modules/lockscreendoors.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,15 @@ def get_description(self, binary_data):
5252
return None
5353

5454
def on_admin_login(self, context, connection):
55-
target_path = "Windows/System32"
55+
target_path = "\\Windows\\System32"
5656
tampered = False
57-
readable_file_found = False
5857

5958
for exe, expected_descs in self.expected_descriptions.items():
6059
try:
6160
# Grab the binary from the share
6261
buf = BytesIO()
63-
connection.conn.getFile("C$", f"{target_path}/{exe}", buf.write)
62+
connection.conn.getFile("C$", f"{target_path}\\{exe}", buf.write)
6463
binary = buf.getvalue()
65-
readable_file_found = True
6664

6765
# Extract and normalize the file description
6866
file_desc = self.get_description(binary)
@@ -89,8 +87,5 @@ def on_admin_login(self, context, connection):
8987
# Silently skip if the file is not readable or doesn't exist
9088
continue
9189

92-
if not readable_file_found:
93-
return
94-
9590
if not tampered:
9691
context.log.display("All lock screen executable descriptions are consistent with the expected values")

0 commit comments

Comments
 (0)