Skip to content

Instantly share code, notes, and snippets.

@soh-cah-toa
Created June 22, 2013 07:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soh-cah-toa/5836155 to your computer and use it in GitHub Desktop.
Save soh-cah-toa/5836155 to your computer and use it in GitHub Desktop.
BeEF DNS Unit Test Errors (broken-tests branch)
Starting BeEF (wait a few seconds).....................
Loaded suite BeEF DNS Unit Tests
Started
E
===============================================================================
Error: TC_Dns
NameError: uninitialized constant BeEF::Core::Router
/home/soh_cah_toa/src/git/beef/extensions/dns/rest/dns.rb:11:in `<module:Dns>'
8: module Dns
9:
10: # This class handles the routing of RESTful API requests that query BeEF's DNS server
=> 11: class DnsRest < BeEF::Core::Router::Router
12:
13: # Filters out bad requests before performing any routing
14: before do
/home/soh_cah_toa/src/git/beef/extensions/dns/rest/dns.rb:8:in `<module:Extension>'
/home/soh_cah_toa/src/git/beef/extensions/dns/rest/dns.rb:7:in `<module:BeEF>'
/home/soh_cah_toa/src/git/beef/extensions/dns/rest/dns.rb:6:in `<top (required)>'
/home/soh_cah_toa/src/git/beef/extensions/dns/extension.rb:24:in `require'
/home/soh_cah_toa/src/git/beef/extensions/dns/extension.rb:24:in `<top (required)>'
/home/soh_cah_toa/src/git/beef/test/unit/extensions/tc_dns.rb:18:in `require'
/home/soh_cah_toa/src/git/beef/test/unit/extensions/tc_dns.rb:18:in `startup'
===============================================================================
E
===============================================================================
Error: test_add_rule(TC_Dns)
NoMethodError: undefined method `match' for nil:NilClass
/home/soh_cah_toa/src/git/beef/extensions/dns/dns.rb:75:in `block in add_rule'
<internal:prelude>:10:in `synchronize'
/home/soh_cah_toa/src/git/beef/extensions/dns/dns.rb:74:in `add_rule'
/home/soh_cah_toa/src/git/beef/test/unit/extensions/tc_dns.rb:46:in `test_add_rule'
43: def test_add_rule
44: dns = BeEF::Extension::Dns::Server.instance
45:
=> 46: id = dns.add_rule('foo.bar', Resolv::DNS::Resource::IN::A) do |transaction|
47: transaction.respond!('1.2.3.4')
48: end
49:
===============================================================================
Finished in 3.084381955 seconds.
1 tests, 0 assertions, 0 failures, 2 errors, 0 pendings, 0 omissions, 0 notifications
0% passed
0.32 tests/s, 0.00 assertions/s
Shutting down BeEF...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment