Agent: Remove 32-bit references from Hadoop

This commit is contained in:
Shreya Malviya 2022-02-25 23:04:03 +05:30
parent 1bf51cd047
commit 62263b8fbf
2 changed files with 4 additions and 8 deletions

View File

@ -29,11 +29,8 @@ def get_target_monkey(host):
if not monkey_path: if not monkey_path:
if host.os.get("type") == platform.system().lower(): if host.os.get("type") == platform.system().lower():
# if exe not found, and we have the same arch or arch is unknown and we are 32bit, # if exe not found, and we have the same arch, use our exe
# use our exe if host.os.get("machine", "").lower() == platform.machine().lower():
if (not host.os.get("machine") and sys.maxsize < 2 ** 32) or host.os.get(
"machine", ""
).lower() == platform.machine().lower():
monkey_path = sys.executable monkey_path = sys.executable
return monkey_path return monkey_path
@ -54,7 +51,7 @@ def get_monkey_depth():
def get_monkey_dest_path(url_to_monkey): def get_monkey_dest_path(url_to_monkey):
""" """
Gets destination path from monkey's source url. Gets destination path from monkey's source url.
:param url_to_monkey: Hosted monkey's url. egz : http://localserver:9999/monkey/windows-32.exe :param url_to_monkey: Hosted monkey's url. egz : http://localserver:9999/monkey/windows-64.exe
:return: Corresponding monkey path from configuration :return: Corresponding monkey path from configuration
""" """
from infection_monkey.config import WormConfiguration from infection_monkey.config import WormConfiguration

View File

@ -432,8 +432,7 @@ class WebRCE(HostExploiter):
except KeyError: except KeyError:
logger.error( logger.error(
'Unknown key was found. Please use "linux" 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"
) )
return False return False