Update BeEF server protocol for multiple modules to use

`beef.http.https.enable`

Now uses the `beef.net.httpproto` value rather than a hard-coded
protocol string.

Part of issue #745
This commit is contained in:
bcoles
2013-08-09 13:21:33 +09:30
parent c6314f97cb
commit 21417dc3e2
34 changed files with 68 additions and 49 deletions

View File

@@ -7,7 +7,8 @@ class Test_http_bind_raw < BeEF::Core::Command
def pre_send
configuration = BeEF::Core::Configuration.instance
xss_hook_url = "http://#{configuration.get("beef.http.host")}:#{configuration.get("beef.http.port")}/demos/basic.html"
proto = configuration.get("beef.http.https.enable") == true ? "https" : "http"
xss_hook_url = "#{proto}://#{configuration.get("beef.http.host")}:#{configuration.get("beef.http.port")}/demos/basic.html"
BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind_raw('200', {'Content-Type'=>'text/html','beef'=>xss_hook_url}, 'hello world!', '/beef', -1)
end