Skip to content

Commit 5d87ac1

Browse files
🟠🟠 #94: Added support for crypt15/E2E encrypted backups.
Not fully tested, paths for these new files may not be exact.
1 parent ca1c7f2 commit 5d87ac1

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

non_essentials/DATE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10/03/2022
1+
21/04/2022

view_extract.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,15 @@ def taking_out_main_files(username):
222222
try:
223223
tar = tarfile.open(f'{tmp}whatsapp.tar')
224224
all_tar_files = tar.getnames()
225-
files_to_extract = {'key': 'apps/com.whatsapp/f/key',
226-
'msgstore.db': 'apps/com.whatsapp/db/msgstore.db',
227-
'wa.db': 'apps/com.whatsapp/db/wa.db',
228-
'axolotl.db': 'apps/com.whatsapp/db/axolotl.db',
229-
'chatsettings.db': 'apps/com.whatsapp/db/chatsettings.db'}
225+
files_to_extract = {
226+
'axolotl.db': 'apps/com.whatsapp/db/axolotl.db',
227+
'encrypted_backup.key': 'apps/com.whatsapp/f/encrypted_backup.key',
228+
'password_data.key': 'apps/com.whatsapp/f/password_data.key',
229+
'chatsettings.db': 'apps/com.whatsapp/db/chatsettings.db',
230+
'key': 'apps/com.whatsapp/f/key',
231+
'msgstore.db': 'apps/com.whatsapp/db/msgstore.db',
232+
'wa.db': 'apps/com.whatsapp/db/wa.db',
233+
}
230234

231235
for key in files_to_extract:
232236
if(files_to_extract[key] in all_tar_files):
@@ -235,8 +239,12 @@ def taking_out_main_files(username):
235239
f'{tmp}{files_to_extract[key]}', f'{extracted}{username}/{key}')
236240
custom_print(f'Copied to \"{extracted}{username}\": {key}')
237241
else:
238-
custom_print(
239-
f'\"{key}\" is not present in tarfile, visit \"https://github.com/YuvrajRaghuvanshiS/WhatsApp-Key-Database-Extractor/issues/73\" for more details.', 'red', ['bold'])
242+
if key in ['encrypted_backup.key', 'password_data.key']:
243+
custom_print(
244+
f'\"{key}\" is not present in tarfile, if you have crypt15 backups then visit \"https://github.com/YuvrajRaghuvanshiS/WhatsApp-Key-Database-Extractor/issues/94\" for more details.', 'red', ['bold'])
245+
else:
246+
custom_print(
247+
f'\"{key}\" is not present in tarfile, visit \"https://github.com/YuvrajRaghuvanshiS/WhatsApp-Key-Database-Extractor/issues/73\" for more details.', 'red', ['bold'])
240248
tar.close()
241249
time.sleep(2) # So that 'tar' is free to delete.
242250
try:

wa_kdbe.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def main():
7878
if(is_read_instructions.upper() == 'Y'):
7979
custom_print('\n', is_get_time=False)
8080
custom_input(
81-
'\aIf you haven\'t already, it is adviced to take a WhatsApp chat backup by going to \"WhatsApp settings \u2192 Chat Settings \u2192 Chat Backup". Hit \"Enter\" key to continue.', 'yellow')
81+
'\aIf you haven\'t already, it is advised to take a WhatsApp chat backup by going to \"WhatsApp settings \u2192 Chat Settings \u2192 Chat Backup". Hit \"Enter\" key to continue.', 'yellow')
8282
usb_mode()
8383
else:
8484
kill_me()
@@ -416,7 +416,6 @@ def usb_mode():
416416
parser.add_argument('-to', '--tar-only', action='store_true',
417417
help='Get entire WhatsApp\'s data in \"<username>.tar\" file instead of just getting few important files.')
418418
args = parser.parse_args()
419-
# args = parser.parse_args('--tcp-ip 192.168.43.130 --scrcpy'.split())
420419

421420
is_allowed_reboot = args.allow_reboot
422421
tcp_ip = args.tcp_ip

0 commit comments

Comments
 (0)