在 Linux 中安装 zip2john 工具

red*_*ib3 3 linux zip

如何在不安装 John 软件包的情况下安装 Zip2john 工具?

我已经拥有除 Zip2John 之外的所有 John 工具。我只想将其添加到包中。

zip2john.cGithub 存储库复制了代码并编译了它。但它有一些未满足的依赖关系。

C编译错误:

C编译错误

我该如何安装它?

注意:我不想再次安装整个 JohnTheRipper 软件包。

错误:

zip2john.c:121:10: fatal error: arch.h: No such file or directory 
121 | #include "arch.h"
    |
compilation terminated.
Run Code Online (Sandbox Code Playgroud)

Ste*_*itt 5

zip2john.c是\xe2\x80\x99t 一个独立文件,导致一个独立实用程序;它\xe2\x80\x99是(巨型)JtR整体的一个组成部分。它本身检查它是如何调用的,如果它被调用为 则john运行。zip2johnzip2john

\n

因此,要构建zip2john,您需要构建完整的巨型john

\n
$ git clone https://github.com/openwall/john\n$ cd john/src\n$ ./configure && make\n
Run Code Online (Sandbox Code Playgroud)\n

如果成功完成,它将john在 中生成一个二进制文件john/run,以及一个zip2john到它的符号链接。

\n

代码非常纠结,没有简单的方法来构建zip2john它及其依赖项。

\n

如果您已经有一个 jumbo john,您可以对其进行符号链接而无需重建任何内容:

\n
ln -s john zip2john\n
Run Code Online (Sandbox Code Playgroud)\n

确保结果按预期工作:

\n
$ ./zip2john\nUsage: ./zip2john [options] [zip file(s)]\n -s Scan archive from the beginning, looking for local file headers. This\n    is less reliable than going by the central index, but might work better\n    with corrupted or split archives.\nOptions for 'old' PKZIP encrypted files only:\n -a <filename>   This is a 'known' ASCII file. This can be faster, IF all\n    files are larger, and you KNOW that at least one of them starts out as\n    'pure' ASCII data.\n -o <filename>   Only use this file from the .zip file.\n -c This will create a 'checksum only' hash.  If there are many encrypted\n    files in the .zip file, then this may be an option, and there will be\n    enough data that false positives will not be seen.  Up to 8 files are\n    supported. These hashes do not reveal actual file data.\n -m Use "file magic" as known-plain if applicable. This can be faster but\n    not 100% safe in all situations.\n\nNOTE: By default it is assumed that all files in each archive have the same\npassword. If that's not the case, the produced hash may be uncrackable.\nTo avoid this, use -o option to pick a file at a time.\n
Run Code Online (Sandbox Code Playgroud)\n

如果您的john二进制文件不支持此操作模式,您将获得通常的使用输出:

\n
$ ./zip2john\nJohn the Ripper 1.9.0-jumbo-1+bleeding-c80015001 2022-07-21 20:14:47 +0200 OMP [linux-gnu 64-bit x86_64 AVX2 AC]\nCopyright (c) 1996-2022 by Solar Designer and others\nHomepage: https://www.openwall.com/john/\n\nUsage: zip2john [OPTIONS] [PASSWORD-FILES]\n\nUse --help to list all available options.\n
Run Code Online (Sandbox Code Playgroud)\n