git-svn-id: https://beef.googlecode.com/svn/trunk@802 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
22 lines
418 B
Ruby
22 lines
418 B
Ruby
module BeEF
|
|
|
|
#
|
|
# Custom FileHandler to deal with tracked files
|
|
#
|
|
class FileHandler < WEBrick::HTTPServlet::FileHandler
|
|
|
|
#
|
|
# Override to do_GET to check tracked files
|
|
#
|
|
def do_GET(req, res)
|
|
if not BeEF::AssetHandler.instance.check(req.path)
|
|
raise HTPPStatus::NotFound, "`#req.path}` not found."
|
|
else
|
|
super
|
|
end
|
|
end
|
|
|
|
end
|
|
|
|
end
|