A host of other changes got roped into this as well. #match now silently handles blocks passed as a String in order to handle the 'block' JSON parameter. This is because sourcify doesn't work with eval'd data. Rule id's are no longer incremental integers. It's now a 7-character "token" generated from #secure_token and is managed by the RubyDNS module.
28 lines
589 B
Ruby
28 lines
589 B
Ruby
#
|
|
# Copyright (c) 2006-2013 Wade Alcorn - wade@bindshell.net
|
|
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
|
# See the file 'doc/COPYING' for copying permission
|
|
#
|
|
module BeEF
|
|
module Core
|
|
module Models
|
|
module DNS
|
|
|
|
class Rule
|
|
|
|
include DataMapper::Resource
|
|
|
|
storage_names[:default] = 'extension_dns_rules'
|
|
|
|
property :id, String, :key => true # Unique identifier
|
|
property :pattern, Object # Query pattern
|
|
property :type, Object # Resource type
|
|
property :block, Text # Associated callback
|
|
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|