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
-
#initialize(framework) ⇒ ActiveOptions
constructor
A new instance of ActiveOptions.
- #set(options) ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize(framework) ⇒ ActiveOptions
Returns a new instance of ActiveOptions.
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/arachni/rpc/server/active_options.rb', line 20 def initialize( framework ) @framework = framework @options = framework. (@options.public_methods( false ) - public_methods( false ) ).each do |m| self.class.class_eval do define_method m do |*args| @options.send( m, *args ) end end end end |
Instance Method Details
#set(options) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/arachni/rpc/server/active_options.rb', line 34 def set( ) @options.set( ) if @framework.running? HTTP::Client. # Scope may have been updated. @framework.sitemap.reject! { |k, v| Utilities.skip_path? k } @options.scope.extend_paths.each do |url| @framework.push_to_url_queue( url ) end # Only mess with HTTP state if this is the pre-run config. else HTTP::Client.reset false end true end |
#to_h ⇒ Object
56 57 58 |
# File 'lib/arachni/rpc/server/active_options.rb', line 56 def to_h @options.to_rpc_data end |