From 7b356cf8930522caef90c0f1be6bd64c30521ac5 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 14 Jun 2022 12:54:37 -0400 Subject: [PATCH] Agent: Refactor MSSQL run payload file commands Use _run_mssql_command() and remove the dependency on MSSQLLimitedSizePayload. --- monkey/infection_monkey/exploit/mssqlexec.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/monkey/infection_monkey/exploit/mssqlexec.py b/monkey/infection_monkey/exploit/mssqlexec.py index cc4aed8d5..fd554504b 100644 --- a/monkey/infection_monkey/exploit/mssqlexec.py +++ b/monkey/infection_monkey/exploit/mssqlexec.py @@ -99,8 +99,7 @@ class MSSQLExploiter(HostExploiter): return self.exploit_result def run_payload_file(self): - file_running_command = MSSQLLimitedSizePayload(str(self.payload_file_path)) - return self.run_mssql_command(file_running_command) + self._run_mssql_command(str(self.payload_file_path)) def create_temp_dir(self): logger.debug(f"Creating a temporary directory: {MSSQLExploiter.TMP_DIR_PATH}")