Class: Vtk::Commands::Scan::Machine

Inherits:
Vtk::Command show all
Defined in:
lib/vtk/commands/scan/machine.rb

Overview

Check for active malware infection indicators (Shai-Hulud)

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Vtk::Command

#command, #cursor, #editor, #exec_exist?, #generator, #pager, #platform, #prompt, #screen, #which

Constructor Details

#initialize(options) ⇒ Machine

Returns a new instance of Machine.



13
14
15
16
# File 'lib/vtk/commands/scan/machine.rb', line 13

def initialize(options)
  @options = options
  super()
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



11
12
13
# File 'lib/vtk/commands/scan/machine.rb', line 11

def options
  @options
end

Instance Method Details

#execute(output: $stdout) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/vtk/commands/scan/machine.rb', line 18

def execute(output: $stdout)
  @output = output

  script_path, gem_root = find_script
  return script_not_found(output, gem_root) unless script_path

  run_script(script_path)
end