diff --git a/.github/workflows/module-info.yml b/.github/workflows/module-info.yml index 966487a..08d287d 100644 --- a/.github/workflows/module-info.yml +++ b/.github/workflows/module-info.yml @@ -31,7 +31,7 @@ jobs: fail-fast: true matrix: ruby: - - 2.7 + - 3.2 info_cmd: - >- set -euxo pipefail; @@ -56,7 +56,6 @@ jobs: with: path: metasploit-info - - name: ${{ matrix.test_cmd }} run: | echo "${CMD}" @@ -70,9 +69,11 @@ jobs: repository: rapid7/metasploit-framework path: metasploit-framework - - uses: actions/setup-ruby@v1 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} + bundler-cache: true - name: Setup bundler run: | diff --git a/resources/extract_module_info.rc b/resources/extract_module_info.rc index c01efcc..0bc2305 100644 --- a/resources/extract_module_info.rc +++ b/resources/extract_module_info.rc @@ -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' @@ -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