diff --git a/lib/msf/core/exploit/exe.rb b/lib/msf/core/exploit/exe.rb index c27c4537c0..f4495c9558 100644 --- a/lib/msf/core/exploit/exe.rb +++ b/lib/msf/core/exploit/exe.rb @@ -16,7 +16,7 @@ module Exploit::EXE 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::Template', [ false, 'The executable template file name.' ]), OptBool.new( 'EXE::Inject', [ false, 'Set to preserve the original EXE function' ]), @@ -26,6 +26,7 @@ module Exploit::EXE end def get_custom_exe + print_status("Using custom executable #{datastore["EXE::Custom"]}, RHOST and RPORT settins will be ignored!") datastore['DisablePayloadHandler'] = true file = ::File.open(datastore['EXE::Custom'],'rb') exe = file.read(file.stat.size)