Added some further comments to the new AssetHandler redirector. See #664

This commit is contained in:
Christian Frichot
2013-01-20 17:03:26 +08:00
parent 3c4a0fad34
commit 2d9b894a3c
2 changed files with 6 additions and 0 deletions

View File

@@ -24,6 +24,11 @@ module Handlers
@root_dir = File.expand_path('../../../../', __FILE__)
end
# Binds a redirector to a mount point
# @param [String] target The target for the redirector
# @param [String] path An optional URL path to mount the redirector to (can be nil for a random path)
# @return [String] URL Path of the redirector
# @todo This function, similar to bind(), should accept a hooked browser session to limit the mounted file to a certain session etc.
def bind_redirect(target, path=nil)
url = build_url(path,nil)
@allocations[url] = {'target' => target}

View File

@@ -9,6 +9,7 @@ module BeEF
module Handlers
# @note Redirector is used as a Rack app for mounting HTTP redirectors, instead of content
# @todo Add new options to specify what kind of redirect you want to achieve
class Redirector
@target = ""