File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,7 @@ def get_ip(host)
124
124
query = @res . search ( host , "A" )
125
125
if query
126
126
query . answer . each do |rr |
127
+ next unless rr . type == "A"
127
128
record = { }
128
129
record [ :host ] = host
129
130
record [ :type ] = "A"
@@ -134,6 +135,7 @@ def get_ip(host)
134
135
query1 = @res . search ( host , "AAAA" )
135
136
if query1
136
137
query1 . answer . each do |rr |
138
+ next unless rr . type == "AAAA"
137
139
record = { }
138
140
record [ :host ] = host
139
141
record [ :type ] = "AAAA"
@@ -189,6 +191,7 @@ def get_txt(target)
189
191
query = @res . query ( target , "TXT" )
190
192
return results if not query
191
193
query . answer . each do |rr |
194
+ next unless rr . type == "TXT"
192
195
record = { }
193
196
record [ :host ] = target
194
197
record [ :text ] = rr . txt
You can’t perform that action at this time.
0 commit comments