Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more basic pattern options to CLI::PatternOptions #254

Merged
merged 5 commits into from
Dec 8, 2024

Conversation

raj921
Copy link
Contributor

@raj921 raj921 commented Dec 8, 2024

Added new pattern options:

  • --alpha: /[a-zA-Z]+/
  • --uppercase: /[A-Z]+/
  • --lowercase: /[a-z]+/
  • --alpha-numeric: /[0-9a-zA-Z]+/
  • --hex: /[0-9a-fA-F]+/
  • --uppercase-hex: /[0-9A-F]+/
  • --lowercase-hex: /[0-9a-f]+/

Resolves #253

Added new pattern options:
- --alpha: /[a-zA-Z]+/
- --uppercase: /[A-Z]+/
- --lowercase: /[a-z]+/
- --alpha-numeric: /[0-9a-zA-Z]+/
- --hex: /[0-9a-fA-F]+/
- --uppercase-hex: /[0-9A-F]+/
- --lowercase-hex: /[0-9a-f]+/

Resolves ronin-rb#253
Added a basic spec file that verifies the command_name matches
the file name for the Exploit command class.
Copy link
Member

@postmodern postmodern left a comment

Choose a reason for hiding this comment

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

The options need a block which sets @pattern to the Regexp.

The value: {...} keyword option is used to define the value which an option can accept (ex: --opt VALUE), not the value which the option sets.

lib/ronin/cli/pattern_options.rb Outdated Show resolved Hide resolved
lib/ronin/cli/pattern_options.rb Outdated Show resolved Hide resolved
lib/ronin/cli/pattern_options.rb Outdated Show resolved Hide resolved
lib/ronin/cli/pattern_options.rb Outdated Show resolved Hide resolved
lib/ronin/cli/pattern_options.rb Outdated Show resolved Hide resolved
lib/ronin/cli/pattern_options.rb Outdated Show resolved Hide resolved
lib/ronin/cli/pattern_options.rb Outdated Show resolved Hide resolved
lib/ronin/cli/pattern_options.rb Outdated Show resolved Hide resolved
lib/ronin/cli/pattern_options.rb Outdated Show resolved Hide resolved
lib/ronin/cli/pattern_options.rb Outdated Show resolved Hide resolved
Replaced value: {...} with blocks that set @pattern to the respective
Regexp for all pattern options. This maintains the existing behavior
where options set @pattern directly rather than accepting a value.
@postmodern postmodern added this to the 2.2.0 milestone Dec 8, 2024
@raj921
Copy link
Contributor Author

raj921 commented Dec 8, 2024

@postmodern sir did some change as u said

@postmodern postmodern changed the base branch from main to 2.2.0 December 8, 2024 18:59
* This should go into a separate commit.
@postmodern postmodern merged commit 0484108 into ronin-rb:2.2.0 Dec 8, 2024
4 checks passed
@postmodern postmodern added the pattern-options CLI::PatternOptions label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pattern-options CLI::PatternOptions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more basic options to CLI::PatternOptions
2 participants