CYB3RMX / Qu1cksc0pe

All-in-One malware analysis tool.
GNU General Public License v3.0
1.33k stars 186 forks source link

Distutils package is deprecated #26

Closed MulletGoneViral closed 1 year ago

MulletGoneViral commented 1 year ago

I ran setup.sh in WSL in windows 11 and got this error:

/home/mulletgoneviral/Downloads/opt/pyexiftool/setup.py:17: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives from distutils.core import setup Traceback (most recent call last): File "/home/mulletgoneviral/Downloads/opt/pyexiftool/setup.py", line 17, in from distutils.core import setup

I also get this error:

cp: cannot stat 'Modules/lib/sc0pe_helper.py': No such file or directory

I checked the setup.sh file and cannot see where sc0pe_helper.py gets installed, is this error related to the previous one?

CYB3RMX commented 1 year ago

Hello there! Looks like the distutils error is related to pyexiftool repository. I will try to test setup.sh on my WSL and check what is wrong. Can you clone Qu1cksc0pe again and re-execute setup.sh script then send me screenshots about errors?

Note: Make sure if sc0pe_helper.py file contained in the new cloned repository directories

Edit: By the way following codes will install sc0pe_helper.py resim

Edit2: What is your python version? Can you try to use Qu1cksc0pe with python 3.9.2?

Edit3: I downloaded latest Qu1cksc0pe on my WSL and execute setup.sh script. After that it gave me this output: Note: I used Windows 10. I tried to run Qu1cksc0pe and it worked for me. resim

MulletGoneViral commented 1 year ago

I found the problem for the second error. Turns out the git clone command didn't complete properly and some files like sc0pe_helper.py where not downloaded. I cloned it again and ran setup.sh but it still did not work and I got this error:

image

I am using python 3.11.2.

Edit: I installed requirements.txt via pip and got this error (too long to show in screenshot):

Building wheels for collected packages: yara-python, acefile Building wheel for yara-python (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [45 lines of output] /home/mulletgoneviral/.local/lib/python3.11/site-packages/setuptools/dist.py:755: SetuptoolsDeprecationWarning: Invalid dash-separated options !!

          ********************************************************************************
          Usage of dash-separated 'description-file' will not be supported in future
          versions. Please use the underscore name 'description_file' instead.

          By 2023-Sep-26, you need to update your project and remove deprecated calls
          or your builds will no longer be supported.

          See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
          ********************************************************************************

  !!
    opt = self.warn_dash_deprecation(opt, section)
  /home/mulletgoneviral/.local/lib/python3.11/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
  !!

          ********************************************************************************
          The license_file parameter is deprecated, use license_files instead.

          By 2023-Oct-30, you need to update your project and remove deprecated calls
          or your builds will no longer be supported.

          See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
          ********************************************************************************

  !!
    parsed = self.parsers.get(option_name, lambda x: x)(value)
  running bdist_wheel
  running build
  running build_ext
  building 'yara' extension
  creating build
  creating build/temp.linux-x86_64-cpython-311
  creating build/temp.linux-x86_64-cpython-311/yara
  creating build/temp.linux-x86_64-cpython-311/yara/libyara
  creating build/temp.linux-x86_64-cpython-311/yara/libyara/modules
  creating build/temp.linux-x86_64-cpython-311/yara/libyara/proc
  x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DUSE_LINUX_PROC=1 -DHAVE_MEMMEM=1 -Iyara/libyara/include -Iyara/libyara/ -I. -I/usr/include/python3.11 -c yara-python.c -o build/temp.linux-x86_64-cpython-311/yara-python.o
  yara-python.c:20:10: fatal error: Python.h: No such file or directory
     20 | #include <Python.h>
        |          ^~~~~~~~~~
  compilation terminated.
  error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for yara-python Running setup.py clean for yara-python Building wheel for acefile (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [17 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-cpython-311 copying acefile.py -> build/lib.linux-x86_64-cpython-311 running build_ext building 'acebitstream' extension creating build/temp.linux-x86_64-cpython-311 creating build/temp.linux-x86_64-cpython-311/c x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DLITTLE_ENDIAN_SWAP=1 -I/usr/include/python3.11 -c c/acebitstream.c -o build/temp.linux-x86_64-cpython-311/c/acebitstream.o x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DLITTLE_ENDIAN_SWAP=1 -I/usr/include/python3.11 -c c/acebitstream_mod.c -o build/temp.linux-x86_64-cpython-311/c/acebitstream_mod.o c/acebitstream_mod.c:37:10: fatal error: Python.h: No such file or directory 37 | #include | ^~~~~~ compilation terminated. error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for acefile Running setup.py clean for acefile Failed to build yara-python acefile ERROR: Could not build wheels for yara-python, acefile, which is required to install pyproject.toml-based projects

CYB3RMX commented 1 year ago

Hmm according to that error messages Can you do these things?:

  1. setup.sh: line 17: pip3 command not found => Make sure you have the pip3 command. To install pip3 you can execute: sudo apt install python3-pip
  2. Looks like you couldn't install the exiftool binary via apt. You got unmet dependency errors.
  3. fatal error: Python.h: No such file or directory => You need to do: sudo apt install python3-dev

If you fix that these problems and then restart the setup.sh script It should work properly.

Thank you for your report. I'll add pip3 existence check to setup.sh script.

MulletGoneViral commented 1 year ago

Thank you for the help and fast response, every thing seems to be installed properly but now I'm getting puremagic errors:

image

Is this because puremagic is in the wrong folder? I know that when it ran without the sc0pe_helper module it threw this error and then the "sc0pe_helper is not found" error, but installing puremagic fixed it.

CYB3RMX commented 1 year ago

You should execute sudo pip3 install -r requirements.txt command for before installation will fix your problem. If you want to get best experience you don't need to install program by the way.

MulletGoneViral commented 1 year ago

Yes, sorry. I ran that command with pip not pip3 so that's why it did not work. All is working now. Thanks again for all your help. I am really interested in av and I think your work is very cool.

CYB3RMX commented 1 year ago

Thank you for your comments. I hope it was useful for you :)