Skip to content

Commit

Permalink
Land #18944, Fix saving and loading DNS rules from the config
Browse files Browse the repository at this point in the history
  • Loading branch information
cdelafuente-r7 committed Mar 12, 2024
2 parents d964edd + 65cc577 commit 69f368b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rex/proto/dns/custom_nameserver_provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def load_config_entries
config = Msf::Config.load

with_rules = []
config.fetch("#{CONFIG_KEY_BASE}/entries", {}).each do |_name, value|
config.fetch("#{CONFIG_KEY_BASE}/rules", {}).each do |_name, value|
wildcard, resolvers, uses_comm = value.split(';')
wildcard = '*' if wildcard.blank?
resolvers = resolvers.split(',')
Expand Down Expand Up @@ -254,7 +254,7 @@ def save_config_upstream_rules
].join(';')
new_config["##{index}"] = val
end
Msf::Config.save("#{CONFIG_KEY_BASE}/upstream_rules" => new_config)
Msf::Config.save("#{CONFIG_KEY_BASE}/rules" => new_config)
end

def save_config_static_hostnames
Expand Down

0 comments on commit 69f368b

Please sign in to comment.