diff --git a/extensions/dns/dns.rb b/extensions/dns/dns.rb index b0a7dceeb..30940eff9 100644 --- a/extensions/dns/dns.rb +++ b/extensions/dns/dns.rb @@ -93,6 +93,13 @@ module BeEF @lock.synchronize { BeEF::Core::Models::Dns::Rule.collect { |rule| to_hash(rule) } } end + # Removes the entire DNS ruleset. + # + # @return [Boolean] true if ruleset was destroyed, otherwise false + def remove_ruleset + @lock.synchronize { BeEF::Core::Models::Dns::Rule.destroy } + end + # Entry point for processing incoming DNS requests. Attempts to find a matching rule and # sends back its associated response. #