Implemented #remove_rule method.

This commit is contained in:
soh_cah_toa
2014-04-23 12:07:59 -04:00
parent b345da0203
commit ed986e4ed5

View File

@@ -76,6 +76,18 @@ module BeEF
end
end
# Removes the given DNS rule.
#
# @param id [String] rule identifier
#
# @return [Boolean] true if rule was removed, otherwise false
def remove_rule(id)
@lock.synchronize do
rule = BeEF::Core::Models::Dns::Rule.get(id)
rule.nil? ? false : rule.destroy
end
end
# Entry point for processing incoming DNS requests. Attempts to find a matching rule and
# sends back its associated response.
#