Fix bug in fake_notification_ff module

This commit is contained in:
bcoles
2013-10-12 00:43:54 +10:30
parent 70cac51a5d
commit 09443675cc

View File

@@ -7,9 +7,10 @@ class Fake_notification_ff < BeEF::Core::Command
def self.options def self.options
@configuration = BeEF::Core::Configuration.instance @configuration = BeEF::Core::Configuration.instance
proto = configuration.get("beef.http.https.enable") == true ? "https" : "http" proto = @configuration.get("beef.http.https.enable") == true ? "https" : "http"
beef_host = @configuration.get("beef.http.public") || @configuration.get("beef.http.host") beef_host = @configuration.get("beef.http.public") || @configuration.get("beef.http.host")
url = proto + '://' + beef_host + ':' + @configuration.get("beef.http.port") +'/api/ipec/ff_extension' beef_port = @configuration.get("beef.http.public_port") || @configuration.get("beef.http.port")
url = "#{proto}://#{beef_host}:#{beef_port}/api/ipec/ff_extension"
return [ return [
{'name' => 'url', 'ui_label' => 'Plugin URL', 'value' => url, 'width'=>'150px'}, {'name' => 'url', 'ui_label' => 'Plugin URL', 'value' => url, 'width'=>'150px'},
{ 'name' => 'notification_text', { 'name' => 'notification_text',