Class: Aspisec::Modules::HomeHistoryFiles

Inherits:
Aspisec::Module show all
Defined in:
lib-ruby/aspisec/modules/home_history_files.rb

Overview

Module for various history files stored in the user home directory.
Inherits Aspisec::Module.
For more examples of methods, see Sqlmap.

Examples:

# Get the global config
conf = Aspisec::Config.new.conf
# Create a HomeHistoryFiles module instance
hhf = Aspisec::Modules::HomeHistoryFiles.new(conf)
# Locations available
hhf.locations_list # => ["python", "postgresql", "ruby_irb", "ruby_rdbg", "redis_cli", "bash", "zsh", "zsh_alt"]

Instance Attribute Summary collapse

Attributes inherited from Aspisec::Module

#base, #conf, #locations_list, #name

Instance Method Summary collapse

Methods inherited from Aspisec::Module

#check_config, #enabled?, #locations

Constructor Details

#initialize(conf, logger: nil) ⇒ HomeHistoryFiles

Inherits from Aspisec::Module but has only the conf argument,
tool_name is hardcoded for each module.

Parameters:



53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib-ruby/aspisec/modules/home_history_files.rb', line 53

def initialize(conf, logger: nil)
  super(conf, 'home-history-files', logger:)
  @python = Location.new(@conf, 'python')
  @postgresql = Location.new(@conf, 'postgresql')
  @ruby_irb = Location.new(@conf, 'ruby-irb')
  @ruby_rdbg = Location.new(@conf, 'ruby-rdbg')
  @redis_cli = Location.new(@conf, 'redis-cli')
  @bash = Location.new(@conf, 'bash')
  @zsh = Location.new(@conf, 'zsh')
  @zsh_alt = Location.new(@conf, 'zsh-alt')
  @locations_list = %w[python postgresql ruby_irb ruby_rdbg redis_cli bash zsh zsh_alt]
end

Instance Attribute Details

#bashLocation (readonly)

Returns:



40
41
42
# File 'lib-ruby/aspisec/modules/home_history_files.rb', line 40

def bash
  @bash
end

#postgresqlLocation (readonly)

Returns:



24
25
26
# File 'lib-ruby/aspisec/modules/home_history_files.rb', line 24

def postgresql
  @postgresql
end

#pythonLocation (readonly)

Returns:



20
21
22
# File 'lib-ruby/aspisec/modules/home_history_files.rb', line 20

def python
  @python
end

#redis_cliLocation (readonly)

Returns:



36
37
38
# File 'lib-ruby/aspisec/modules/home_history_files.rb', line 36

def redis_cli
  @redis_cli
end

#ruby_irbLocation (readonly)

Returns:



28
29
30
# File 'lib-ruby/aspisec/modules/home_history_files.rb', line 28

def ruby_irb
  @ruby_irb
end

#ruby_rdbgLocation (readonly)

Returns:



32
33
34
# File 'lib-ruby/aspisec/modules/home_history_files.rb', line 32

def ruby_rdbg
  @ruby_rdbg
end

#zshLocation (readonly)

Returns:



44
45
46
# File 'lib-ruby/aspisec/modules/home_history_files.rb', line 44

def zsh
  @zsh
end

#zsh_altLocation (readonly)

Returns:



48
49
50
# File 'lib-ruby/aspisec/modules/home_history_files.rb', line 48

def zsh_alt
  @zsh_alt
end