Class: Arachni::Modules::Audit::AuditObjects

Inherits:
Arachni::Module::Base show all
Includes:
Arachni::Module::Registrar, Arachni::UI::Output
Defined in:
modules/audit/audit_objects.rb

Overview

This module manipulates/audits/whatever HTML objects discovered by Arachni::Modules::Recon::ExtractObjects.

It serves as an example of how to pair discovery/data-mining modules
with other modules.

It will also show you how to use the module data storage system and
how tell the system on which modules you depend on.

@author: Anastasios “Zapotek” Laskos

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

@version: $Rev: 371 $

See Also:

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods included from Arachni::Module::Registrar

#add_storage, #get_storage, #get_store, included, #register_results

Methods included from Arachni::UI::Output

#debug!, #debug?, #only_positives!, #only_positives?, #print_debug, #print_debug_backtrace, #print_debug_pp, #print_error, #print_info, #print_line, #print_ok, #print_status, #print_verbose, #verbose!, #verbose?

Methods inherited from Arachni::Module::Base

#clean_up, #get_cookie_simple, #get_cookies, #get_cookies_simple, #get_data_file, #get_form_simple, #get_forms, #get_forms_simple, #get_links, #get_links_simple, #get_request_headers, #get_response_headers, #prepare

Methods included from Arachni::Module::Auditor

#audit_cookies, #audit_forms, #audit_headers, #audit_links, #get_matches, #inject_each_var

Methods included from Arachni::Module::Trainer

#train

Methods included from Arachni::Module::ElementDB

#init_cookies, #init_forms, #init_links, #update_cookies, #update_forms, #update_links, #work_on_cookies, #work_on_forms, #work_on_links

Constructor Details

- (AuditObjects) initialize(page)

A new instance of AuditObjects



41
42
43
# File 'modules/audit/audit_objects.rb', line 41

def initialize( page )
    super( page )
end

Class Method Details

+ (Object) deps

Let the framework know our dependencies



91
92
93
94
# File 'modules/audit/audit_objects.rb', line 91

def self.deps
    # we depend on the 'extract_objects' module 
    ['extract_objects']
end

+ (Object) info



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'modules/audit/audit_objects.rb', line 63

def self.info
    {
        'Name'           => 'AuditObjects',
        'Description'    => %q{Audits all object elements discovered by
            the ExtractObjects module.},
        'Elements'       => [],
        'Author'         => 'zapotek',
        'Version'        => '$Rev: 371 $',
        'References'     => {
            
        },
        'Targets'        => { 'Generic' => 'all' },
            
#            'Vulnerability'   => {
#                'Description' => %q{.},
#                'CWE'         => '',
#                'Severity'    => '',
#                'CVSSV2'       => '',
#                'Remedy_Guidance'    => '',
#                'Remedy_Code' => '',
#            }

    }
end

Instance Method Details

- (Object) run



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'modules/audit/audit_objects.rb', line 45

def run( )
    
    # you can get the objects you want by key
    objects = get_storage( 'objects' )

    if( objects.size == 0 )
        return
    end
    
    # or you can get the whole storage
#        storage =  get_store( )
            
    print_ok( self.class.info['Name'] + ' found an object:')
    print_ok( objects.to_s )
    
end