Class: Arachni::OptionGroups::Paths

Inherits:
Arachni::OptionGroup show all
Defined in:
lib/arachni/option_groups/paths.rb

Overview

Holds paths to the directories of various system components.

Author:

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Arachni::OptionGroup

#==, attr_accessor, attributes, #attributes, defaults, #defaults, #hash, inherited, #merge, set_defaults, #to_h, #to_hash, #to_rpc_data, #update, #validate

Constructor Details

#initializePaths

Returns a new instance of Paths.



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/arachni/option_groups/paths.rb', line 33

def initialize
    @root       = root_path
    @gfx        = @root + 'gfx/'
    @components = @root + 'components/'
    @snapshots  = @root + 'snapshots/'

    @logs = ENV['ARACHNI_FRAMEWORK_LOGDIR'] ?
        "#{ENV['ARACHNI_FRAMEWORK_LOGDIR']}/" : @root + 'logs/'

    @checks          = @components + 'checks/'
    @reporters       = @components + 'reporters/'
    @plugins         = @components + 'plugins/'
    @services   = @components + 'services/'
    @path_extractors = @components + 'path_extractors/'
    @fingerprinters  = @components + 'fingerprinters/'

    @lib     = @root + 'lib/arachni/'

    @executables = @lib + 'processes/executables/'
    @support     = @lib + 'support/'
    @mixins      = @support + 'mixins/'
    @arachni     = @lib[0...-1]
end

Instance Attribute Details

#arachniObject

Returns the value of attribute arachni.



17
18
19
# File 'lib/arachni/option_groups/paths.rb', line 17

def arachni
  @arachni
end

#checksObject

Returns the value of attribute checks.



22
23
24
# File 'lib/arachni/option_groups/paths.rb', line 22

def checks
  @checks
end

#componentsObject

Returns the value of attribute components.



19
20
21
# File 'lib/arachni/option_groups/paths.rb', line 19

def components
  @components
end

#executablesObject

Returns the value of attribute executables.



21
22
23
# File 'lib/arachni/option_groups/paths.rb', line 21

def executables
  @executables
end

#fingerprintersObject

Returns the value of attribute fingerprinters.



27
28
29
# File 'lib/arachni/option_groups/paths.rb', line 27

def fingerprinters
  @fingerprinters
end

#gfxObject

Returns the value of attribute gfx.



18
19
20
# File 'lib/arachni/option_groups/paths.rb', line 18

def gfx
  @gfx
end

#libObject

Returns the value of attribute lib.



28
29
30
# File 'lib/arachni/option_groups/paths.rb', line 28

def lib
  @lib
end

#logsObject

Returns the value of attribute logs.



20
21
22
# File 'lib/arachni/option_groups/paths.rb', line 20

def logs
  @logs
end

#mixinsObject

Returns the value of attribute mixins.



30
31
32
# File 'lib/arachni/option_groups/paths.rb', line 30

def mixins
  @mixins
end

#path_extractorsObject

Returns the value of attribute path_extractors.



26
27
28
# File 'lib/arachni/option_groups/paths.rb', line 26

def path_extractors
  @path_extractors
end

#pluginsObject

Returns the value of attribute plugins.



24
25
26
# File 'lib/arachni/option_groups/paths.rb', line 24

def plugins
  @plugins
end

#reportersObject

Returns the value of attribute reporters.



23
24
25
# File 'lib/arachni/option_groups/paths.rb', line 23

def reporters
  @reporters
end

#rootObject

Returns the value of attribute root.



16
17
18
# File 'lib/arachni/option_groups/paths.rb', line 16

def root
  @root
end

#servicesObject

Returns the value of attribute services.



25
26
27
# File 'lib/arachni/option_groups/paths.rb', line 25

def services
  @services
end

#snapshotsObject

Returns the value of attribute snapshots.



31
32
33
# File 'lib/arachni/option_groups/paths.rb', line 31

def snapshots
  @snapshots
end

#supportObject

Returns the value of attribute support.



29
30
31
# File 'lib/arachni/option_groups/paths.rb', line 29

def support
  @support
end

Instance Method Details

#root_pathString

Returns Root path of the framework.

Returns:

  • (String)

    Root path of the framework.



58
59
60
# File 'lib/arachni/option_groups/paths.rb', line 58

def root_path
    File.expand_path( File.dirname( __FILE__ ) + '/../../..' ) + '/'
end