Comments and CR notes fixed

This commit is contained in:
Vakaris 2018-08-22 13:41:17 +03:00
parent eae3f3440d
commit e1b1236fb3
1 changed files with 5 additions and 4 deletions

View File

@ -5,7 +5,7 @@ from model import *
from posixpath import join from posixpath import join
import re import re
from abc import abstractmethod from abc import abstractmethod
from exploit.tools import get_target_monkey, get_monkey_depth, build_monkey_commandline, HTTPTools, get_monkey_dest_path from exploit.tools import get_target_monkey, get_monkey_depth, build_monkey_commandline, HTTPTools
from network.tools import check_tcp_port, tcp_port_to_service from network.tools import check_tcp_port, tcp_port_to_service
__author__ = 'VakarisZ' __author__ = 'VakarisZ'
@ -24,7 +24,8 @@ class WebRCE(HostExploiter):
def __init__(self, host, monkey_target_paths): def __init__(self, host, monkey_target_paths):
""" """
:param host: Host that we'll attack :param host: Host that we'll attack
:param monkey_target_paths: Dict in format {'linux': '/tmp/monkey.sh', 'win32': './monkey32.exe', 'win64':... } :param monkey_target_paths: Where to upload the monkey at the target host system.
Dict in format {'linux': '/tmp/monkey.sh', 'win32': './monkey32.exe', 'win64':... }
""" """
super(WebRCE, self).__init__(host) super(WebRCE, self).__init__(host)
self._config = __import__('config').WormConfiguration self._config = __import__('config').WormConfiguration
@ -66,7 +67,7 @@ class WebRCE(HostExploiter):
def exploit_host(self): def exploit_host(self):
""" """
Override this method to pass custom arguments to default_exploit_host Method that contains default exploitation workflow
:return: True if exploited, False otherwise :return: True if exploited, False otherwise
""" """
# We get exploit configuration # We get exploit configuration
@ -424,7 +425,7 @@ class WebRCE(HostExploiter):
def get_default_dropper_path(self): def get_default_dropper_path(self):
""" """
Gets default dropper path for the host. Gets default dropper path for the host.
:return: Default monkey's destination path for corresponding host. :return: Default monkey's destination path for corresponding host or False if failed.
E.g. config.dropper_target_path_linux(/tmp/monkey.sh) for linux host E.g. config.dropper_target_path_linux(/tmp/monkey.sh) for linux host
""" """
if not self.host.os.get('type') or (self.host.os['type'] != 'linux' and self.host.os['type'] != 'windows'): if not self.host.os.get('type') or (self.host.os['type'] != 'linux' and self.host.os['type'] != 'windows'):