Class: Arachni::Data
- Defined in:
- lib/arachni/data.rb,
lib/arachni/data/issues.rb,
lib/arachni/data/plugins.rb,
lib/arachni/data/session.rb,
lib/arachni/data/framework.rb,
lib/arachni/data/framework/rpc.rb
Overview
Stores and provides access to the data of the system.
Defined Under Namespace
Classes: Error, Framework, Issues, Plugins, Session
Class Attribute Summary collapse
Class Method Summary collapse
-
.clear ⇒ Object
Clears all data.
-
.dump(directory) ⇒ String
Location of the dump directory.
-
.load(directory) ⇒ Data
`self`.
- .reset ⇒ Object
- .statistics ⇒ Object
Class Attribute Details
Class Method Details
.clear ⇒ Object
Clears all data.
84 85 86 87 |
# File 'lib/arachni/data.rb', line 84 def clear each { |_, state| state.clear } self end |
.dump(directory) ⇒ String
Returns Location of the dump directory.
62 63 64 65 66 67 68 69 70 |
# File 'lib/arachni/data.rb', line 62 def dump( directory ) FileUtils.mkdir_p( directory ) each do |name, state| state.dump( "#{directory}/#{name}/" ) end directory end |
.load(directory) ⇒ Data
Returns `self`.
75 76 77 78 79 80 81 |
# File 'lib/arachni/data.rb', line 75 def load( directory ) each do |name, state| send( "#{name}=", state.class.load( "#{directory}/#{name}/" ) ) end self end |
.reset ⇒ Object
43 44 45 46 47 48 |
# File 'lib/arachni/data.rb', line 43 def reset @framework = Framework.new @session = Session.new @issues = Issues.new @plugins = Plugins.new end |
.statistics ⇒ Object
50 51 52 53 54 55 56 |
# File 'lib/arachni/data.rb', line 50 def statistics stats = {} each do |attribute| stats[attribute] = send(attribute).statistics end stats end |