Bugfix when upgrading the monkey without admin permissions.
Can happen during development or future exploit flows
This commit is contained in:
parent
c82fd3400a
commit
3fe6d2456b
|
@ -32,10 +32,14 @@ class WindowsUpgrader(object):
|
|||
|
||||
@staticmethod
|
||||
def upgrade(opts):
|
||||
monkey_64_path = ControlClient.download_monkey_exe_by_os(True, False)
|
||||
with monkeyfs.open(monkey_64_path, "rb") as downloaded_monkey_file:
|
||||
with open(WormConfiguration.dropper_target_path_win_64, 'wb') as written_monkey_file:
|
||||
shutil.copyfileobj(downloaded_monkey_file, written_monkey_file)
|
||||
try:
|
||||
monkey_64_path = ControlClient.download_monkey_exe_by_os(True, False)
|
||||
with monkeyfs.open(monkey_64_path, "rb") as downloaded_monkey_file:
|
||||
with open(WormConfiguration.dropper_target_path_win_64, 'wb') as written_monkey_file:
|
||||
shutil.copyfileobj(downloaded_monkey_file, written_monkey_file)
|
||||
except (IOError, AttributeError):
|
||||
LOG.error("Failed to download the Monkey to the target path.")
|
||||
return
|
||||
|
||||
monkey_options = build_monkey_commandline_explicitly(opts.parent, opts.tunnel, opts.server, opts.depth)
|
||||
|
||||
|
|
Loading…
Reference in New Issue