Skip to content

Commit 5ac6060

Browse files
committed
Auxiliary::Web::HTTP_request: Updated to return an empty response on reset connections
1 parent 74cdd91 commit 5ac6060

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lib/msf/core/auxiliary/web/http.rb

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,7 @@ def run
123123
# Spawn threads for each host
124124
while tl.size <= (opts[:max_threads] || 5) && !@queue.empty? && (req = @queue.pop)
125125
tl << framework.threads.spawn( "#{self.class.name} - #{req})", false, req ) do |request|
126-
begin
127-
request.handle_response request( request.url, request.opts )
128-
rescue => e
129-
print_error e.to_s
130-
e.backtrace.each { |l| print_error "-- #{l}" }
131-
end
126+
request.handle_response request( request.url, request.opts )
132127
end
133128
end
134129

@@ -296,7 +291,7 @@ def _request( url, opts = {} )
296291
Response.from_rex_response c.send_recv( c.request_cgi( opts ), timeout )
297292
rescue ::Timeout::Error
298293
Response.timed_out
299-
rescue ::Errno::EPIPE, Rex::ConnectionTimeout
294+
rescue ::Errno::EPIPE, ::Errno::ECONNRESET, Rex::ConnectionTimeout
300295
Response.empty
301296
end
302297

0 commit comments

Comments
 (0)