filtering added to HTTP host value

git-svn-id: https://beef.googlecode.com/svn/trunk@737 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
wade@bindshell.net
2011-02-13 13:13:11 +00:00
parent 3877a163f5
commit 86d191c43b

View File

@@ -44,7 +44,9 @@ module BeEF
if not hooked_browser # is a new browser so return instructions to set up the hook
# generate the instructions to hook the browser
build_beefjs!(@request.host)
host_name = @request.host # get the host from the HOST attribute in the HTTP header
raise WEBrick::HTTPStatus::BadRequest, "Invalid host name" if not Filter.is_valid_hostname?(host_name)
build_beefjs!(host_name)
else # is a known browseer so send instructions