Module: Arachni::Rest::Server::InstanceHelpers

Defined in:
lib/arachni/rest/server/instance_helpers.rb

Constant Summary collapse

@@instances =
{}

Instance Method Summary collapse

Instance Method Details

#exists?(id) ⇒ Boolean

Returns:

  • (Boolean)

25
26
27
# File 'lib/arachni/rest/server/instance_helpers.rb', line 25

def exists?( id )
    instances.include? id
end

#instancesObject


17
18
19
# File 'lib/arachni/rest/server/instance_helpers.rb', line 17

def instances
    @@instances
end

#kill_instance(id) ⇒ Object


29
30
31
# File 'lib/arachni/rest/server/instance_helpers.rb', line 29

def kill_instance( id )
    Processes::Instances.kill( instances[id].url )
end

#scan_for(id) ⇒ Object


21
22
23
# File 'lib/arachni/rest/server/instance_helpers.rb', line 21

def scan_for( id )
    @@instances[id].service
end