Make EXE::Custom an OptPath so it can be tab'd

unstable
James Lee 2012-01-09 09:58:18 -07:00
parent bc9014e912
commit 1eb4900102
1 changed files with 2 additions and 1 deletions

View File

@ -16,7 +16,7 @@ module Exploit::EXE
register_advanced_options( register_advanced_options(
[ [
OptString.new( 'EXE::Custom', [ false, 'Use custom exe instead of automatically generating a payload exe']), OptPath.new( 'EXE::Custom', [ false, 'Use custom exe instead of automatically generating a payload exe']),
OptString.new( 'EXE::Path', [ false, 'The directory in which to look for the executable template' ]), OptString.new( 'EXE::Path', [ false, 'The directory in which to look for the executable template' ]),
OptString.new( 'EXE::Template', [ false, 'The executable template file name.' ]), OptString.new( 'EXE::Template', [ false, 'The executable template file name.' ]),
OptBool.new( 'EXE::Inject', [ false, 'Set to preserve the original EXE function' ]), OptBool.new( 'EXE::Inject', [ false, 'Set to preserve the original EXE function' ]),
@ -26,6 +26,7 @@ module Exploit::EXE
end end
def get_custom_exe def get_custom_exe
print_status("Using custom executable #{datastore["EXE::Custom"]}, RHOST and RPORT settins will be ignored!")
datastore['DisablePayloadHandler'] = true datastore['DisablePayloadHandler'] = true
file = ::File.open(datastore['EXE::Custom'],'rb') file = ::File.open(datastore['EXE::Custom'],'rb')
exe = file.read(file.stat.size) exe = file.read(file.stat.size)