soh_cah_toa
9d4ea6c224
Fixed issue mentioned in FIXME comment in RubyDNS::Server#match.
...
Changed 'block.class.name' to just 'block' in case/when clause.
2013-07-22 22:42:27 -04:00
soh_cah_toa
b2aed14234
Added regex support to #add_rule (tests included).
...
Due to strange behavior in Sourcify, the /.../ literal syntax cannot
be used as a parameter; only %r{} or Regexp::new. There is a note
for this in the documentation for #add_rule.
2013-07-22 22:37:39 -04:00
soh_cah_toa
8d961c1938
Added support for rules that fail to resolve (e.g. NXDOMAIN).
...
Included unit tests.
2013-07-19 22:15:25 -04:00
soh_cah_toa
95d0ddbe87
Added new method #remove_ruleset that clears the entire DNS ruleset.
...
Included unit tests as well.
2013-07-17 18:16:46 -04:00
soh_cah_toa
3b58518cfd
Added tests for GET /api/dns/rule/:id handler.
...
Fixed #parse_response so that these tests pass.
2013-06-08 19:04:42 -04:00
soh_cah_toa
89a5d6fdbb
Modified #remove_rule to return a boolean value.
...
This is will soon allow the DELETE handler to indicate success
or failure.
2013-06-05 18:20:48 -04:00
soh_cah_toa
2f5133e11a
Changed GET handlers to return recently fixed rule data.
...
Also wrapped all handlers in a begin/end block that catches
internal StandardError exceptions.
2013-06-05 15:56:33 -04:00
soh_cah_toa
44622345d0
s/DNS/Dns/g since that is the BeEF style convention.
2013-06-03 17:55:58 -04:00
soh_cah_toa
0f8221918b
Improved coding style (a la ruby-style-guide and rubocop).
...
Because I'm too tired to start testing and need a little victory. ;)
2013-06-03 00:11:41 -04:00
soh_cah_toa
998980b566
Fixed case-statement in #match that prevented adding rules locally.
2013-06-02 22:23:27 -04:00
soh_cah_toa
27b1b530ef
Implemented POST handler for /api/dns/rule which adds a new rule.
...
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.
2013-05-26 22:44:11 -04:00
soh_cah_toa
c6f38324d1
Refactored #get_ruleset to be part of RubyDNS.
...
All database logic should be inside RubyDNS since BeEF's DNS class
is mostly just a wrapper around it.
2013-05-18 21:00:22 -04:00
soh_cah_toa
054767c898
Added RESTful API route for /api/dns/rule/:id.
...
This will return a single rule given its unique id.
2013-05-17 23:02:40 -04:00
soh_cah_toa
18a78b57b2
Fixed load_rules() to rebuild 'pattern' and 'type' as an array.
...
This was forgotten in the previous commit.
2013-05-16 23:20:04 -04:00
soh_cah_toa
24f7e5b6cd
Separated 'pattern' and 'type' properties in DNS model.
...
This will expose the resource type to the RESTful API (coming soon).
2013-05-16 23:14:29 -04:00
soh_cah_toa
6d2a771084
Changed model name to BeEF::Core::Models::DNS::Rule.
...
This is more descriptive and follows the singular name convention.
2013-05-15 22:29:42 -04:00
soh_cah_toa
271b2b8e85
Removed RubyDNS::Server#rules attribute accessor since it's unused.
2013-05-15 22:19:58 -04:00
soh_cah_toa
992e95f0d7
Added database support when adding/removing rules.
...
Needed to add 'sourcify' as a dependency in order to store code blocks
in the database.
2013-05-15 22:12:37 -04:00
soh_cah_toa
e563a8946b
Began implementing new method of adding rules without periodic timer.
...
Also added improved documentation for add_rule() and remove_rule().
2013-05-14 18:47:51 -04:00
soh_cah_toa
d622bf3e5e
New DNS entries can now be added dynamically without a server restart.
...
Database is checked every five seconds and adds new rules if there
were any changes.
2013-05-10 23:01:10 -04:00
soh_cah_toa
c7eb1c7fc9
Added DNS database model to load resource records from.
...
Now modules/extensions can dynamically add new RR's. However, changes
don't take effect until BeEF restarts (fix incoming).
2013-05-08 00:03:08 -04:00
soh_cah_toa
d24a00a639
Overrode RubyDNS::Transaction.respond! to use debug logger instead.
...
Now all RubyDNS output is properly disabled unless --verbose is given.
2013-05-07 23:59:27 -04:00
soh_cah_toa
281cde1cbb
Added new definition for Logger#warn.
2013-05-07 22:06:13 -04:00
soh_cah_toa
cbd815c519
Changed output format for RubyDNS to be "BeEF-compliant".
...
RubyDNS's logger now uses BeEF's print-related functions. Debug
messages regarding queries can be enabled using --verbose.
2013-05-05 22:19:54 -04:00