Skip to content

Commit 4e909a2

Browse files
committed
code cleanup
1 parent b38bd1e commit 4e909a2

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

lib/takeover/metasploit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ def _controlMsfCmd(self, proc, func):
519519
timeout = time.time() - start_time > METASPLOIT_SESSION_TIMEOUT
520520

521521
if not initialized:
522-
match = re.search("session ([\d]+) opened", out)
522+
match = re.search("Meterpreter session ([\d]+) opened", out)
523523

524524
if match:
525525
self._loadMetExtensions(proc, match.group(1))

plugins/dbms/mssqlserver/filesystem.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ def _stackedWriteFilePS(self, tmpPath, wFileContent, dFile, fileType):
196196
logger.debug("executing the PowerShell base64-decoding script to write the %s file, please wait.." % dFile)
197197

198198
commands = ("powershell -ExecutionPolicy ByPass -File \"%s\"" % randPSScriptPath,
199+
"del /F /Q \"%s\"" % encodedBase64FilePath,
199200
"del /F /Q \"%s\"" % randPSScriptPath)
200201
complComm = " & ".join(command for command in commands)
201202

0 commit comments

Comments
 (0)