Separator unmatched when using example hash - Printable Version +- hashcat Forum (https://hashcat.net/forum) +-- Forum: Support (https://hashcat.net/forum/forum-3.html) +--- Forum: hashcat (https://hashcat.net/forum/forum-45.html) +--- Thread: Separator unmatched when using example hash (/thread-8223.html) |
Separator unmatched when using example hash - timehopper11 - 03-16-2019 I'm running this command: Code: sudo ./hashcat64.bin -m 3200 -a 0 -p $ $2a$05$LhayLxezLhK1LhWvKxCyLOj0j1u.Kj0jZ0pEmm134uzrQlFvQJLF6 wordlists/realuniq.dict Which is the example hash for bcrypt on https://hashcat.net/wiki/doku.php?id=example_hashes When I run this I get the following error and it looks like something weird happened to the hash: Code: Hash 'a-bash5.Kj0jZ0pEmm134uzrQlFvQJLF6': Separator unmatched The same thing happens when I try the pbkdf2 sha256 example hash: Code: sudo ./hashcat64.bin -m 10000 -a 0 -p $ pbkdf2_sha256$20000$H0dPx8NeajVu$GiC4k5kqbbR9qWBlsRgDywNqC2vd9kqfk7zdorEnNas= wordlists/realuniq.dict Code: Hash 'pbkdf2_sha2560000=': Separator unmatched I then replaced the $ signs with : and stopped overwriting the default separator and got the same issue: Code: sudo ./hashcat64.bin -m 10000 -a 0 pbkdf2_sha256:20000:H0dPx8NeajVu:GiC4k5kqbbR9qWBlsRgDywNqC2vd9kqfk7zdorEnNas= wordlists/realuniq.dict The hash in the error looks slightly better formed this time around but the error still exists: Code: Hash 'pbkdf2_sha256:20000:H0dPx8NeajVu:GiC4k5kqbbR9qWBlsRgDywNqC2vd9kqfk7zdorEnNas=': Separator unmatched This is obviously something simple I'm doing wrong, do I need to do any sort of sanitisation/re formatting of the hash before running it through hashcat? RE: Separator unmatched when using example hash - royce - 03-16-2019 Hashes containing '$' need to be enclosed in single quotes on the Unix commandline. This is because $[string] is a way to do variable substitution in bash and related shells. Once you fix that, you won't need to specify the separator on the commandline. RE: Separator unmatched when using example hash - timehopper11 - 03-16-2019 (03-16-2019, 08:10 PM)royce Wrote: Hashes containing '$' need to be enclosed in single quotes on the Unix commandline. Ah of course, thank you! RE: Separator unmatched when using example hash - meow - 10-01-2022 (03-16-2019, 08:10 PM)royce Wrote: Hashes containing '$' need to be enclosed in single quotes on the Unix commandline. This is because $[string] is a way to do variable substitution in bash and related shells. Just how do you format it then? Let's have an example please? I have this same situation but with a bcrypt hash and I was unable to get it to work. I ended up placing the hash in a a file and then used that file as input parameter. Instead of this: Code: hashcat -m 3200 -a 0 $2a$05$LhayLxezLhK1LhWvKxCyLOj0j1u.Kj0jZ0pEmm134uzrQlFvQJLF6 ./wordlist I figured I would do this: Code: hashcat -m 3200 -a 0 '$'2a'$'05'$'LhayLxezLhK1LhWvKxCyLOj0j1u.Kj0jZ0pEmm134uzrQlFvQJLF6 ./wordlist But I ended up doing this: Code: hashcat -m 3200 -a 0 ./hashfile ./wordlist What am I doing wrong here? This bcrypt string is a valid hash string taken from Hashcat list of example hashes. RE: Separator unmatched when using example hash - royce - 10-01-2022 Quoting only needs to happen on the outside of the string: 'blah$blah$blah' RE: Separator unmatched when using example hash - meow - 10-01-2022 (10-01-2022, 08:20 PM)royce Wrote: Quoting only needs to happen on the outside of the string: So I guess this is why I see so many people use a file for hash input, even if they only have a single hash to work on. At one point, I did actually try enclosing the whole string in double quotes rather than single quotes (coming from a Windows world). That was very close, but not quite adequate. So I went on to read about single vs. double quotes and why my method failed, and I came across this explanation at GeeksForGeeks.org: Quote:Single quotes: Today I learned something that goes well beyond the realm of Hashcat. Much appreciated. Thank you! |