Skip to content

Commit b37dc8e

Browse files
author
Brent Cook
committed
Land rapid7#7210, allow send_request_cgi to close a non-global socket
2 parents bf77e14 + 498657a commit b37dc8e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

lib/msf/core/auxiliary/scanner.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def setup
4141

4242
def cleanup
4343
datastore['RHOST'] = @original_rhost
44+
super
4445
end
4546

4647

lib/msf/core/exploit/http/client.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,10 @@ def connect(opts={})
210210
if (self.client)
211211
disconnect
212212
end
213-
214-
self.client = nclient
215213
end
216214

215+
self.client = nclient
216+
217217
return nclient
218218
end
219219

@@ -297,6 +297,10 @@ def disconnect(nclient = self.client)
297297
end
298298

299299
if (nclient == self.client)
300+
if self.client.respond_to?(:close)
301+
self.client.close
302+
end
303+
300304
self.client = nil
301305
end
302306
end

0 commit comments

Comments
 (0)