Files
beef/extensions/dns/api.rb
soh_cah_toa d22373d828 Fixed thread issue that occasionally caused BeEF to stop immediately.
While using sleep() to fix thread complications is never a great
solution, it gets the job done for now.
2013-05-05 21:14:30 -04:00

37 lines
864 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 Extension
module DNS
module API
module NameserverHandler
BeEF::API::Registrar.instance.register(BeEF::Extension::DNS::API::NameserverHandler,
BeEF::API::Server,
'pre_http_start')
def self.pre_http_start(http_hook_server)
config = BeEF::Core::Configuration.instance
address = config.get('beef.extension.dns.address')
port = config.get('beef.extension.dns.port')
Thread.new do
sleep 2
BeEF::Extension::DNS::DNS.new(address, port)
end
print_info "DNS Server: #{address}:#{port}"
end
end
end
end
end
end