Class: Msf::Analyze

Inherits:
Object
  • Object
show all
Defined in:
lib/msf/core/analyze.rb

Defined Under Namespace

Classes: Result

Instance Method Summary collapse

Constructor Details

#initialize(framework) ⇒ Analyze

Returns a new instance of Analyze.



3
4
5
# File 'lib/msf/core/analyze.rb', line 3

def initialize(framework)
  @framework = framework
end

Instance Method Details

#host(eval_host, payloads: nil) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/msf/core/analyze.rb', line 7

def host(eval_host, payloads: nil)
  unless eval_host.vulns
    return {}
  end

  # Group related vulns
  vuln_families = group_vulns(eval_host.vulns)

  # finds all modules that have references matching those found on host vulns with service data
  suggested_modules = suggest_modules_for_vulns(eval_host, vuln_families, payloads: payloads)

  {results: suggested_modules}
end