File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -73,9 +73,9 @@ def reverselkp(iprange)
73
73
end
74
74
while ( true )
75
75
# Spawn threads for each host
76
+ hosts = Hash . new
76
77
while ( tl . length <= @threadnum )
77
78
ip = ar . next_ip
78
- hosts = Array . new
79
79
break if not ip
80
80
tl << framework . threads . spawn ( "Module(#{ self . refname } )-#{ ip } " , false , ip . dup ) do |tip |
81
81
begin
@@ -92,16 +92,21 @@ def reverselkp(iprange)
92
92
:host => tip . to_s ,
93
93
:name => addresstp
94
94
)
95
- hosts . push addresstp
95
+ if !hosts [ tip ]
96
+ hosts [ tip ] = Array . new
97
+ end
98
+ hosts [ tip ] . push addresstp
96
99
end
97
- if !hosts . empty?
98
- report_note (
99
- :host => tip . to_s ,
100
- :type => "RDNS_Record" ,
101
- :data => hosts
102
- )
100
+
101
+ if hosts [ tip ]
102
+ if !hosts [ tip ] . empty?
103
+ report_note (
104
+ :host => tip . to_s ,
105
+ :type => "RDNS_Record" ,
106
+ :data => hosts [ tip ]
107
+ )
108
+ end
103
109
end
104
- hosts = Array . new
105
110
rescue ::Interrupt
106
111
raise $!
107
112
rescue ::Rex ::ConnectionError
You can’t perform that action at this time.
0 commit comments