hashcat Forum
Can hashcat support zip2john's "$pkzip$" instead of only "$pkzip2$"? - 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: Can hashcat support zip2john's "$pkzip$" instead of only "$pkzip2$"? (/thread-11037.html)



Can hashcat support zip2john's "$pkzip$" instead of only "$pkzip2$"? - ac2022 - 10-02-2022

Hello!

I want to recover a zip password using hashcat.

hashcat requires the hash of the desired password.

In order to obtain the password hash from the zip, I have tried using zip2john using:


sudo zip2john /home/The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali)/Desktop/myfile.zip > hash.txt


It works and outputs a hash, starting with "$pkzip$".

hashcat however seems to expect "$pkzip2$".

It responds:

Token length exception: This error happens if the wrong hash type is specified, if the hashes are malformed, or if input is otherwise not as expected (for example, if the --username option is used but no username is present).
hashcat provides sample hashes here.

What could I try next?

I have tried some online tools, but their hashes triggered the same error message.

Thank you!


RE: Can hashcat support zip2john's "$pkzip$" instead of only "$pkzip2$"? - marc1n - 10-02-2022

Use john the ripper for crack...


RE: Can hashcat support zip2john's "$pkzip$" instead of only "$pkzip2$"? - b8vr - 10-02-2022

Have you formatted the hash for correct use in hashcat? Zip2john is for John the Ripper and does not work out of the box for hashcat. You need to remove any data from the hash after and including any : (colon).
Try hashcat --identify hash to have hashcat tell you what modes to try.


RE: Can hashcat support zip2john's "$pkzip$" instead of only "$pkzip2$"? - @smyb2002 - 07-10-2026

Hello,I met the same problem. Do you find an answer?


RE: Can hashcat support zip2john's "$pkzip$" instead of only "$pkzip2$"? - drsnooker - 07-10-2026

(3 hours ago)@smyb2002 Wrote: Hello,I met the same problem. Do you find an answer?

I haven't tested this but there is a zip2hashcat (instead of zip2john) might work better for your needs.
https://hashcat.net/forum/thread-11547.html


RE: Can hashcat support zip2john's "$pkzip$" instead of only "$pkzip2$"? - @smyb2002 - 07-10-2026

(2 hours ago)drsnooker Wrote:
(3 hours ago)@smyb2002 Wrote: Hello,I met the same problem. Do you find an answer?

I haven't tested this but there is a zip2hashcat (instead of zip2john) might work better for your needs.
https://hashcat.net/forum/thread-11547.html
Thank you too much! but when i use the ziptohashcat, the extracted hash value is tooooo long. it seems not like a right value. Do you know why?