From acf02647fb988dd4ea4ec40293806483f511013a Mon Sep 17 00:00:00 2001 From: sinn3r Date: Tue, 27 Jan 2015 20:18:10 -0600 Subject: [PATCH] Add a check for Custom404 --- lib/msf/core/exploit/remote/browser_exploit_server.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/msf/core/exploit/remote/browser_exploit_server.rb b/lib/msf/core/exploit/remote/browser_exploit_server.rb index 336585c840..cb25ef8b36 100644 --- a/lib/msf/core/exploit/remote/browser_exploit_server.rb +++ b/lib/msf/core/exploit/remote/browser_exploit_server.rb @@ -95,6 +95,14 @@ module Msf ], Exploit::Remote::BrowserExploitServer) end + def setup + custom_404 = get_custom_404_url + if !custom_404.blank? && custom_404 !~ /^http/i + raise Msf::OptionValidateError.new(['Custom404 (must begin with http or https)']) + end + super + end + # # Returns the custom 404 URL set by the user #