Class: Arachni::RPC::Server::ActiveOptions
- Defined in:
- lib/arachni/rpc/server/active_options.rb
Overview
It, for the most part, forwards calls to Options and intercepts a few that need to be updated at other places throughout the framework.
Instance Method Summary collapse
- #cookie_jar=(cookie_jar) ⇒ Object
-
#initialize(framework) ⇒ ActiveOptions
constructor
A new instance of ActiveOptions.
- #proxy=(proxy_url) ⇒ Object
- #set(options) ⇒ Object
Constructor Details
#initialize(framework) ⇒ ActiveOptions
Returns a new instance of ActiveOptions.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/arachni/rpc/server/active_options.rb', line 29 def initialize( framework ) @opts = framework.opts %w( url http_req_limit http_timeout user_agent redirect_limit proxy_username proxy_password proxy_type proxy_host proxy_port authed_by cookies cookie_string http_username http_password ).each do |m| m = "#{m}=".to_sym self.class.class_eval do define_method m do |v| @opts.send( m, v ) HTTP.reset false v end end end (@opts.public_methods( false ) - public_methods( false ) ).each do |m| self.class.class_eval do define_method m do |*args| @opts.send( m, *args ) end end end end |
Instance Method Details
#cookie_jar=(cookie_jar) ⇒ Object
78 79 80 81 |
# File 'lib/arachni/rpc/server/active_options.rb', line 78 def ( ) HTTP.( ) @cookie_jar = end |