wvdumper / dumper

Dump L3 CDM from any Android device
520 stars 245 forks source link

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

Open StickyChannel92 opened 8 months ago

StickyChannel92 commented 8 months ago
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 commented 2 weeks ago

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