YuvrajRaghuvanshiS / WhatsApp-Key-Database-Extractor

The most advanced and complete solution for extracting WhatsApp key/DB from package directory (/data/data/com.whatsapp) without root access.
MIT License
463 stars 59 forks source link

IndentationError: unexpected unindent #17

Closed byRoadrunner closed 3 years ago

byRoadrunner commented 3 years ago

Describe the bug When running the script the following error appears, all dependencies are installed. I also tried it on a seperate device.

To Reproduce Steps to reproduce the behavior:

  1. run 'python wa_kdbe.py'
  2. See error (i removed the full path of the script file, should not be relevant for this bug)

Expected behavior Run the script to run without errors.

Screenshots Not needed

Terminal output Traceback (most recent call last): File "wa_kdbe.py", line 10, in <module> from view_extract import ExtractAB File "view_extract.py", line 140 if __name__ == "__main__": ^ IndentationError: unexpected unindent

Desktop:

Smartphone:

YuvrajRaghuvanshiS commented 3 years ago

I added some features this morning and able to reproduce this on my machine. Fixing it now.

YuvrajRaghuvanshiS commented 3 years ago

Try a git pull origin and re-run wa_kdbe.py

byRoadrunner commented 3 years ago

Now the script executes but I only receive the following output:

Exiting...

But if I check with adb devices my device shows up as attached device. And yes, I enabled USB Debugging in dev settings.

YuvrajRaghuvanshiS commented 3 years ago

Find and kill adb.exe from task manager.

byRoadrunner commented 3 years ago

It seems your adb binary is not working in my case. If I use adb (installed on my system) i get a correct list of my devices. But if I use your provided binary the list is empty.

YuvrajRaghuvanshiS commented 3 years ago

Then you may do this. Copy your adb executable to Whatsapp-Key-Database-Extractor\bin folder and then continue, make sure name of file is adb.exe after getting copied.

YuvrajRaghuvanshiS commented 3 years ago

try now with git pull origin

byRoadrunner commented 3 years ago

Thank you. Now it is working. What exactly should I enter if it asks me for reference name for my user?

YuvrajRaghuvanshiS commented 3 years ago

Your name, default is 'user' that is just to put everything inside 'extracted\user' folder.

byRoadrunner commented 3 years ago

Okay, because when I tried with name: Joschua I got this message: Successfully 'fluffed' tmp/whatsapp.ab tmp/whatsapp.tar [WinError 3] Das System kann den angegebenen Pfad nicht finden: 'extracted/Joschua'

YuvrajRaghuvanshiS commented 3 years ago

Can you re-run and send me entire console output?

byRoadrunner commented 3 years ago

`Found Java installed on system.

Please read above instructions carefully ↑ . Continue? (default y) : Connected to ONEPLUS A6013 WhatsApp V2.21.1.16 installed on device Found legacy WhatsApp V2.11.431 apk in helpers/ folder Backing up WhatsApp 2.21.1.16 apk, the one installed on device to tmp/WhatsAppbackup.apk Folder tmp/ already exists. /data/app/com.whatsapp-sc4MjcOPe6wwlgcgf57CjQ==/base.apk: ...le pulled, 0 skipped. 32.8 MB/s (31604309 bytes in 0.920s) Apk backup complete. Uninstalling WhatsApp, skipping data. Success Uninstalled. Installing legacy WhatsApp V2.11.431, hold tight now. Performing Streamed Install Success Installation Complete. Backing up WhatsApp data as tmp/whatsapp.ab. May take time, don't panic. WARNING: adb backup is deprecated and may be removed in a future release Now unlock your device and confirm the backup operation... Done backing up data. Reinstallting original WhatsApp. Performing Streamed Install Success

Our work with device has finished, it is safe to remove it now.

Found whatsapp.ab in tmp folder. Continuing Enter a reference name for this user. : Joschua Enter same password which you entered on device when prompted earlier. : redacted Successfully 'fluffed' tmp/whatsapp.ab tmp/whatsapp.tar [WinError 3] Das System kann den angegebenen Pfad nicht finden: 'extracted/Joschua'`

Also I have the problem that if I try to start WhatsApp after running the script it instantly crashes (Version 2.21.1.16) the only way working is deleting the user data of WhatsApp and then restoring the local backup.

YuvrajRaghuvanshiS commented 3 years ago

Also I have the problem that if I try to start WhatsApp after running the script it instantly crashes (Version 2.21.1.16) the only way working is deleting the user data of WhatsApp and then restoring the local backup.

Yes sometimes this happens.

Successfully 'fluffed' tmp/whatsapp.ab tmp/whatsapp.tar

After this it should create 'extracted/Joschua' but for some reason it does not.

image

image

Try this. Create a 'Joschua' folder inside 'extracted' folder so that the path 'extracted/Joschua' becomes available Also tell me this, how long does the process of creating backup take after you enter password on phone.

byRoadrunner commented 3 years ago

Should i create the extracted folder in the repo root? Because at the moment there is no extracted folder.

YuvrajRaghuvanshiS commented 3 years ago

Yes folder structure should be like this

image

byRoadrunner commented 3 years ago

Okay, thank you. Now it works. The issue with WhatsApp crashing still persists. It took arround 30 seconds to take the backup.

YuvrajRaghuvanshiS commented 3 years ago

The issue with WhatsApp crashing still persists

This happens because of some data structure differences b/w latest and old version, or something like this. That's the reason for banner warning to take backup.

It took arround 30 seconds to take the backup

This means backup creation went just fine. On some devices it does not get created in the first place.

Can you see msgstore.db ?

byRoadrunner commented 3 years ago

Can you see msgstore.db ?

Yes I can see it. The size is 250 MB.

YuvrajRaghuvanshiS commented 3 years ago

Glad it all worked out.