Skip to content

Commit 428fe00

Browse files
committed
Handle Rex::ConnectionTimeout
1 parent 4a0e9b2 commit 428fe00

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/exploits/multi/misc/java_rmi_server.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ def exploit
100100
# When the server stops due primer failing, re-raise
101101
# RuntimeError so it won't wait the full wfs_delays
102102
raise ::RuntimeError, "Exploit aborted due to failure #{fail_reason} #{(fail_detail || "No reason given")}"
103+
rescue Rex::ConnectionTimeout => e
104+
# When the primer fails due to an error connecting with
105+
# the rhost, re-raise RuntimeError so it won't wait the
106+
# full wfs_delays
107+
raise ::RuntimeError, e.message
103108
end
104109
end
105110

0 commit comments

Comments
 (0)