Files
beef/beef.rb
wade@bindshell.net 55a8d1838b Reverse DNS disabled
git-svn-id: https://beef.googlecode.com/svn/trunk@796 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
2011-03-17 06:58:49 +00:00

37 lines
835 B
Ruby

$:.unshift(File.join(File.expand_path(File.dirname(__FILE__)), '.'))
$root_dir = File.expand_path('..', __FILE__)
require 'lib/loader'
# load config
config = BeEF::Configuration.instance
# disable reverse dns
Socket.do_not_reverse_lookup = true
# setup database
DataMapper.setup(:default, "sqlite3://#{$root_dir}/#{config.get("database_file_name")}")
options = BeEF::Console::CommandLine.parse
if options[:resetdb]
DataMapper.auto_migrate!
BeEF::Migration.instance.update_db!
else
DataMapper.auto_upgrade!
end
# check for new command modules
BeEF::Migration.instance.update_db!
BeEF::Console::Banner.generate
# start the requester proxy
#requester_proxy = BeEF::Requester::ProxyServer.instance
#requester_proxy.start
# start the hook server
http_hook_server = BeEF::HttpHookServer.instance
http_hook_server.start