Class: ZAWS::Command::Nessus

Inherits:
Thor
  • Object
show all
Defined in:
lib/zaws/command/nessus.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Nessus

Returns a new instance of Nessus.



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/zaws/command/nessus.rb', line 14

def initialize(*args)
  super
  shellout=ZAWS::Helper::Shell.new
  nessusapi = ZAWS::Nessusapi.new(shellout)
  @nessus = ZAWS::Controllers::Nessus.new(shellout, nessusapi)
  @out = $stdout
  @print_exit_code = false
  @params= {
     'home' =>  options[:home]
  }
end

Instance Attribute Details

#nessusObject

Returns the value of attribute nessus.



10
11
12
# File 'lib/zaws/command/nessus.rb', line 10

def nessus
  @nessus
end

#outObject

Returns the value of attribute out.



11
12
13
# File 'lib/zaws/command/nessus.rb', line 11

def out
  @out
end

Returns the value of attribute print_exit_code.



12
13
14
# File 'lib/zaws/command/nessus.rb', line 12

def print_exit_code
  @print_exit_code
end

Instance Method Details

#view_agentsObject



33
34
35
36
# File 'lib/zaws/command/nessus.rb', line 33

def view_agents
  @params['scanner']=options[:scanner]
  @out.puts(@nessus.agents.view(params));
end

#view_scannersObject



27
28
29
# File 'lib/zaws/command/nessus.rb', line 27

def view_scanners
  @out.puts(@nessus.scanners.view(@params));
end