From 09503069b7c52361629e7b5358b2b32be17dea77 Mon Sep 17 00:00:00 2001 From: KnugiHK <24708955+KnugiHK@users.noreply.github.com> Date: Tue, 8 Apr 2025 22:35:16 +0800 Subject: [PATCH] Fix name 'exit' is not defined (#107) --- Whatsapp_Chat_Exporter/android_crypt.py | 1 + Whatsapp_Chat_Exporter/ios_media_handler.py | 3 ++- scripts/bruteforce_crypt15.py | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Whatsapp_Chat_Exporter/android_crypt.py b/Whatsapp_Chat_Exporter/android_crypt.py index 2f764dd..84e629e 100644 --- a/Whatsapp_Chat_Exporter/android_crypt.py +++ b/Whatsapp_Chat_Exporter/android_crypt.py @@ -4,6 +4,7 @@ import zlib import concurrent.futures from typing import Tuple, Union from hashlib import sha256 +from sys import exit from Whatsapp_Chat_Exporter.utility import CRYPT14_OFFSETS, Crypt, DbType try: diff --git a/Whatsapp_Chat_Exporter/ios_media_handler.py b/Whatsapp_Chat_Exporter/ios_media_handler.py index 1ab6796..a1dcd30 100644 --- a/Whatsapp_Chat_Exporter/ios_media_handler.py +++ b/Whatsapp_Chat_Exporter/ios_media_handler.py @@ -4,6 +4,7 @@ import shutil import sqlite3 import os import getpass +from sys import exit from Whatsapp_Chat_Exporter.utility import WhatsAppIdentifier from Whatsapp_Chat_Exporter.bplist import BPListReader try: @@ -151,7 +152,7 @@ class BackupExtractor: "Perhapse you enabled end-to-end encryption for the backup? " "See https://wts.knugi.dev/docs.html?dest=iose2e" ) - exit() + exit(1) else: shutil.copyfile(wts_db_path, self.identifiers.MESSAGE) diff --git a/scripts/bruteforce_crypt15.py b/scripts/bruteforce_crypt15.py index 56cf912..852176c 100644 --- a/scripts/bruteforce_crypt15.py +++ b/scripts/bruteforce_crypt15.py @@ -3,6 +3,7 @@ import javaobj import zlib from Crypto.Cipher import AES from hashlib import sha256 +from sys import exit def _generate_hmac_of_hmac(key_stream):