Module: Arachni::Module::Registrar

Included in:
s::Audit::AuditObjects, s::Audit::Eval, s::Audit::ResponseSplitting, s::Audit::SQLInjection, s::Audit::SimpleCmdExec, s::Audit::SimpleRFI, s::Audit::XSS, s::Recon::BackupFiles, s::Recon::ExtractObjects
Defined in:
lib/module/registrar.rb

Overview

Arachni::Module::Registrar module

When included into modules it registers them with Arachni::Module::Registry

It also acts a proxy between modules and Arachni::Module::Registry
enabling them to register their results and access the datastore.

@author: Anastasios “Zapotek” Laskos

                                     <tasos.laskos@gmail.com>
                                     <zapotek@segfault.gr>

@version: 0.1-pre

See Also:

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Object) included(mod)

Callback invoked whenever Arachni::Module::Registrar is included in another module or class.



40
41
42
# File 'lib/module/registrar.rb', line 40

def Registrar.included( mod )
    Registry.register( mod )
end

Instance Method Details

- (Object) add_storage(key, value)

Used by modules to store persistent data they want to share

Parameters:

  • (Object) key

    the key under which to store the value data

  • (Object) value

    the value of the key



59
60
61
# File 'lib/module/registrar.rb', line 59

def add_storage( key, value )
    Registry.add_storage( { key => value } )
end

- (Object) get_storage(key)

Used by modules to get persistent data from storage

Parameters:

  • (Object) key

    get the data under that key

Returns:

  • (Object)

    the data under key



70
71
72
# File 'lib/module/registrar.rb', line 70

def get_storage( key )
    Registry.get_storage( key )
end

- (Array<Hash>) get_store

Gets the entire storage array

Returns:

  • (Array<Hash>)


79
80
81
# File 'lib/module/registrar.rb', line 79

def get_store( )
    Registry.get_store( )
end

- (Object) register_results(results)

Used by modules to register their results with the Registry.

Parameters:



49
50
51
# File 'lib/module/registrar.rb', line 49

def register_results( results )
    Registry.register_results( results )
end