Module: Arachni::Framework::Parts::State::ClassMethods

Defined in:
lib/arachni/framework/parts/state.rb

Instance Method Summary collapse

Instance Method Details

#resetObject

Note:

You should first reset Options.

Resets everything and allows the framework environment to be re-used.



49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/arachni/framework/parts/state.rb', line 49

def reset
    Arachni::State.clear
    Arachni::Data.clear

    Arachni::Platform::Manager.reset
    Arachni::Check::Auditor.reset
    ElementFilter.reset
    Element::Capabilities::Auditable.reset
    Element::Capabilities::Analyzable.reset
    Arachni::Check::Manager.reset
    Arachni::Plugin::Manager.reset
    Arachni::Reporter::Manager.reset
    HTTP::Client.reset
end

#restore(afs, &block) ⇒ Framework

Returns Restored instance.

Parameters:

Returns:



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/arachni/framework/parts/state.rb', line 30

def restore( afs, &block )
    framework = new
    framework.restore( afs )

    if block_given?
        begin
            block.call framework
        ensure
            framework.clean_up
            framework.reset
        end
    end

    framework
end