Skip to content

Commit

Permalink
Annotate skip of Debian IPv6 hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
RageLtMan committed Apr 6, 2023
1 parent 4a38939 commit ddbce6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rex/proto/dns/resolver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def initialize(config = {})
hf = Rex::Compat.is_windows ? '%WINDIR%/system32/drivers/etc/hosts' : '/etc/hosts'
entries = File.read(hf).lines.map(&:strip).select do |entry|
Rex::Socket.is_ip_addr?(entry.gsub(/\s+/,' ').split(' ').first) and
not entry.match(/::.*ip6-/)
not entry.match(/::.*ip6-/) # Ignore Debian/Ubuntu-specific notation for IPv6 hosts
end.map do |entry|
entry.gsub(/\s+/,' ').split(' ')
end
Expand Down

0 comments on commit ddbce6a

Please sign in to comment.