Class: Msf::Simple::Statistics

Inherits:
Object
  • Object
show all
Includes:
Framework::Offspring
Defined in:
lib/msf/base/simple/statistics.rb

Overview

This class provides an interface to various statistics about the framework instance.

Instance Attribute Summary

Attributes included from Framework::Offspring

#framework

Instance Method Summary collapse

Constructor Details

#initialize(framework) ⇒ Statistics

Initializes the framework statistics.



17
18
19
20
# File 'lib/msf/base/simple/statistics.rb', line 17

def initialize(framework)
  self.framework = framework
  Msf::Modules::Metadata::Cache.instance.update_stats
end

Instance Method Details

#num_auxiliaryObject

Returns the number of auxiliary modules in the framework.



53
54
55
# File 'lib/msf/base/simple/statistics.rb', line 53

def num_auxiliary
  Msf::Modules::Metadata::Cache.instance.module_counts[:auxiliary]
end

#num_encodersObject

Returns the number of encoders in the framework.



25
26
27
# File 'lib/msf/base/simple/statistics.rb', line 25

def num_encoders
  Msf::Modules::Metadata::Cache.instance.module_counts[:encoder]
end

#num_evasionObject



64
65
66
# File 'lib/msf/base/simple/statistics.rb', line 64

def num_evasion
  Msf::Modules::Metadata::Cache.instance.module_counts[:evasion]
end

#num_exploitsObject

Returns the number of exploits in the framework.



32
33
34
# File 'lib/msf/base/simple/statistics.rb', line 32

def num_exploits
  Msf::Modules::Metadata::Cache.instance.module_counts[:exploit]
end

#num_nopsObject

Returns the number of NOP generators in the framework.



39
40
41
# File 'lib/msf/base/simple/statistics.rb', line 39

def num_nops
  Msf::Modules::Metadata::Cache.instance.module_counts[:nop]
end

#num_payloadsObject

Returns the number of payloads in the framework.



46
47
48
# File 'lib/msf/base/simple/statistics.rb', line 46

def num_payloads
  Msf::Modules::Metadata::Cache.instance.module_counts[:payload]
end

#num_postObject

Returns the number of post modules in the framework.



60
61
62
# File 'lib/msf/base/simple/statistics.rb', line 60

def num_post
  Msf::Modules::Metadata::Cache.instance.module_counts[:post]
end