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 --increment-inverse #3960

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

PenguinKeeper7
Copy link
Contributor

@PenguinKeeper7 PenguinKeeper7 commented Feb 29, 2024

See: #3959

(Submitted as a draft as it could do with a small clean-up and will likely need to be changed with future Atom's large commit anyway)

@virodoran
Copy link

This is awesome, I have been wanting this as a hashcat feature for ages.

One thing I'd suggest though is to not have it require the -i flag. In fact, I'd actually rather see it be mutually exclusive with -i so when running attacks you would choose between --increment and --increment-inverse.

I'd love a -ii shorthand (for increment inverse) or something too, but I guess hashcat doesn't have any other flags like that so maybe it would be weird... and -I is already taken unfortunately.

@roycewilliams
Copy link
Member

I'd love a -ii shorthand (for increment inverse) or something too, but I guess hashcat doesn't have any other flags like that so maybe it would be weird... and -I is already taken unfortunately.

There are -II and -hh, at least - but so far, they seem to mean "do it more".

@PenguinKeeper7
Copy link
Contributor Author

PenguinKeeper7 commented Mar 1, 2024

There are -II and -hh, at least - but so far, they seem to mean "do it more".

What's your opinion on -ii? Do you think it'd be out of place? I'm happy to implement it and I think it might be cool

@Shooter3k
Copy link

There are -II and -hh, at least - but so far, they seem to mean "do it more".

What's your opinion on -ii? Do you think it'd be out of place? I'm happy to implement it and I think it might be cool

personally, I love the -ii idea

Replace the old reversal function with an improved one, that both respects custom charsets in mask files and escaped question marks
@PenguinKeeper7
Copy link
Contributor Author

@virodoran, --increment and --increment-inverse are no longer required together (0fb6e68)
@virodoran / @Shooter3k, -ii is now an alias for --increment-inverse (18a35bd)

@PenguinKeeper7 PenguinKeeper7 marked this pull request as ready for review March 6, 2024 21:47
Comment on lines 2353 to +2354
bool increment;
bool increment_inverse;
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't it better to use an enum type for it?

Suggested change
bool increment;
bool increment_inverse;
increment_t increment;

It could be just like the following:

typedef enum increment {
    INCREMENT_NONE,
    INCREMENT_NORMAL,
    INCREMENT_INVERSED,
} increment_t;

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.

None yet

5 participants