Skip to content

Commit

Permalink
Land rapid7#19015, Allow static DNS hostnames ending in a . to be que…
Browse files Browse the repository at this point in the history
…ried
  • Loading branch information
dwelch-r7 authored Mar 27, 2024
2 parents c499510 + 8bb690f commit 47fc61f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rex/proto/dns/static_hostnames.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def add(hostname, ip_address)

ip_address = IPAddr.new(ip_address) if ip_address.is_a?(String) && Rex::Socket.is_ip_addr?(ip_address)

hostname = hostname.downcase
hostname = hostname.downcase.delete_suffix('.')
this_host = @hostnames.fetch(hostname, {})
if ip_address.family == ::Socket::AF_INET
type = Dnsruby::Types::A
Expand Down

0 comments on commit 47fc61f

Please sign in to comment.