Class: Arachni::State::Audit

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/arachni/state/audit.rb

Overview

Stores and provides access to the state of all audit operations performed by:

Author:

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAudit

Returns a new instance of Audit.



26
27
28
# File 'lib/arachni/state/audit.rb', line 26

def initialize
    @collection = Support::LookUp::HashSet.new( hasher: :persistent_hash )
end

Class Method Details

.load(directory) ⇒ Object



46
47
48
# File 'lib/arachni/state/audit.rb', line 46

def self.load( directory )
    Marshal.load( IO.binread( "#{directory}/set" ) )
end

Instance Method Details

#dump(directory) ⇒ Object



40
41
42
43
44
# File 'lib/arachni/state/audit.rb', line 40

def dump( directory )
    FileUtils.mkdir_p( directory )

    IO.binwrite( "#{directory}/set", Marshal.dump( self ) )
end

#statisticsObject



30
31
32
33
34
# File 'lib/arachni/state/audit.rb', line 30

def statistics
    {
        total: size
    }
end