diff --git a/lib/msf/core/auxiliary/scanner.rb b/lib/msf/core/auxiliary/scanner.rb index 655cbc2dd4..9ec23677de 100644 --- a/lib/msf/core/auxiliary/scanner.rb +++ b/lib/msf/core/auxiliary/scanner.rb @@ -49,8 +49,9 @@ def run while (tl.length < datastore['THREADS']) ip = ar.next_ip break if not ip - tl << Thread.new do - targ = ip.dup + + tl << Thread.new(ip.dup) do |tip| + targ = tip nmod = self.replicant nmod.datastore['RHOST'] = targ