From 2d9b894a3cea1709c7eb7a11c0034df7a3f4684e Mon Sep 17 00:00:00 2001 From: Christian Frichot Date: Sun, 20 Jan 2013 17:03:26 +0800 Subject: [PATCH] Added some further comments to the new AssetHandler redirector. See #664 --- core/main/network_stack/assethandler.rb | 5 +++++ core/main/network_stack/handlers/redirector.rb | 1 + 2 files changed, 6 insertions(+) diff --git a/core/main/network_stack/assethandler.rb b/core/main/network_stack/assethandler.rb index a4304cc10..fdd8ebff2 100644 --- a/core/main/network_stack/assethandler.rb +++ b/core/main/network_stack/assethandler.rb @@ -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} diff --git a/core/main/network_stack/handlers/redirector.rb b/core/main/network_stack/handlers/redirector.rb index 949cdd535..643d59f53 100644 --- a/core/main/network_stack/handlers/redirector.rb +++ b/core/main/network_stack/handlers/redirector.rb @@ -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 = ""