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:
sussurro@happypacket.net
2010-11-11 17:34:10 +00:00
parent be244d1284
commit a99fc10deb
2 changed files with 7 additions and 5 deletions

View File

@@ -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

View File

@@ -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