Class: Arachni::State
- Defined in:
- lib/arachni/state.rb,
lib/arachni/state/http.rb,
lib/arachni/state/audit.rb,
lib/arachni/state/options.rb,
lib/arachni/state/plugins.rb,
lib/arachni/state/framework.rb,
lib/arachni/state/framework/rpc.rb,
lib/arachni/state/element_filter.rb
Overview
Stores and provides access to the state of the system.
Defined Under Namespace
Classes: Audit, ElementFilter, Error, Framework, HTTP, Options, Plugins
Class Attribute Summary collapse
- .audit ⇒ Audit
- .element_filter ⇒ ElementFilter
- .framework ⇒ Framework
- .http ⇒ HTTP
- .options ⇒ Options
- .plugins ⇒ Plugins
Class Method Summary collapse
-
.clear ⇒ Object
Clears all states.
-
.dump(directory) ⇒ String
Location of the directory.
-
.load(directory) ⇒ State
‘self`.
- .reset ⇒ Object
- .statistics ⇒ Object
Class Attribute Details
.element_filter ⇒ ElementFilter
46 47 48 |
# File 'lib/arachni/state.rb', line 46 def element_filter @element_filter end |
Class Method Details
.clear ⇒ Object
Clears all states.
97 98 99 100 |
# File 'lib/arachni/state.rb', line 97 def clear each { |_, state| state.clear } self end |
.dump(directory) ⇒ String
Returns Location of the directory.
73 74 75 76 77 78 79 80 81 |
# File 'lib/arachni/state.rb', line 73 def dump( directory ) FileUtils.mkdir_p( directory ) each do |name, state| state.dump( "#{directory}/#{name}/" ) end directory end |
.load(directory) ⇒ State
Returns ‘self`.
88 89 90 91 92 93 94 |
# File 'lib/arachni/state.rb', line 88 def load( directory ) each do |name, state| send( "#{name}=", state.class.load( "#{directory}/#{name}/" ) ) end self end |
.reset ⇒ Object
51 52 53 54 55 56 57 58 |
# File 'lib/arachni/state.rb', line 51 def reset @http = HTTP.new @plugins = Plugins.new @options = Options.new @audit = Audit.new @element_filter = ElementFilter.new @framework = Framework.new end |
.statistics ⇒ Object
60 61 62 63 64 65 66 |
# File 'lib/arachni/state.rb', line 60 def statistics stats = {} each do |attribute| stats[attribute] = send(attribute).statistics end stats end |