Skip to content

Instantly share code, notes, and snippets.

View salgueiroso's full-sized avatar

Acacio Salgueiro salgueiroso

View GitHub Profile
@moonblade
moonblade / burn.py
Last active January 11, 2024 13:29
A python tool to burn iso files to usb disks through interactive menu
#!/usr/bin/env python3
import os
import sys
from glob import iglob
from subprocess import Popen, PIPE
import time
import signal
from decimal import Decimal, localcontext, ROUND_DOWN
@xnumad
xnumad / whatsapp-backup.md
Created October 22, 2019 22:45
WhatsApp message backup and restore process

If you activate WhatsApp (verifying your phone number) while having a /sdcard/WhatsApp/Databases/msgstore.db.crypt12 file present AND have a WhatsApp backup on Google Drive, WhatsApp will claim to restore your Google Drive backup (with your consent), but it only restores the media files from Google Drive but at no occassion the msgstore.db.crypt12. It won't merge your local backup and the cloud backup databases!

With local WhatsApp media files it will only offer to restore the local backup at activation but not the one from Google Drive, hence the need for an empty /sdcard/WhatsApp/Media/ folder. But with a local chat backup, the Google Drive backup restore process just imports media only anyways.

Ways to get to the key file to decrypt the *.crypt12 DBs:

  • either access /data/data/com.whatsapp/files/key with root permissions
  • OR adb backup com.whatsapp and extract the key from the .ab file

I have extracted the key and found out that it's the same for all my devices (*I always tested wi