Implemented #remove_rule method.
This commit is contained in:
@@ -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.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user