2005-11-24 02:02:10 +00:00
|
|
|
module Rex
|
|
|
|
module Proto
|
|
|
|
module Http
|
|
|
|
|
|
|
|
###
|
|
|
|
#
|
|
|
|
# This class acts as the base class for all handlers.
|
|
|
|
#
|
|
|
|
###
|
|
|
|
class Handler
|
|
|
|
|
|
|
|
require 'rex/proto/http/handler/erb'
|
|
|
|
require 'rex/proto/http/handler/proc'
|
|
|
|
|
|
|
|
#
|
|
|
|
# Initializes the handler instance as being associated with the supplied
|
|
|
|
# server.
|
|
|
|
#
|
|
|
|
def initialize(server)
|
|
|
|
self.server = server
|
|
|
|
end
|
|
|
|
|
|
|
|
#
|
|
|
|
# By default, handlers do not require a relative resource.
|
|
|
|
#
|
|
|
|
def self.relative_resource_required?
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
2006-01-07 10:04:30 +00:00
|
|
|
#
|
|
|
|
# Calls the class method.
|
|
|
|
#
|
|
|
|
def relative_resource_required?
|
|
|
|
self.class.relative_resource_required?
|
|
|
|
end
|
|
|
|
|
2005-11-24 02:02:10 +00:00
|
|
|
protected
|
|
|
|
|
|
|
|
attr_accessor :server # :nodoc:
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
2008-10-19 21:03:39 +00:00
|
|
|
end
|