oclHashcat SHA256 Line Length Exception

Jesse Somerville picture Jesse Somerville · Oct 1, 2014 · Viewed 8k times · Source

I am running this command in my Windows cmd:

oclHashcat.exe -m 1400 hash.txt

My hash is:

$5$JLj/jsZd$hOjXUxfucZeTUYE/MB2WMnY75/Cty8V9Z8/sslogefB

I keep getting an error "Line-Length exception" and I am not sure why.

Answer

atom picture atom · Oct 1, 2014

That hash you posted is sha256crypt. To make hashcat load it you need to use -m 7400 instead of -m 1400.

Here's a sample list of hashes in the way how hashcat wants to load them: https://hashcat.net/wiki/doku.php?id=example_hashes

You can typically recognize those crypt() based hashes if you see this format:

$id$salt$encrypted

Where ID can be one of

  • 1 MD5, default 1000 iterations
  • 2a/2y/2x Blowfish, default 64 iterations
  • 5 SHA-256, default 5000 iterations
  • 6 SHA-512, default 5000 iterations

There are some more, but those are the most common.

There's also an optional round= field on which the user can defines the number of iterations different to the default value. In that case, the hash looks like this:

$id$rounds=XXX$salt$encrypted

Hashcat accepts user-defined rounds as well