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

# Class: Aspisec::Modules::Crackmapexec

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

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

## Overview

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

Examples:

    # Get the global config
    conf = Aspisec::Config.new.conf
    # Create a Crackmapexec module instance
    cme = Aspisec::Modules::Crackmapexec.new(conf)
    # Locations available
    cme.locations_list # => ["logs", "screenshots", "workspaces"]

See Also:

- https://github.com/byt3bl33d3r/CrackMapExec

## Instance Attribute Summary collapse

- #logs ⇒ Location readonly

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

- #screenshots ⇒ Location readonly

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

- #workspaces ⇒ 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) ⇒ Crackmapexec constructor

  Inherits from Aspisec::Module but without the `tool_name` argument because it is hardcoded for each module.

### Methods inherited from Aspisec::Module

#check_config, #enabled?, #locations

## Constructor Details

### #initialize(conf, logger: nil) ⇒ `Crackmapexec`

Inherits from Aspisec::Module but without the `tool_name` argument
because it 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/crackmapexec.rb', line 34

    def initialize(conf, logger: nil)
      super(conf, 'crackmapexec', logger:)
      @logs = Location.new(@conf, 'logs')
      @screenshots = Location.new(@conf, 'screenshots')
      @workspaces = Location.new(@conf, 'workspaces')
      @locations_list = %w[logs screenshots workspaces]
    end

## Instance Attribute Details

### #logs ⇒ `Location` (readonly)

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

Returns:

- (`Location`)

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

    def logs
      @logs
    end

### #screenshots ⇒ `Location` (readonly)

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

Returns:

- (`Location`)

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

    def screenshots
      @screenshots
    end

### #workspaces ⇒ `Location` (readonly)

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

Returns:

- (`Location`)

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

    def workspaces
      @workspaces
    end