Correct a fp with this exploit module (would always print success)
parent
cde508af03
commit
a2aaca5e85
|
@ -96,6 +96,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
rescue Rex::ConnectionError, Rex::AddressInUse
|
||||
return :connection_error
|
||||
rescue Net::SSH::Disconnect, ::EOFError
|
||||
print_error "#{rhost}:#{rport} SSH - Disconnected during negotiation"
|
||||
return :connection_disconnect
|
||||
rescue ::Timeout::Error
|
||||
print_error "#{rhost}:#{rport} SSH - Timed out during negotiation"
|
||||
|
@ -120,11 +121,9 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
|
||||
def exploit
|
||||
conn = do_login("root")
|
||||
if conn
|
||||
if conn.class == Net::SSH::CommandStream
|
||||
print_good "Successful login"
|
||||
handler(conn.lsock)
|
||||
else
|
||||
print_error "Login failed"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue