Skip to content

Commit

Permalink
Land #19012, Fix/dns/dot suffixed names
Browse files Browse the repository at this point in the history
  • Loading branch information
adfoster-r7 committed Mar 25, 2024
2 parents 919e6d4 + 6d1d20c commit 30093ea
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ GEM
metasm
rex-core
rex-text
rex-socket (0.1.56)
rex-socket (0.1.57)
rex-core
rex-sslscan (0.1.10)
rex-core
Expand Down
2 changes: 1 addition & 1 deletion LICENSE_GEMS
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ rex-powershell, 0.1.99, "New BSD"
rex-random_identifier, 0.1.11, "New BSD"
rex-registry, 0.1.5, "New BSD"
rex-rop_builder, 0.1.5, "New BSD"
rex-socket, 0.1.56, "New BSD"
rex-socket, 0.1.57, "New BSD"
rex-sslscan, 0.1.10, "New BSD"
rex-struct2, 0.1.4, "New BSD"
rex-text, 0.2.56, "New BSD"
Expand Down
9 changes: 8 additions & 1 deletion lib/rex/proto/dns/resolver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,15 @@ def initialize(config = {})
raise ResolverArgumentError, "Option #{key} not valid"
end
end

self.static_hostnames = StaticHostnames.new(hostnames: static_hosts)
self.static_hostnames.parse_hosts_file
begin
self.static_hostnames.parse_hosts_file
rescue StandardError => e
@logger.error 'Failed to parse the hosts file, ignoring it'
# if the hosts file is corrupted, just use a default instance with any specified hostnames
self.static_hostnames = StaticHostnames.new(hostnames: static_hosts)
end
end
#
# Provides current proxy setting if configured
Expand Down

0 comments on commit 30093ea

Please sign in to comment.