mufeedvh / pdfrip

A multi-threaded PDF password cracking utility equipped with commonly encountered password format builders and dictionary attacks.
MIT License
589 stars 67 forks source link

Add Regex expressions to Custom Queries #37

Open julianclark opened 3 months ago

julianclark commented 3 months ago

Expand the capabilities of the custom query builder in PDFRip by integrating full regular expression (regex) support. This enhancement will allow for more complex and versatile pattern matching capabilities in password format specification, making the tool more effective for advanced password cracking scenarios.

Proposed Enhancement Integrate full regex support within the custom query builder, allowing users to specify intricate password patterns using the powerful syntax of regular expressions. This would enable:

Complex pattern matching with optional elements, alternations, and nested conditions. Conditional expressions and assertions (lookahead, lookbehind) for dynamic pattern specification. Enhanced flexibility with character classes and quantifiers to address a broader variety of password formats.

Example Use Cases: Complex Date Formats: Match passwords that include full or abbreviated month names, optional separators, and variable year formats (e.g., 01-Jan-2020, 1 January 20). --regex "([0-2]?[1-9]|3[01])(-| )?(Jan|Feb|Mar|...|Dec)(-| )?(19[8-9][0-9]|20[0-2][0-9]|202[0-4])"

Optional Prefixes and Postfixes: Handle passwords with optional beginning or ending phrases, with multiple format variations (e.g., prefix12345, 12345postfix, prefix12345postfix). --regex "(prefix)?\d{5}(postfix)?" Advanced Alphanumeric Combinations: Efficiently tackle passwords composed of a mix of letters, numbers, and special characters in unpredictable configurations. --regex "[A-Za-z]{3}\d{2,4}[!@#\$]"