Skip to content

Commit

Permalink
Remove any trailing dots from static names
Browse files Browse the repository at this point in the history
This allows them to be queried
  • Loading branch information
zeroSteiner committed Mar 26, 2024
1 parent 5a77f76 commit 8bb690f
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 8bb690f

Please sign in to comment.