Class: Aspisec::Modules::HomeHistoryFiles — Documentation by YARD 0.9.36

# Class: Aspisec::Modules::HomeHistoryFiles

Inherits:
  Aspisec::Module
  - Object
  - Aspisec::Module
  - Aspisec::Modules::HomeHistoryFiles
  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

- #bash ⇒ Location readonly

  see Config::DEFAULT_CONFIG or call Aspisec::Module::Location#description.

- #postgresql ⇒ Location readonly

  see Config::DEFAULT_CONFIG or call Aspisec::Module::Location#description.

- #python ⇒ Location readonly

  see Config::DEFAULT_CONFIG or call Aspisec::Module::Location#description.

- #redis_cli ⇒ Location readonly

  see Config::DEFAULT_CONFIG or call Aspisec::Module::Location#description.

- #ruby_irb ⇒ Location readonly

  see Config::DEFAULT_CONFIG or call Aspisec::Module::Location#description.

- #ruby_rdbg ⇒ Location readonly

  see Config::DEFAULT_CONFIG or call Aspisec::Module::Location#description.

- #zsh ⇒ Location readonly

  see Config::DEFAULT_CONFIG or call Aspisec::Module::Location#description.

- #zsh_alt ⇒ Location readonly

  see Config::DEFAULT_CONFIG or call Aspisec::Module::Location#description.

### Attributes inherited from Aspisec::Module

#base, #conf, #locations_list, #name

## Instance Method Summary collapse

- #initialize(conf, logger: nil) ⇒ HomeHistoryFiles constructor

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

### 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:

- conf (`Aspisec::Config`) —

  an instance of the global configuration

    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

### #bash ⇒ `Location` (readonly)

see Config::DEFAULT_CONFIG or call Aspisec::Module::Location#description.

Returns:

- (`Location`)

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

    def bash
      @bash
    end

### #postgresql ⇒ `Location` (readonly)

see Config::DEFAULT_CONFIG or call Aspisec::Module::Location#description.

Returns:

- (`Location`)

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

    def postgresql
      @postgresql
    end

### #python ⇒ `Location` (readonly)

see Config::DEFAULT_CONFIG or call Aspisec::Module::Location#description.

Returns:

- (`Location`)

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

    def python
      @python
    end

### #redis_cli ⇒ `Location` (readonly)

see Config::DEFAULT_CONFIG or call Aspisec::Module::Location#description.

Returns:

- (`Location`)

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

    def redis_cli
      @redis_cli
    end

### #ruby_irb ⇒ `Location` (readonly)

see Config::DEFAULT_CONFIG or call Aspisec::Module::Location#description.

Returns:

- (`Location`)

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

    def ruby_irb
      @ruby_irb
    end

### #ruby_rdbg ⇒ `Location` (readonly)

see Config::DEFAULT_CONFIG or call Aspisec::Module::Location#description.

Returns:

- (`Location`)

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

    def ruby_rdbg
      @ruby_rdbg
    end

### #zsh ⇒ `Location` (readonly)

see Config::DEFAULT_CONFIG or call Aspisec::Module::Location#description.

Returns:

- (`Location`)

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

    def zsh
      @zsh
    end

### #zsh_alt ⇒ `Location` (readonly)

see Config::DEFAULT_CONFIG or call Aspisec::Module::Location#description.

Returns:

- (`Location`)

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

    def zsh_alt
      @zsh_alt
    end