Skip to content

Commit acf0264

Browse files
committed
Add a check for Custom404
1 parent 66703bf commit acf0264

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/msf/core/exploit/remote/browser_exploit_server.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ def initialize(info={})
9595
], Exploit::Remote::BrowserExploitServer)
9696
end
9797

98+
def setup
99+
custom_404 = get_custom_404_url
100+
if !custom_404.blank? && custom_404 !~ /^http/i
101+
raise Msf::OptionValidateError.new(['Custom404 (must begin with http or https)'])
102+
end
103+
super
104+
end
105+
98106
#
99107
# Returns the custom 404 URL set by the user
100108
#

0 commit comments

Comments
 (0)