WhatsApp-Key-Database-Extractor icon indicating copy to clipboard operation
WhatsApp-Key-Database-Extractor copied to clipboard

code error

Open fransoplo opened this issue 3 years ago • 6 comments

when i'm using the console to run wa_kdbe.py.. C:\Users\home\Desktop\WhatsApp-Key-Database-Extractor-master\helpers\custom_ci.py", line 37, in custom_print cprint(f'{time}{text_to_print}', color, attrs=attr, end=end) NameError: name 'cprint' is not defined. Did you mean: 'print'?

How i can define cprint?

fransoplo avatar Jun 21 '22 20:06 fransoplo

pip install -r requirements.txt

YuvrajRaghuvanshiS avatar Jun 22 '22 13:06 YuvrajRaghuvanshiS

Hello! I hit the same error on MacOS but I have all requirements satisfied ok:

pip3 install -r requirements.txt
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: packaging in /Users/java/Library/Python/3.8/lib/python/site-packages (from -r requirements.txt (line 1)) (21.3) Requirement already satisfied: psutil in /Users/java/Library/Python/3.8/lib/python/site-packages (from -r requirements.txt (line 2)) (5.9.1) Requirement already satisfied: requests in /Users/java/Library/Python/3.8/lib/python/site-packages (from -r requirements.txt (line 3)) (2.28.1) Requirement already satisfied: termcolor in /Users/java/Library/Python/3.8/lib/python/site-packages (from -r requirements.txt (line 4)) (1.1.0) Requirement already satisfied: tqdm in /Users/java/Library/Python/3.8/lib/python/site-packages (from -r requirements.txt (line 5)) (4.64.0) Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /Users/java/Library/Python/3.8/lib/python/site-packages (from packaging->-r requirements.txt (line 1)) (3.0.9) Requirement already satisfied: certifi>=2017.4.17 in /Users/java/Library/Python/3.8/lib/python/site-packages (from requests->-r requirements.txt (line 3)) (2022.6.15) Requirement already satisfied: idna<4,>=2.5 in /Users/java/Library/Python/3.8/lib/python/site-packages (from requests->-r requirements.txt (line 3)) (3.3) Requirement already satisfied: charset-normalizer<3,>=2 in /Users/java/Library/Python/3.8/lib/python/site-packages (from requests->-r requirements.txt (line 3)) (2.1.0) Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Users/java/Library/Python/3.8/lib/python/site-packages (from requests->-r requirements.txt (line 3)) (1.26.6)

And when I try to run the app:

sudo python3 wa_kdbe.py --allow-reboot

First run: Auto installing python requirements.

WARNING: The directory '/Users/java/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. WARNING: The directory '/Users/java/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Requirement already up-to-date: packaging in /Library/Python/3.8/site-packages (21.3) Requirement already up-to-date: psutil in /Library/Python/3.8/site-packages (5.9.1) Requirement already up-to-date: termcolor in /Library/Python/3.8/site-packages (1.1.0) Requirement already up-to-date: requests in /Library/Python/3.8/site-packages (2.28.1) Requirement already up-to-date: tqdm in /Library/Python/3.8/site-packages (4.64.0) Requirement already satisfied, skipping upgrade: pyparsing!=3.0.5,>=2.0.2 in /Library/Python/3.8/site-packages (from packaging) (3.0.9) Requirement already satisfied, skipping upgrade: charset-normalizer<3,>=2 in /Library/Python/3.8/site-packages (from requests) (2.1.0) Requirement already satisfied, skipping upgrade: urllib3<1.27,>=1.21.1 in /Library/Python/3.8/site-packages (from requests) (1.26.9) Requirement already satisfied, skipping upgrade: idna<4,>=2.5 in /Library/Python/3.8/site-packages (from requests) (3.3) Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /Library/Python/3.8/site-packages (from requests) (2022.6.15) WARNING: You are using pip version 19.2.3, however version 22.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. WARNING: The directory '/Users/java/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. WARNING: The directory '/Users/java/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Requirement already satisfied: termcolor in /Library/Python/3.8/site-packages (1.1.0) WARNING: You are using pip version 19.2.3, however version 22.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. WARNING: The directory '/Users/java/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. WARNING: The directory '/Users/java/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Requirement already satisfied: termcolor in /Library/Python/3.8/site-packages (1.1.0) WARNING: You are using pip version 19.2.3, however version 22.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. WARNING: The directory '/Users/java/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. WARNING: The directory '/Users/java/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Requirement already satisfied: packaging in /Library/Python/3.8/site-packages (21.3) Requirement already satisfied: requests in /Library/Python/3.8/site-packages (2.28.1) Requirement already satisfied: tqdm in /Library/Python/3.8/site-packages (4.64.0) Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /Library/Python/3.8/site-packages (from packaging) (3.0.9) Requirement already satisfied: idna<4,>=2.5 in /Library/Python/3.8/site-packages (from requests) (3.3) Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Library/Python/3.8/site-packages (from requests) (1.26.9) Requirement already satisfied: certifi>=2017.4.17 in /Library/Python/3.8/site-packages (from requests) (2022.6.15) Requirement already satisfied: charset-normalizer<3,>=2 in /Library/Python/3.8/site-packages (from requests) (2.1.0) WARNING: You are using pip version 19.2.3, however version 22.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command.

  • daemon not running; starting now at tcp:5037
  • daemon started successfully Traceback (most recent call last): File "/Users/java/builds/WhatsApp-Key-Database-Extractor/wa_kdbe.py", line 423, in adb_device_serial_id = device_id.init('USB') File "/Users/java/builds/WhatsApp-Key-Database-Extractor/helpers/device_serial_id.py", line 64, in init custom_print( File "/Users/java/builds/WhatsApp-Key-Database-Extractor/helpers/custom_ci.py", line 37, in custom_print cprint(f'{time}{text_to_print}', color, attrs=attr, end=end) NameError: name 'cprint' is not defined

Thanks in advance!

aszerman avatar Jun 30 '22 14:06 aszerman

Trying via TCP same result:

python3 wa_kdbe.py -tip 10.10.xx.xxx -tp 5555 -s -to

First run: Auto installing python requirements.

WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: packaging in /Users/java/Library/Python/3.8/lib/python/site-packages (21.3) Requirement already satisfied: psutil in /Users/java/Library/Python/3.8/lib/python/site-packages (5.9.1) Requirement already satisfied: termcolor in /Users/java/Library/Python/3.8/lib/python/site-packages (1.1.0) Requirement already satisfied: requests in /Users/java/Library/Python/3.8/lib/python/site-packages (2.28.1) Requirement already satisfied: tqdm in /Users/java/Library/Python/3.8/lib/python/site-packages (4.64.0) Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /Users/java/Library/Python/3.8/lib/python/site-packages (from packaging) (3.0.9) Requirement already satisfied: charset-normalizer<3,>=2 in /Users/java/Library/Python/3.8/lib/python/site-packages (from requests) (2.1.0) Requirement already satisfied: certifi>=2017.4.17 in /Users/java/Library/Python/3.8/lib/python/site-packages (from requests) (2022.6.15) Requirement already satisfied: idna<4,>=2.5 in /Users/java/Library/Python/3.8/lib/python/site-packages (from requests) (3.3) Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Users/java/Library/Python/3.8/lib/python/site-packages (from requests) (1.26.6) WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: termcolor in /Users/java/Library/Python/3.8/lib/python/site-packages (1.1.0) WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: termcolor in /Users/java/Library/Python/3.8/lib/python/site-packages (1.1.0) WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: packaging in /Users/java/Library/Python/3.8/lib/python/site-packages (21.3) Requirement already satisfied: requests in /Users/java/Library/Python/3.8/lib/python/site-packages (2.28.1) Requirement already satisfied: tqdm in /Users/java/Library/Python/3.8/lib/python/site-packages (4.64.0) Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /Users/java/Library/Python/3.8/lib/python/site-packages (from packaging) (3.0.9) Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Users/java/Library/Python/3.8/lib/python/site-packages (from requests) (1.26.6) Requirement already satisfied: certifi>=2017.4.17 in /Users/java/Library/Python/3.8/lib/python/site-packages (from requests) (2022.6.15) Requirement already satisfied: charset-normalizer<3,>=2 in /Users/java/Library/Python/3.8/lib/python/site-packages (from requests) (2.1.0) Requirement already satisfied: idna<4,>=2.5 in /Users/java/Library/Python/3.8/lib/python/site-packages (from requests) (3.3)

  • daemon not running; starting now at tcp:5037
  • daemon started successfully Traceback (most recent call last): File "/Users/java/Repositorios/Testing/WhatsApp-Key-Database-Extractor/wa_kdbe.py", line 425, in kill_me() File "/Users/java/Repositorios/Testing/WhatsApp-Key-Database-Extractor/wa_kdbe.py", line 190, in kill_me custom_print('\n', is_get_time=False) File "/Users/java/Repositorios/Testing/WhatsApp-Key-Database-Extractor/helpers/custom_ci.py", line 37, in custom_print cprint(f'{time}{text_to_print}', color, attrs=attr, end=end) NameError: name 'cprint' is not defined

Thanks again!!!

aszerman avatar Jun 30 '22 19:06 aszerman

You can swtich to dev branch and pull code from there, I have changed termcolor to rich. Although that looks very bad still that should work. I am not finding time to refactor this code properly.

YuvrajRaghuvanshiS avatar Jul 01 '22 09:07 YuvrajRaghuvanshiS

Hello! Thanks for reply!

I test it via USB and TCP but both got the same new error:

python3 wa_kdbe.py -ar -s -to

First run: Auto installing python requirements.

WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: packaging in /Users/java/Library/Python/3.8/lib/python/site-packages (21.3) Requirement already satisfied: psutil in /Users/java/Library/Python/3.8/lib/python/site-packages (5.9.1) Requirement already satisfied: rich in /Users/java/Library/Python/3.8/lib/python/site-packages (12.4.4) Requirement already satisfied: requests in /Users/java/Library/Python/3.8/lib/python/site-packages (2.28.1) Requirement already satisfied: tqdm in /Users/java/Library/Python/3.8/lib/python/site-packages (4.64.0) Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /Users/java/Library/Python/3.8/lib/python/site-packages (from packaging) (3.0.9) Requirement already satisfied: pygments<3.0.0,>=2.6.0 in /Users/java/Library/Python/3.8/lib/python/site-packages (from rich) (2.7.4) Requirement already satisfied: typing-extensions<5.0,>=4.0.0 in /Users/java/Library/Python/3.8/lib/python/site-packages (from rich) (4.3.0) Requirement already satisfied: commonmark<0.10.0,>=0.9.0 in /Users/java/Library/Python/3.8/lib/python/site-packages (from rich) (0.9.1) Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Users/java/Library/Python/3.8/lib/python/site-packages (from requests) (1.26.6) Requirement already satisfied: charset-normalizer<3,>=2 in /Users/java/Library/Python/3.8/lib/python/site-packages (from requests) (2.1.0) Requirement already satisfied: idna<4,>=2.5 in /Users/java/Library/Python/3.8/lib/python/site-packages (from requests) (3.3) Requirement already satisfied: certifi>=2017.4.17 in /Users/java/Library/Python/3.8/lib/python/site-packages (from requests) (2022.6.15) WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: rich in /Users/java/Library/Python/3.8/lib/python/site-packages (12.4.4) Requirement already satisfied: commonmark<0.10.0,>=0.9.0 in /Users/java/Library/Python/3.8/lib/python/site-packages (from rich) (0.9.1) Requirement already satisfied: typing-extensions<5.0,>=4.0.0 in /Users/java/Library/Python/3.8/lib/python/site-packages (from rich) (4.3.0) Requirement already satisfied: pygments<3.0.0,>=2.6.0 in /Users/java/Library/Python/3.8/lib/python/site-packages (from rich) (2.7.4) Traceback (most recent call last): File "/Users/java/Repositorios/Testing/WhatsApp-Key-Database-Extractor/wa_kdbe.py", line 29, in import helpers.device_serial_id as device_id File "/Users/java/Repositorios/Testing/WhatsApp-Key-Database-Extractor/helpers/device_serial_id.py", line 5, in from custom_ci import custom_input, custom_print File "/Users/java/Repositorios/Testing/WhatsApp-Key-Database-Extractor/helpers/custom_ci.py", line 15, in console = Console() NameError: name 'Console' is not defined

aszerman avatar Jul 02 '22 22:07 aszerman

Pull and try again.

-------- Original Message -------- On 3 Jul 2022, 4:00 am, aszerman wrote:

Hello! Thanks for reply!

I test it via USB and TCP but both got the same new error:

python3 wa_kdbe.py -ar -s -to

First run: Auto installing python requirements.

WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see pypa/pip#5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: packaging in /Users/java/Library/Python/3.8/lib/python/site-packages (21.3) Requirement already satisfied: psutil in /Users/java/Library/Python/3.8/lib/python/site-packages (5.9.1) Requirement already satisfied: rich in /Users/java/Library/Python/3.8/lib/python/site-packages (12.4.4) Requirement already satisfied: requests in /Users/java/Library/Python/3.8/lib/python/site-packages (2.28.1) Requirement already satisfied: tqdm in /Users/java/Library/Python/3.8/lib/python/site-packages (4.64.0) Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /Users/java/Library/Python/3.8/lib/python/site-packages (from packaging) (3.0.9) Requirement already satisfied: pygments<3.0.0,>=2.6.0 in /Users/java/Library/Python/3.8/lib/python/site-packages (from rich) (2.7.4) Requirement already satisfied: typing-extensions<5.0,>=4.0.0 in /Users/java/Library/Python/3.8/lib/python/site-packages (from rich) (4.3.0) Requirement already satisfied: commonmark<0.10.0,>=0.9.0 in /Users/java/Library/Python/3.8/lib/python/site-packages (from rich) (0.9.1) Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Users/java/Library/Python/3.8/lib/python/site-packages (from requests) (1.26.6) Requirement already satisfied: charset-normalizer<3,>=2 in /Users/java/Library/Python/3.8/lib/python/site-packages (from requests) (2.1.0) Requirement already satisfied: idna<4,>=2.5 in /Users/java/Library/Python/3.8/lib/python/site-packages (from requests) (3.3) Requirement already satisfied: certifi>=2017.4.17 in /Users/java/Library/Python/3.8/lib/python/site-packages (from requests) (2022.6.15) WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see pypa/pip#5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: rich in /Users/java/Library/Python/3.8/lib/python/site-packages (12.4.4) Requirement already satisfied: commonmark<0.10.0,>=0.9.0 in /Users/java/Library/Python/3.8/lib/python/site-packages (from rich) (0.9.1) Requirement already satisfied: typing-extensions<5.0,>=4.0.0 in /Users/java/Library/Python/3.8/lib/python/site-packages (from rich) (4.3.0) Requirement already satisfied: pygments<3.0.0,>=2.6.0 in /Users/java/Library/Python/3.8/lib/python/site-packages (from rich) (2.7.4) Traceback (most recent call last): File "/Users/java/Repositorios/Testing/WhatsApp-Key-Database-Extractor/wa_kdbe.py", line 29, in import helpers.device_serial_id as device_id File "/Users/java/Repositorios/Testing/WhatsApp-Key-Database-Extractor/helpers/device_serial_id.py", line 5, in from custom_ci import custom_input, custom_print File "/Users/java/Repositorios/Testing/WhatsApp-Key-Database-Extractor/helpers/custom_ci.py", line 15, in console = Console() NameError: name 'Console' is not defined

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

YuvrajRaghuvanshiS avatar Jul 03 '22 02:07 YuvrajRaghuvanshiS