Skip to content

Commit 694eacf

Browse files
committed
performance fix for host discovery post modules
1 parent 90ae5c1 commit 694eacf

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

modules/post/multi/gather/ping_sweep.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ def run
9797
end
9898

9999
end
100-
a.map {|x| x.join }
101100
end
101+
a.map {|x| x.join }
102102
end
103103
rescue Rex::TimeoutError, Rex::Post::Meterpreter::RequestError
104104
rescue ::Exception => e

modules/post/windows/gather/arp_scanner.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def arp_scan(cidr,threads)
6464
end
6565

6666
while(not iplst.nil? and not iplst.empty?)
67+
a = []
6768
1.upto(threads) do
6869
a << framework.threads.spawn("Module(#{self.refname})", false, iplst.shift) do |ip_text|
6970
next if ip_text.nil?
@@ -79,8 +80,8 @@ def arp_scan(cidr,threads)
7980
report_note(:host => ip_text, :type => "mac_oui", :data => company)
8081
end
8182
end
82-
a.map {|x| x.join }
8383
end
84+
a.map {|x| x.join }
8485
end
8586
return found
8687
end

0 commit comments

Comments
 (0)