Revert "'remove unused framework references"

This reverts commit 98a09b9f5c.
bug/bundler_fix
David Maloney 2013-08-24 17:52:57 -05:00
parent 98a09b9f5c
commit 4c57af051a
4 changed files with 19 additions and 19 deletions

View File

@ -71,9 +71,9 @@ module Exploit::EXE
pl ||= payload.encoded
if opts[:arch] and (opts[:arch] == ARCH_X64 or opts[:arch] == ARCH_X86_64)
exe = Msf::Util::EXE.to_win64pe_service(pl, opts)
exe = Msf::Util::EXE.to_win64pe_service(framework, pl, opts)
else
exe = Msf::Util::EXE.to_win32pe_service(pl, opts)
exe = Msf::Util::EXE.to_win32pe_service(framework, pl, opts)
end
exe_post_generation(opts)
@ -90,9 +90,9 @@ module Exploit::EXE
pl ||= payload.encoded
if opts[:arch] and (opts[:arch] == ARCH_X64 or opts[:arch] == ARCH_X86_64)
dll = Msf::Util::EXE.to_win64pe_dll(pl, opts)
dll = Msf::Util::EXE.to_win64pe_dll(framework, pl, opts)
else
dll = Msf::Util::EXE.to_win32pe_dll(pl, opts)
dll = Msf::Util::EXE.to_win32pe_dll(framework, pl, opts)
end
exe_post_generation(opts)

View File

@ -91,7 +91,7 @@ require 'msf/core/exe/segment_injector'
if( arch.index(ARCH_X86_64) or arch.index( ARCH_X64 ) )
if (plat.index(Msf::Module::Platform::Windows))
return to_win64pe(code, opts)
return to_win64pe(framework, code, opts)
end
if (plat.index(Msf::Module::Platform::Linux))
@ -147,7 +147,7 @@ require 'msf/core/exe/segment_injector'
end
# use
return self.to_win32pe_exe_sub(code, opts)
return self.to_win32pe_exe_sub(framework, code, opts)
end
# Allow the user to specify their own EXE template
@ -425,42 +425,42 @@ require 'msf/core/exe/segment_injector'
return pe
end
def self.to_win32pe_exe_sub(code, opts={})
def self.to_win32pe_exe_sub(framework, code, opts={})
# Allow the user to specify their own DLL template
set_template_default(opts, "template_x86_windows.exe")
opts[:exe_type] = :exe_sub
exe_sub_method(code,opts)
end
def self.to_win64pe(code, opts={})
def self.to_win64pe(framework, code, opts={})
# Allow the user to specify their own EXE template
set_template_default(opts, "template_x64_windows.exe")
opts[:exe_type] = :exe_sub
exe_sub_method(code,opts)
end
def self.to_win32pe_service(code, opts={})
def self.to_win32pe_service(framework, code, opts={})
# Allow the user to specify their own service EXE template
set_template_default(opts, "template_x86_windows_svc.exe")
opts[:exe_type] = :service_exe
exe_sub_method(code,opts)
end
def self.to_win64pe_service(code, opts={})
def self.to_win64pe_service(framework, code, opts={})
# Allow the user to specify their own service EXE template
set_template_default(opts, "template_x64_windows_svc.exe")
opts[:exe_type] = :service_exe
exe_sub_method(code,opts)
end
def self.to_win32pe_dll(code, opts={})
def self.to_win32pe_dll(framework, code, opts={})
# Allow the user to specify their own DLL template
set_template_default(opts, "template_x86_windows.dll")
opts[:exe_type] = :dll
exe_sub_method(code,opts)
end
def self.to_win64pe_dll(code, opts={})
def self.to_win64pe_dll(framework, code, opts={})
# Allow the user to specify their own DLL template
set_template_default(opts, "template_x64_windows.dll")
opts[:exe_type] = :dll
@ -1855,15 +1855,15 @@ End Sub
when 'dll'
output = case arch
when ARCH_X86,nil then to_win32pe_dll(code, exeopts)
when ARCH_X86_64 then to_win64pe_dll(code, exeopts)
when ARCH_X64 then to_win64pe_dll(code, exeopts)
when ARCH_X86,nil then to_win32pe_dll(framework, code, exeopts)
when ARCH_X86_64 then to_win64pe_dll(framework, code, exeopts)
when ARCH_X64 then to_win64pe_dll(framework, code, exeopts)
end
when 'exe'
output = case arch
when ARCH_X86,nil then to_win32pe(framework, code, exeopts)
when ARCH_X86_64 then to_win64pe(code, exeopts)
when ARCH_X64 then to_win64pe(code, exeopts)
when ARCH_X86_64 then to_win64pe(framework, code, exeopts)
when ARCH_X64 then to_win64pe(framework, code, exeopts)
end
when 'exe-small'

View File

@ -60,7 +60,7 @@ class Metasploit3 < Msf::Exploit::Local
raw = payload.encoded
exe = Msf::Util::EXE.to_win32pe_service(raw)
exe = Msf::Util::EXE.to_win32pe_service(session.framework, raw)
sysdir = session.fs.file.expand_path("%SystemRoot%")
tmpdir = session.fs.file.expand_path("%TEMP%")

View File

@ -140,7 +140,7 @@ class Metasploit3 < Msf::Post
payload.datastore['LHOST'] = lhost
payload.datastore['LPORT'] = lport
exe = Msf::Util::EXE.to_win32pe_service(payload.generate)
exe = Msf::Util::EXE.to_win32pe_service(session.framework, payload.generate)
begin
print_status("Uploading payload #{file} executable to temp directory")
# Upload the payload to the filesystem