Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
cmdline change: always require -m for actions that act on hashes #1456
Because the command line currently has an implied default mode (-m 0, MD5), a number of actions could become less ambiguous for naive users if -m was instead required.
For example, when using
Before the suggested change, the user gets this error, and the naive user has no idea what to do next, because hashcat defaults to MD5 and knows that this hash is the wrong length:
With the suggested change, the user might instead see something like:
If it's not desirable to require -m in most cases, then at least explicitly requiring it for features like
More generally, iif any command that expects to act on hashes make the hash type explicit, then many naive users will not be confused by line-length exception errors, and could instead figure things out for themselves without having to ask, check the FAQ, etc.
(Side note: am I crazy, or is the default (-m 0, MD5) not documented in the help? Maybe in the example column, we could list -m 0 instead of -m 1000 and say "-m 0 (default)"? Or say it somewhere else, maybe in the hash modes list?)
[EDIT: If this idea is appealing, I can submit a PR, depending on what approach you recommend]
Some things to notice is that: