Use public URL
This commit is contained in:
@@ -7,12 +7,16 @@ class Hta_powershell < BeEF::Core::Command
|
||||
|
||||
def self.options
|
||||
|
||||
host = BeEF::Core::Configuration.instance.get('beef.http.host')
|
||||
port = BeEF::Core::Configuration.instance.get('beef.http.port')
|
||||
ps_url = BeEF::Core::Configuration.instance.get('beef.extension.social_engineering.powershell.powershell_handler_url')
|
||||
@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}"
|
||||
|
||||
ps_url = @configuration.get('beef.extension.social_engineering.powershell.powershell_handler_url')
|
||||
|
||||
return [
|
||||
{'name' => 'domain', 'ui_label' => 'Serving Domain (BeEF server)', 'value' => "http://#{host}:#{port}"},
|
||||
{'name' => 'domain', 'ui_label' => 'Serving Domain (BeEF server)', 'value' => "#{base_host}" },
|
||||
{'name' => 'ps_url', 'ui_label' => 'Powershell/HTA handler', 'value' => "#{ps_url}"}
|
||||
]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user