Skip to content

Conversation

@cgranleese-r7
Copy link
Contributor

Updates the script to make use of keywords for Powershell added as part of rapid7/rex-random_identifier#17.

Before

It was manually defining its own limited forbidden list using the Parser::RESERVED_VARIABLE_NAMES.

After

Now it uses the language: :powershell option, which tells rex-random_identifier to use the comprehensive PowershellOpts that includes:

  • PowerShell language keywords
  • .NET type names
  • PowerShell automatic variables
  • PowerShell cmdlet aliases

Verification

  • CI passes

DEFAULT_RIG_OPTS = {
max_length: 5,
min_length: 2,
forbidden: Parser::RESERVED_VARIABLE_NAMES.map {|e| e[1..-1]}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a blocker; Could we track down if we need this old var or not, and whether all of the entries here are covered in the old new setup 👀

@adfoster-r7 adfoster-r7 merged commit 5db9015 into rapid7:master Aug 1, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants