Class: Arachni::UI::CLI::RPC::Client::Local

Inherits:
Object
  • Object
show all
Defined in:
ui/cli/rpc/client/local.rb,
ui/cli/rpc/client/local/option_parser.rb

Overview

Spawns and controls an RPC::Server::Instance directly to avoid having to use a Server::Dispatcher to take advantage of RPC-only features like multi-Instance scans.

Author:

Defined Under Namespace

Classes: OptionParser

Instance Method Summary collapse

Constructor Details

#initializeLocal

Returns a new instance of Local.


27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'ui/cli/rpc/client/local.rb', line 27

def initialize
    parser = Local::OptionParser.new
    parser.authorized_by
    parser.scope
    parser.audit
    parser.input
    parser.http
    parser.checks
    parser.plugins
    parser.platforms
    parser.session
    parser.profiles
    parser.browser_cluster
    parser.distribution
    parser.report
    parser.timeout
    parser.parse

    options = parser.options

    # Tells all Instances which are going to be spawned to ignore interrupt
    # signals.
    options.datastore.do_not_trap = true

    instance = Processes::Instances.spawn

    # Let the Instance UI manage the Instance from now on.
    Instance.new( options, instance, parser.get_timeout ).run

    # Make sure the Instance processes are killed.
    Processes::Instances.kill( instance.url )
end