fixup RHOST/RPORT expectations if only URI is set

MS-2855/keylogger-mettle-extension
Brent Cook 2017-11-30 10:51:02 -06:00
parent d689b33d7e
commit c288dab338
1 changed files with 1 additions and 2 deletions

View File

@ -104,8 +104,6 @@ class MetasploitModule < Msf::Exploit::Remote
end
register_file_for_cleanup(filename) if filename
#print_status("payload executed from file #{filename}") unless filename.nil?
#print_status("make sure to remove that file") unless filename.nil?
end
def exploit
@ -121,6 +119,7 @@ class MetasploitModule < Msf::Exploit::Remote
unless datastore['URI'].blank?
serveruri = datastore['URI']
(datastore['RHOST'], datastore['RPORT']) = serveruri.sub(/druby:\/\//i, '').split(':')
else
serveruri = "druby://#{datastore['RHOST']}:#{datastore['RPORT']}"
end