Skip to content

add count command line flag - #21789

Open
h00die wants to merge 3 commits into
rapid7:masterfrom
h00die:count
Open

add count command line flag#21789
h00die wants to merge 3 commits into
rapid7:masterfrom
h00die:count

Conversation

@h00die

@h00die h00die commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Description

This adds a new command line flag to print the count of modules (similar to the current banner) and exit. This prevents doing funky regex magic against the banner.

I wanted this feature to keep track of numbers for another project, and seemed like an easy win

Verification Steps

    • ./msfconsole --count and see the counts

AI Usage Disclosure

GLM-5.2

@cgranleese-r7

Copy link
Copy Markdown
Contributor

What would your thoughts be on renaming the flag to --module-count and maybe adding a shorthand flag to be aligned with the existing flags. Sorry to seem picky here, but I predict this be needed for future metadata work we have planned, potentially anyway 😄

Super knit picky, but would we want comma separated values here? Just thinking if they are being used programmatically, we may just want integers here?

Otherwise looks good to me 👍

❯ bundle exec ruby ./msfconsole --count
exploits: 2,677
auxiliary: 1,346
payloads: 2,599
post: 435
encoders: 57
nops: 14
evasion: 12

@h00die

h00die commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

no problems from me, changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement rn-enhancement release notes enhancement

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants