Skip to content

Commit 628be46

Browse files
committed
Add mixins
1 parent 0a0db81 commit 628be46

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

resources/extract_module_info.rc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ def sort_platform_string(string)
3434
string.split(',').each(&:strip!).sort.join(',')
3535
end
3636

37+
# Mixins that can be filtered as they're not interesting
38+
common_mixins = (
39+
Msf::Exploit.ancestors +
40+
Msf::Auxiliary.ancestors +
41+
Msf::Post.ancestors
42+
).map(&:to_s).uniq
43+
3744
_, total_time = record_time do
3845
STDERR.puts 'Extracting module paths'
3946
module_paths, module_paths_timing = record_time { framework.modules.to_a }
@@ -71,6 +78,7 @@ _, total_time = record_time do
7178
references: mod.references.map { |ref| { 'type' => ref.ctx_id, 'value' => ref.ctx_val, 'site' => ref.site } },
7279
platform: sort_platform_string(mod.platform_to_s),
7380
arch: mod.arch_to_s,
81+
mixins: mod.class.ancestors.map(&:to_s) - common_mixins - [mod.class.to_s],
7482
autofilter_ports: (
7583
mod.respond_to?(:autofilter_ports) ? mod.autofilter_ports : nil
7684
),

0 commit comments

Comments
 (0)