forked from p15670423/monkey
Agent: Fix WebRCE windows target path
This commit is contained in:
parent
47306b0d38
commit
8a3a92182e
|
@ -34,7 +34,7 @@ class WebRCE(HostExploiter):
|
||||||
def __init__(self, monkey_target_paths=None):
|
def __init__(self, monkey_target_paths=None):
|
||||||
"""
|
"""
|
||||||
:param monkey_target_paths: Where to upload the monkey at the target host system.
|
: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':... }
|
Dict in format {'linux': '/tmp/monkey.sh', 'win64':... }
|
||||||
"""
|
"""
|
||||||
super(WebRCE, self).__init__()
|
super(WebRCE, self).__init__()
|
||||||
self.monkey_target_paths = monkey_target_paths
|
self.monkey_target_paths = monkey_target_paths
|
||||||
|
@ -410,7 +410,7 @@ class WebRCE(HostExploiter):
|
||||||
"""
|
"""
|
||||||
Gets destination path from one of WEB_RCE predetermined paths(self.monkey_target_paths).
|
Gets destination path from one of WEB_RCE predetermined paths(self.monkey_target_paths).
|
||||||
:param url_to_monkey: Hosted monkey's url. egz :
|
:param url_to_monkey: Hosted monkey's url. egz :
|
||||||
http://localserver:9999/monkey/windows-32.exe
|
http://localserver:9999/monkey/windows-64.exe
|
||||||
:return: Corresponding monkey path from self.monkey_target_paths
|
:return: Corresponding monkey path from self.monkey_target_paths
|
||||||
"""
|
"""
|
||||||
if not url_to_monkey or ("linux" not in url_to_monkey and "windows" not in url_to_monkey):
|
if not url_to_monkey or ("linux" not in url_to_monkey and "windows" not in url_to_monkey):
|
||||||
|
@ -421,9 +421,7 @@ class WebRCE(HostExploiter):
|
||||||
try:
|
try:
|
||||||
if "linux" in url_to_monkey:
|
if "linux" in url_to_monkey:
|
||||||
return self.monkey_target_paths["linux"]
|
return self.monkey_target_paths["linux"]
|
||||||
elif "windows-32" in url_to_monkey:
|
elif "windows" in url_to_monkey:
|
||||||
return self.monkey_target_paths["win32"]
|
|
||||||
elif "windows-64" in url_to_monkey:
|
|
||||||
return self.monkey_target_paths["win64"]
|
return self.monkey_target_paths["win64"]
|
||||||
else:
|
else:
|
||||||
logger.error(
|
logger.error(
|
||||||
|
@ -433,7 +431,7 @@ class WebRCE(HostExploiter):
|
||||||
return False
|
return False
|
||||||
except KeyError:
|
except KeyError:
|
||||||
logger.error(
|
logger.error(
|
||||||
'Unknown key was found. Please use "linux", "win32" and "win64" keys to '
|
'Unknown key was found. Please use "linux" and "win64" keys to '
|
||||||
"initialize "
|
"initialize "
|
||||||
"custom dict of monkey's destination paths"
|
"custom dict of monkey's destination paths"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue