Skip to content

Commit

Permalink
Extract stager/adapter information
Browse files Browse the repository at this point in the history
  • Loading branch information
adfoster-r7 committed Oct 12, 2023
1 parent b135b81 commit 52d75dc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/module-info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
fail-fast: true
matrix:
ruby:
- 2.7
- 3.2
info_cmd:
- >-
set -euxo pipefail;
Expand Down
21 changes: 17 additions & 4 deletions resources/extract_module_info.rc
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ end

# Mixins that can be filtered as they're not interesting
common_mixins = (
Msf::Exploit.ancestors +
Msf::Auxiliary.ancestors +
Msf::Exploit.ancestors &
Msf::Auxiliary.ancestors &
Msf::Post.ancestors
).map(&:to_s).uniq
).map(&:to_s)

_, total_time = record_time do
STDERR.puts 'Extracting module paths'
Expand Down Expand Up @@ -154,7 +154,20 @@ _, total_time = record_time do
}

if module_set_name == 'exploit'
data[:compatible_payloads] = mod.compatible_payloads.map { |payload_name, payload_class| payload_name }
data[:compatible_payloads] = mod.compatible_payloads.map { |payload_name, payload_class| payload_name }
end

if module_set_name == 'payload'
payload_data = {
payload_type: mod.payload_type,
adapter_refname: mod.adapter_refname,
adapted_refname: mod.adapted_refname,
# adapted: mod.adapted?,
staged: mod.staged?,
stage_refname: mod.stage_refname,
stager_refname: mod.stager_refname,
}.compact
data.merge!(payload_data)
end

data
Expand Down

0 comments on commit 52d75dc

Please sign in to comment.