Fix guessing the arch with modules specifying an array

bug/bundler_fix
Spencer McIntyre 2014-08-03 21:42:17 -07:00
parent 893b9a6e99
commit 4b73ad6f40
1 changed files with 4 additions and 1 deletions

View File

@ -115,7 +115,10 @@ module Exploit::Local::WindowsKernel
#
def token_stealing_shellcode(target, arch = nil)
arch = target.opts['Arch'] if arch.nil? && target && target.opts['Arch']
arch = module_info['Arch'] if arch.nil? && module_info['Arch']
if arch.nil? && module_info['Arch']
arch = module_info['Arch']
arch = arch[0] if arch.class.to_s == 'Array' and arch.length == 1
end
if arch.nil?
print_error('Can not determine the target architecture')
fail ArgumentError, 'Invalid arch'