Files
beef/extensions/demos/api.rb
2014-01-01 16:34:15 +10:00

23 lines
603 B
Ruby

#
# Copyright (c) 2006-2014 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 Demos
module RegisterHttpHandlers
BeEF::API::Registrar.instance.register(BeEF::Extension::Demos::RegisterHttpHandlers, BeEF::API::Server, 'mount_handler')
def self.mount_handler(beef_server)
# mount the handler to support the demos
dir = File.dirname(__FILE__)+'/html/'
beef_server.mount('/demos/', Rack::File.new(dir))
end
end
end
end
end