sdnewhop / grinder

:mag_right: Python framework to automatically discover and enumerate hosts from different back-end systems (Shodan, Censys)
GNU General Public License v2.0
289 stars 40 forks source link

Error when trying to install it on Kali 2020 #98

Closed havilson closed 4 years ago

havilson commented 4 years ago

I was following the install procedure and got this error here:

"[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test (default-test) on project Utils: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.: NullPointerException -> [Help 1]"

Any help?

manmolecular commented 4 years ago

Hello, thanks for your interest in Grinder!

Can you please provide additional information related to your installation that will help me to localize problem properly:

  1. On which step this error happens? I believe this error related to TLS-Scanner/TLS-Attacker installation, am I right? If yes, please, make sure that you are trying to install this exact versions: https://github.com/RUB-NDS/TLS-Attacker/tree/3.0 - 3.0 for TLS-Attacker https://github.com/RUB-NDS/TLS-Scanner/tree/2.9 - 2.9 for TLS-Scanner
  2. Can you please provide the output of the following command:
    java -version

    The output must be something like this or similar:

    java version "1.8.0_221"

    Anyway, it's better to use Java 8 for now, because, as I know, this version was tested by the original author of TLS-Attacker/TLS-Scanner modules, you can read about it here: https://github.com/RUB-NDS/TLS-Attacker/issues/40#issuecomment-381898808 So, please, try to install these modules using Java 8 or take a look at workaround variants.

Workaround №1: In case If you don't want to install or use Java 8 in your system, you can use our Docker image: https://github.com/sdnewhop/grinder#building-and-running-in-docker

Workaround №2: Or you can run Grinder without TLS-Scanner/TLS-Attacker because it is an additional module.

Hope this information will help you! I will add some documentation to README.md related to this problem after we solve it.

manmolecular commented 4 years ago

Please let me know if the provided information helped you or if you have any additional questions.

havilson commented 4 years ago

Hi, an update regarding this. The first time I tried I was using Java 11, so I installed Java 8 as suggested. Worked for TLS-Attacker last version, but then when I tried with TLS-Scanner I got too many errors, so I dropped it since they weren't my goal, grinder is. I follow the instructions till here -> "sudo pip3 install -r requirements.txt" I tried without sudo didn't worked since I cloned this repo in /opt (which belongs to root). Now I got the following error: "x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DFREETYPE_BUILD_TYPE=system -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -Iextern/agg24-svn/include -I/usr/local/lib/python3.8/dist-packages/numpy/core/include -I/usr/include/python3.8 -c src/checkdep_freetype2.c -o build/temp.linux-x86_64-3.8/src/checkdep_freetype2.o src/checkdep_freetype2.c:1:10: fatal error: ft2build.h: No such file or directory 1 | #include | ^~~~ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1"

manmolecular commented 4 years ago

Oh, I believe this problem is related to the libfreetype library: https://www.freetype.org/ As I see, this dependency required only for python3.8 (and also I test it on macOS, but did not test this case on Linux). I did not notice this problem on python3.7 or python3.6 before. But, if the following answer will help you, I will add this information too.

By the way, ft2build.h is the part of libfreetype6-dev package: https://packages.debian.org/cgi-bin/search_contents.pl?word=ft2build.h&searchmode=searchword&case=insensitive&version=stable&arch=i386

I think this command should help you:

sudo apt-get install build-essential libfreetype6-dev python-dev

Or, if this will not have any effect on your system, you can try to install additional related packages (libfreetype6, libfreetype6-dev, libfreetype-dev): https://packages.debian.org/ru/source/sid/freetype

Please, let me know if this information was helpful.

manmolecular commented 4 years ago

I've updated the documentation: https://github.com/sdnewhop/grinder/pull/100

havilson commented 4 years ago

Ok, did the "sudo apt-get install build-essential libfreetype6-dev python-dev" All OK! It worked!

Thanks for your support!

manmolecular commented 4 years ago

Awesome! Glad to help you. In case of other problems, feel free to add new issues.