Method: Arachni::State::Framework.load

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

.load(directory) ⇒ Object



420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
# File 'lib/arachni/state/framework.rb', line 420

def self.load( directory )
    framework = new

    framework.rpc = RPC.load( "#{directory}/rpc/" )

    %w(element_pre_check_filter page_queue_filter url_queue_filter
        browser_skip_states).each do |attribute|
        path = "#{directory}/#{attribute}"
        next if !File.exist?( path )

        framework.send(attribute).merge Marshal.load( IO.binread( path ) )
    end

    framework.audited_page_count = Marshal.load( IO.binread( "#{directory}/audited_page_count" ) )
    framework
end