ZerBea / hcxtools

A small set of tools to convert packets from capture files to hash files for use with Hashcat or John the Ripper.
MIT License
2.02k stars 392 forks source link

Error = hcxpcapngtool.c:27:10: fatal error: openssl/core.h: No such file or directory due to missing dependency (openssl >= 3.0) #298

Closed SubhanBajwa closed 1 year ago

SubhanBajwa commented 1 year ago

ubuntu@ubuntu-ThinkPad-X250:~/hcxtools$ make cc -O3 -Wall -Wextra -Wpedantic -std=gnu99 -MMD -MF .deps/hcxpcapngtool.d -o hcxpcapngtool hcxpcapngtool.c -lssl -lcrypto -lz -DVERSION_TAG=\"6.3.1-44-g60940c4\" -DVERSION_YEAR=\"2023\" -DWANTZLIB hcxpcapngtool.c:27:10: fatal error: openssl/core.h: No such file or directory 27 | #include <openssl/core.h> | ^~~~ compilation terminated. make: *** No rule to make target 'hcxpcapngtool', needed by 'build'. Stop.

ZerBea commented 1 year ago

You need Openssl >= 3.0 https://www.openssl.org/docs/manmaster/man7/openssl-core.h.html

From README.md sections Requirements: * libopenssl (>= 3.0) and openssl-dev installed

Looks like an old version is installed or your installation is broken.

If the requirements are satisfied (e.g. openssl 3.1.1),

$ pacman -Q | grep openssl
openssl 3.1.1-1

$ locate openssl/core.h
/usr/include/openssl/core.h

everything compiles fine:

$ make
mkdir -p .deps
cc -O3 -Wall -Wextra -Wpedantic -std=gnu99    -MMD -MF .deps/hcxpcapngtool.d -o hcxpcapngtool hcxpcapngtool.c -lssl -lcrypto  -lz   -DVERSION_TAG=\"6.3.1-45-gd763d1f\" -DVERSION_YEAR=\"2023\" -DWANTZLIB
cc -O3 -Wall -Wextra -Wpedantic -std=gnu99    -MMD -MF .deps/hcxhashtool.d -o hcxhashtool hcxhashtool.c -lssl -lcrypto  -lcurl   -DVERSION_TAG=\"6.3.1-45-gd763d1f\" -DVERSION_YEAR=\"2023\" -DWANTZLIB
cc -O3 -Wall -Wextra -Wpedantic -std=gnu99   -MMD -MF .deps/hcxpsktool.d -o hcxpsktool hcxpsktool.c -lssl -lcrypto   -DVERSION_TAG=\"6.3.1-45-gd763d1f\" -DVERSION_YEAR=\"2023\" -DWANTZLIB
cc -O3 -Wall -Wextra -Wpedantic -std=gnu99   -MMD -MF .deps/hcxpmktool.d -o hcxpmktool hcxpmktool.c -lssl -lcrypto   -DVERSION_TAG=\"6.3.1-45-gd763d1f\" -DVERSION_YEAR=\"2023\" -DWANTZLIB
cc -O3 -Wall -Wextra -Wpedantic -std=gnu99   -MMD -MF .deps/hcxeiutool.d -o hcxeiutool hcxeiutool.c   -DVERSION_TAG=\"6.3.1-45-gd763d1f\" -DVERSION_YEAR=\"2023\" -DWANTZLIB
cc -O3 -Wall -Wextra -Wpedantic -std=gnu99   -MMD -MF .deps/hcxwltool.d -o hcxwltool hcxwltool.c   -DVERSION_TAG=\"6.3.1-45-gd763d1f\" -DVERSION_YEAR=\"2023\" -DWANTZLIB
cc -O3 -Wall -Wextra -Wpedantic -std=gnu99   -MMD -MF .deps/hcxhash2cap.d -o hcxhash2cap hcxhash2cap.c   -DVERSION_TAG=\"6.3.1-45-gd763d1f\" -DVERSION_YEAR=\"2023\" -DWANTZLIB
cc -O3 -Wall -Wextra -Wpedantic -std=gnu99    -MMD -MF .deps/wlancap2wpasec.d -o wlancap2wpasec wlancap2wpasec.c -lssl -lcrypto  -lcurl   -DVERSION_TAG=\"6.3.1-45-gd763d1f\" -DVERSION_YEAR=\"2023\" -DWANTZLIB
cc -O3 -Wall -Wextra -Wpedantic -std=gnu99    -MMD -MF .deps/whoismac.d -o whoismac whoismac.c -lssl -lcrypto  -lcurl   -DVERSION_TAG=\"6.3.1-45-gd763d1f\" -DVERSION_YEAR=\"2023\" -DWANTZLIB

installs fine:

$ sudo make install
install -D -m 0755 hcxpcapngtool /usr/bin/hcxpcapngtool
install -D -m 0755 hcxhashtool /usr/bin/hcxhashtool
install -D -m 0755 hcxpsktool /usr/bin/hcxpsktool
install -D -m 0755 hcxpmktool /usr/bin/hcxpmktool
install -D -m 0755 hcxeiutool /usr/bin/hcxeiutool
install -D -m 0755 hcxwltool /usr/bin/hcxwltool
install -D -m 0755 hcxhash2cap /usr/bin/hcxhash2cap
install -D -m 0755 wlancap2wpasec /usr/bin/wlancap2wpasec
install -D -m 0755 whoismac /usr/bin/whoismac

and works fine:

$ hcxpcapngtool -v
hcxpcapngtool 6.3.1-45-gd763d1f (C) 2023 ZeroBeat

Openssl v3.0 is available since Ubuntu Jammy. If you are still on Ubuntu Focal (Openssl 1.1), hcxtools v6.2.9 is the last working version. An overview is here: https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=openssl

ZerBea commented 1 year ago

Solution: 1) use hcxtools v 6.2.9 on Ubuntu <= Focal 2) install openssl >= 3.0 and openssl-dev >= 3.0 3) update to Ubuntu >= Jammy

Closed, because missing dependencies are not an issue, but you can still ask your questions here.