Files
beef/extensions/proxy/base.rb
scotty.b.brown@gmail.com bd28ce2147 Added more debugging to the proxy
git-svn-id: https://beef.googlecode.com/svn/trunk@985 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
2011-05-24 08:56:19 +00:00

29 lines
628 B
Ruby

module BeEF
module Extension
module Proxy
class HttpProxyBase < WEBrick::HTTPProxyServer
# call BeEF::HttpProxyZombie.instance
include Singleton
attr_reader :config
def initialize
@configuration = BeEF::Core::Configuration.instance
@config[:Logger] = WEBrick::Log.new($stdout, WEBrick::Log::ERROR)
@config[:ServerType] = Thread
super(@config)
end
# remove beef hook if it exists
def remove_hook(res)
print_debug "[PROXY] Removing beef hook from page if present"
res.body.gsub!(%r'<script.*?http.*?exploit.js.*?</script>', '')
end
end
end
end
end