Updated hard coded file path

whoops - not the first time this has happened -_-
This commit is contained in:
bcoles
2011-12-27 07:32:47 +10:30
parent d5dd4f4894
commit e8fba4f414

View File

@@ -33,11 +33,11 @@ class Hook_default_browser < BeEF::Core::Command
hook_uri = "http://#{configuration.get("beef.http.host")}:#{configuration.get("beef.http.port")}/demos/report.html"
# A new pdf file containg the actual hook URI instead of the dummy token.
configured_hook_file = File.open("./modules/host/hook_default/bounce_to_ie_configured.pdf","w")
configured_hook_file = File.open("./modules/host/hook_default_browser/bounce_to_ie_configured.pdf","w")
# The original pdf file contains a token that will get replaced during the initialization with
# the actual hook URI of beef. Note that the hook URI is accessed via the DNS name.
File.open('./modules/host/hook_default/bounce_to_ie.pdf',"r") { |original_hook_file|
File.open('./modules/host/hook_default_browser/bounce_to_ie.pdf',"r") { |original_hook_file|
original_hook_file.each_line { |line|
# If the line includes the hook token, then replace it with the actual hook URI
if(line.include? '<hookURI>')
@@ -52,7 +52,7 @@ class Hook_default_browser < BeEF::Core::Command
#Bind the configured PDF file to the web server.
BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind('/modules/host/hook_default/bounce_to_ie_configured.pdf', '/report', 'pdf', -1);
BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind('/modules/host/hook_default_browser/bounce_to_ie_configured.pdf', '/report', 'pdf', -1);
end