Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named 'Crypto' even though module is already installed #67

Open
StickyChannel92 opened this issue Mar 14, 2024 · 1 comment
Open

Comments

@StickyChannel92
Copy link

C:\Users\sagan\Downloads\dumper-main\dumper-main>python dump_keys.py
Traceback (most recent call last):
  File "C:\Users\sagan\Downloads\dumper-main\dumper-main\dump_keys.py", line 6, in <module>
    from Helpers.Scanner import Scan
  File "C:\Users\sagan\Downloads\dumper-main\dumper-main\Helpers\Scanner.py", line 3, in <module>
    from Crypto.PublicKey import RSA
ModuleNotFoundError: No module named 'Crypto'

When installing Crypto after this error:

C:\Users\sagan\Downloads\dumper-main\dumper-main>pip install Crypto
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: Crypto in c:\users\sagan\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (1.4.1)
Requirement already satisfied: Naked in c:\users\sagan\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from Crypto) (0.1.32)
Requirement already satisfied: shellescape in c:\users\sagan\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from Crypto) (3.8.1)
Requirement already satisfied: requests in c:\users\sagan\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from Naked->Crypto) (2.31.0)
Requirement already satisfied: pyyaml in c:\users\sagan\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from Naked->Crypto) (6.0.1)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\sagan\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from requests->Naked->Crypto) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in c:\users\sagan\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from requests->Naked->Crypto) (3.6)
Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\sagan\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from requests->Naked->Crypto) (2.2.1)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\sagan\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from requests->Naked->Crypto) (2024.2.2)

frida, protobuf, pycryptodome, pycrypto are already installed. After reading some comments in this forum post, I tried installing pycrypto, after installing bloatware (C++ build tools) (required to install pycrypto), to get a long error message:

C:\Users\sagan\Downloads\dumper-main\dumper-main>pip install pycrypto
Defaulting to user installation because normal site-packages is not writeable
Collecting pycrypto
  Using cached pycrypto-2.6.1.tar.gz (446 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pycrypto
  Building wheel for pycrypto (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pycrypto (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [28 lines of output]
      warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
      winrand.c
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(31): error C2061: syntax error: identifier 'intmax_t'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(32): error C2061: syntax error: identifier 'rem'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(32): error C2059: syntax error: ';'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(33): error C2059: syntax error: '}'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(35): error C2061: syntax error: identifier 'imaxdiv_t'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(35): error C2059: syntax error: ';'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(45): error C2143: syntax error: missing '{' before '__cdecl'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(46): error C2146: syntax error: missing ')' before identifier '_Number'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(46): error C2061: syntax error: identifier '_Number'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(46): error C2059: syntax error: ';'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(47): error C2059: syntax error: ')'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(50): error C2143: syntax error: missing '{' before '__cdecl'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(51): error C2146: syntax error: missing ')' before identifier '_Numerator'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(51): error C2061: syntax error: identifier '_Numerator'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(51): error C2059: syntax error: ';'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(51): error C2059: syntax error: ','
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(53): error C2059: syntax error: ')'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(55): error C2143: syntax error: missing '{' before '__cdecl'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(61): error C2143: syntax error: missing '{' before '__cdecl'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(68): error C2143: syntax error: missing '{' before '__cdecl'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(74): error C2143: syntax error: missing '{' before '__cdecl'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(81): error C2143: syntax error: missing '{' before '__cdecl'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(87): error C2143: syntax error: missing '{' before '__cdecl'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(94): error C2143: syntax error: missing '{' before '__cdecl'
      C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\inttypes.h(100): error C2143: syntax error: missing '{' before '__cdecl'
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

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

Python 3.12
HP Laptop 17-cn0173st
Windows 11
8GB RAM
Intel Core i3

@colemanshropshire
Copy link

Copying the Crypto module to the dumper-main folder got me past this error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants