forked from p15670423/monkey
Agent: Override `HostExploiter`'s `pre_exploit()` in `WebRCE`
This commit is contained in:
parent
87547c4da1
commit
eb9adc08c2
|
@ -38,15 +38,7 @@ class WebRCE(HostExploiter):
|
||||||
Dict in format {'linux': '/tmp/monkey.sh', 'win32': './monkey32.exe', 'win64':... }
|
Dict in format {'linux': '/tmp/monkey.sh', 'win32': './monkey32.exe', 'win64':... }
|
||||||
"""
|
"""
|
||||||
super(WebRCE, self).__init__()
|
super(WebRCE, self).__init__()
|
||||||
if monkey_target_paths:
|
self.monkey_target_paths = monkey_target_paths
|
||||||
self.monkey_target_paths = monkey_target_paths
|
|
||||||
else:
|
|
||||||
self.monkey_target_paths = {
|
|
||||||
"linux": self.options["dropper_target_path_linux"],
|
|
||||||
"win32": self.options["dropper_target_path_win_32"],
|
|
||||||
"win64": self.options["dropper_target_path_win_64"],
|
|
||||||
}
|
|
||||||
self.HTTP = [str(port) for port in self.options["http_ports"]]
|
|
||||||
self.vulnerable_urls = []
|
self.vulnerable_urls = []
|
||||||
self.target_url = None
|
self.target_url = None
|
||||||
|
|
||||||
|
@ -121,6 +113,16 @@ class WebRCE(HostExploiter):
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def pre_exploit(self):
|
||||||
|
if not self.monkey_target_paths:
|
||||||
|
self.monkey_target_paths = {
|
||||||
|
"linux": self.options["dropper_target_path_linux"],
|
||||||
|
"win32": self.options["dropper_target_path_win_32"],
|
||||||
|
"win64": self.options["dropper_target_path_win_64"],
|
||||||
|
}
|
||||||
|
self.HTTP = [str(port) for port in self.options["http_ports"]]
|
||||||
|
super().pre_exploit()
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def exploit(self, url, command):
|
def exploit(self, url, command):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue