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

# Class: Aspisec::Modules::Hashcat

Inherits:
  Aspisec::Module
  - Object
  - Aspisec::Module
  - Aspisec::Modules::Hashcat
  show all

Defined in:
  lib-ruby/aspisec/modules/hashcat.rb

## Overview

HashCat module.
Inherits Aspisec::Module.
For more examples of methods, see Sqlmap.

Examples:

    # Get the global config
    conf = Aspisec::Config.new.conf
    # Create a Hashcat module instance
    hc = Aspisec::Modules::Hashcat.new(conf)
    # Locations available
    hc.locations_list # => ["sessions", "potfile", "dict_cache"]

See Also:

- https://github.com/hashcat/hashcat

## Instance Attribute Summary collapse

- #dict_cache ⇒ Location readonly

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

- #potfile ⇒ Location readonly

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

- #sessions ⇒ 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) ⇒ Hashcat 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) ⇒ `Hashcat`

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

    34
    35
    36
    37
    38
    39
    40
    # File 'lib-ruby/aspisec/modules/hashcat.rb', line 34

    def initialize(conf, logger: nil)
      super(conf, 'hashcat', logger:)
      @sessions = Location.new(@conf, 'sessions')
      @potfile = Location.new(@conf, 'potfile')
      @dict_cache = Location.new(@conf, 'dict_cache')
      @locations_list = %w[sessions potfile dict_cache]
    end

## Instance Attribute Details

### #dict_cache ⇒ `Location` (readonly)

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

Returns:

- (`Location`)

    29
    30
    31
    # File 'lib-ruby/aspisec/modules/hashcat.rb', line 29

    def dict_cache
      @dict_cache
    end

### #potfile ⇒ `Location` (readonly)

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

Returns:

- (`Location`)

    25
    26
    27
    # File 'lib-ruby/aspisec/modules/hashcat.rb', line 25

    def potfile
      @potfile
    end

### #sessions ⇒ `Location` (readonly)

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

Returns:

- (`Location`)

    21
    22
    23
    # File 'lib-ruby/aspisec/modules/hashcat.rb', line 21

    def sessions
      @sessions
    end