From 8bb690fa019599a24925e38643c3a3080e5b62b7 Mon Sep 17 00:00:00 2001 From: Spencer McIntyre Date: Tue, 26 Mar 2024 08:40:24 -0400 Subject: [PATCH] Remove any trailing dots from static names This allows them to be queried --- lib/rex/proto/dns/static_hostnames.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rex/proto/dns/static_hostnames.rb b/lib/rex/proto/dns/static_hostnames.rb index ce2f3b928b79..c1c0ea6dd36d 100644 --- a/lib/rex/proto/dns/static_hostnames.rb +++ b/lib/rex/proto/dns/static_hostnames.rb @@ -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