Separated 'pattern' and 'type' properties in DNS model.
This will expose the resource type to the RESTful API (coming soon).
This commit is contained in:
@@ -14,9 +14,10 @@ module DNS
|
||||
|
||||
storage_names[:default] = 'extension_dns_rules'
|
||||
|
||||
property :id, Serial
|
||||
property :pattern, Object
|
||||
property :block, Text
|
||||
property :id, Serial # Unique identifier
|
||||
property :pattern, Object # Query pattern
|
||||
property :type, Object # Resource type
|
||||
property :block, Text # Associated callback
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -55,7 +55,8 @@ module RubyDNS
|
||||
# Add new rule to database
|
||||
BeEF::Core::Models::DNS::Rule.create(
|
||||
:id => id,
|
||||
:pattern => pattern,
|
||||
:pattern => pattern[0],
|
||||
:type => pattern[1],
|
||||
:block => block.to_source
|
||||
)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user