Skip to content

Commit f439edf

Browse files
committed
Fixes by the fabled wvu
1 parent 4ca595e commit f439edf

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

modules/exploits/multi/ssh/sshexec.rb

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,7 @@ def initialize
134134

135135
def execute_command(cmd, opts = {})
136136
vprint_status("Executing #{cmd}")
137-
begin
138-
Timeout.timeout(5) do
139-
self.ssh_socket.exec!("#{cmd}\n")
140-
end
141-
rescue Timeout::Error
142-
print_error("SSH Timeout Exception will say the Exploit Failed; do not believe it.")
143-
print_good("You will likely still get a shell; run sessions -l to be sure.")
144-
end
137+
self.ssh_socket.exec!("#{cmd}\n")
145138
end
146139

147140
def do_login(ip, user, pass, port)
@@ -155,8 +148,9 @@ def do_login(ip, user, pass, port)
155148
proxy: factory,
156149
non_interactive: true
157150
}
158-
159-
opt_hash[:verbose] = :debug if (datastore['SSH_DEBUG'])
151+
if (datastore['SSH_DEBUG'])
152+
opt_hash[:verbose] = :debug
153+
end
160154

161155
begin
162156
self.ssh_socket = Net::SSH.start(ip, user, opt_hash)

0 commit comments

Comments
 (0)