hashcat 5.0.0 with Token length exception with sha1
#1
Hello

I was attempting (first time with hashcat) this:

Code:
$ echo "foo:$(echo bar | sha1sum | cut -d ' ' -f 1)" > test.txt
$ hashcat -m 100 -a 0 test.txt             
hashcat (v5.0.0) starting...

* Device #1: WARNING! Kernel exec timeout is not disabled.
             This may cause "CL_OUT_OF_RESOURCES" or related errors.
             To disable the timeout, see: https://hashcat.net/q/timeoutpatch
OpenCL Platform #1: NVIDIA Corporation
======================================
* Device #1: GeForce GTX 950, 492/1968 MB allocatable, 6MCU

Hashfile 'test.txt' on line 1 (foo:e2...ffccdf271b7fbaf34ed72d089537b42f): Token length exception
No hashes loaded.

Started: Mon Nov 19 14:14:05 2018
Stopped: Mon Nov 19 14:14:05 2018

No idea why my hash wouldn't be a valid hash. Looks valid:

Code:
$ cat test.txt
foo:e242ed3bffccdf271b7fbaf34ed72d089537b42f

What's hashcat really complaining about here?
#2
You are not using --username which tells hashcat to ignore the "foo:" part. Hashcat expects a list with just the hashes, no extra data before that. See https://hashcat.net/wiki/doku.php?id=example_hashes where you can see mode 100 only expects "b89eaac7e61417341b710b727768294d0e6a277b" and not "foo: b89eaac7e61417341b710b727768294d0e6a277b".

--edit: Also you are doing "echo bar | sha1sum" which will make a sha1sum of 'bar+newline' because echo automatically appends a newline. If you just want the sha1sum of 'bar' use "echo -n bar" to omit the newline.
#3
By default, hashcat expects bare hashes (without username). To ignore username, use --username.

With -a 0, you also need to supply a wordlist. If you want to try the default mask attack set instead, use -a 3.
~
#4
also note that you probably intended to run
Code:
echo "foo:$(echo -n bar | sha1sum | cut -d '  ' -f 1)"