Module: Msf::Modules::Metadata::Stats

Included in:
Cache
Defined in:
lib/msf/core/modules/metadata/stats.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#module_countsObject (readonly)

Returns the value of attribute module_counts.



7
8
9
# File 'lib/msf/core/modules/metadata/stats.rb', line 7

def module_counts
  @module_counts
end

Instance Method Details

#update_statsObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/msf/core/modules/metadata/stats.rb', line 9

def update_stats
  @metadata = 
  map_types_to_metadata!

  @module_counts = {
    exploit: @module_metadata_by_type['exploit'].size,
    auxiliary: @module_metadata_by_type['auxiliary'].size,
    post: @module_metadata_by_type['post'].size,
    payload: @module_metadata_by_type['payload'].size,
    encoder: @module_metadata_by_type['encoder'].size,
    nop: @module_metadata_by_type['nop'].size,
    evasion: @module_metadata_by_type['evasion'].size,
    total: @metadata.size
  }
end