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

tmesis.pl to use \x rule syntax if needed #77

Merged
merged 3 commits into from
Jul 26, 2023

Conversation

roycewilliams
Copy link
Member

While here, also clean up some non-ASCII in the source itself.

@roycewilliams
Copy link
Member Author

roycewilliams commented Jul 23, 2023

The only "problem" with this simple/naive method is that if one of the bytes in a multibyte sequence just happens to be valid printable ASCII, then it will just use that character instead of escaping it, which may confuse readability a bit in the generated rule. But I thought it best to keep it simple, and not try to do encoding validation etc etc. And because "bytes are just bytes", the resulting byte insertion results should be the same.

If this approach is accepted, I will also apply the equivalent changes to tmesis-dynamic.pl .

Prompted by question from @stealthsploit.

Edit: I tested other comparison methods for efficiency. it's slightly (~3-5%) faster to just compare characters directly, without ~= and without conversion:

if ($word_buf[$word_pos] lt ' ' or $word_buf[$word_pos] gt '~')

@jsteube jsteube merged commit 3452403 into hashcat:master Jul 26, 2023
3 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