Fixes by the fabled wvu
parent
4ca595eb15
commit
f439edfa1a
|
@ -134,15 +134,8 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
|
||||
def execute_command(cmd, opts = {})
|
||||
vprint_status("Executing #{cmd}")
|
||||
begin
|
||||
Timeout.timeout(5) do
|
||||
self.ssh_socket.exec!("#{cmd}\n")
|
||||
end
|
||||
rescue Timeout::Error
|
||||
print_error("SSH Timeout Exception will say the Exploit Failed; do not believe it.")
|
||||
print_good("You will likely still get a shell; run sessions -l to be sure.")
|
||||
end
|
||||
end
|
||||
|
||||
def do_login(ip, user, pass, port)
|
||||
factory = ssh_socket_factory
|
||||
|
@ -155,8 +148,9 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
proxy: factory,
|
||||
non_interactive: true
|
||||
}
|
||||
|
||||
opt_hash[:verbose] = :debug if (datastore['SSH_DEBUG'])
|
||||
if (datastore['SSH_DEBUG'])
|
||||
opt_hash[:verbose] = :debug
|
||||
end
|
||||
|
||||
begin
|
||||
self.ssh_socket = Net::SSH.start(ip, user, opt_hash)
|
||||
|
|
Loading…
Reference in New Issue