Added the ability to specify a public IP address that will be referenced by everything but the bind instruction in order to allow for things like EC2 natted hosts to work correctly.
git-svn-id: https://beef.googlecode.com/svn/trunk@508 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
@@ -10,15 +10,16 @@ module Console
|
||||
|
||||
version = BeEF::Configuration.instance.get('beef_version')
|
||||
|
||||
hook_uri = "http://#{@configuration.get("http_host")}:"
|
||||
beef_host = @configuration.get("http_public") || @configuration.get("http_host")
|
||||
hook_uri = "http://#{beef_host}:"
|
||||
hook_uri += "#{@configuration.get("http_port")}"
|
||||
hook_uri += "#{@configuration.get("hook_file")}"
|
||||
|
||||
ui_uri = "http://#{@configuration.get("http_host")}:"
|
||||
ui_uri = "http://#{beef_host}:"
|
||||
ui_uri += "#{@configuration.get("http_port")}"
|
||||
ui_uri += "#{@configuration.get("http_panel_path")}"
|
||||
|
||||
demo_uri = "http://#{@configuration.get("http_host")}:"
|
||||
demo_uri = "http://#{beef_host}:"
|
||||
demo_uri += "#{@configuration.get("http_port")}"
|
||||
demo_uri += "#{@configuration.get("http_demo_path")}"
|
||||
|
||||
@@ -36,4 +37,4 @@ module Console
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -14,7 +14,8 @@ module BeEF
|
||||
|
||||
def initialize
|
||||
@configuration = BeEF::Configuration.instance
|
||||
@url = "http://#{@configuration.get("http_host")}:#{@configuration.get("http_port")}"
|
||||
beef_host = @configuration.get("http_public") || @configuration.get("http_host")
|
||||
@url = "http://#{beef_host}:#{@configuration.get("http_port")}"
|
||||
@root_dir = File.expand_path('../../../', __FILE__)
|
||||
@command_urls = {}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user