Files
beef/lib/modules/requester.rb
mosse.benjamin 5575d8848e adding the squeleton for the requester proxy
git-svn-id: https://beef.googlecode.com/svn/trunk@514 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
2010-11-13 05:04:47 +00:00

37 lines
736 B
Ruby

module BeEF
module Requester
# Setting up the proxy server for the Requester
class ProxyServer
include Singleton
def initialize
@config = {
:Port => 8080,
:BindAddress => '127.0.0.1',
:Logger => WEBrick::Log.new($stdout, WEBrick::Log::ERROR),
:ServerType => Thread,
:RequestCallback => BeEF::Requester::ProxyHttpHandler.new
}
@server = WEBrick::HTTPProxyServer.new @config
trap("INT"){@server.shutdown}
end
def start
@server.start
end
end
# The http handler that receives requests
class ProxyHttpHandler
def call(req, res)
#puts req.request_line, req.raw_header
end
end
end
end