文字消息设置圆角

This commit is contained in:
shuaikangzhou
2023-11-20 19:08:11 +08:00
parent 7dbfc46e14
commit fe859ff2f7
6 changed files with 79 additions and 131 deletions

View File

@@ -5,6 +5,8 @@ from typing import Union, List
from Cryptodome.Cipher import AES
from app.log import log
# from Crypto.Cipher import AES # 如果上面的导入失败,可以尝试使用这个
SQLITE_FILE_HEADER = "SQLite format 3\x00" # SQLite文件头
@@ -15,6 +17,7 @@ DEFAULT_ITER = 64000
# 通过密钥解密数据库
@log
def decrypt(key: str, db_path, out_path):
if not os.path.exists(db_path):
return f"[-] db_path:'{db_path}' File not found!"
@@ -55,6 +58,7 @@ def decrypt(key: str, db_path, out_path):
return [True, db_path, out_path, key]
@log
def batch_decrypt(key: str, db_path: Union[str, List[str]], out_path: str):
if not isinstance(key, str) or not isinstance(out_path, str) or not os.path.exists(out_path) or len(key) != 64:
return f"[-] (key:'{key}' or out_path:'{out_path}') Error!"

View File

@@ -19,6 +19,7 @@ void_p = ctypes.c_void_p
# 读取内存中的字符串(非key部分)
@log
def get_info_without_key(h_process, address, n_size=64):
array = ctypes.create_string_buffer(n_size)
if ReadProcessMemory(h_process, void_p(address), array, n_size, 0) == 0: return "None"
@@ -27,6 +28,7 @@ def get_info_without_key(h_process, address, n_size=64):
return text.strip() if text.strip() != "" else "None"
@log
def get_info_wxid(h_process, n_size=64):
pm = pymem.Pymem("WeChat.exe")
addrs = pymem.pattern.pattern_scan_all(pm.process_handle, b'wxid_', return_multiple=True)
@@ -39,6 +41,7 @@ def get_info_wxid(h_process, n_size=64):
# 读取内存中的key
@log
def get_key(h_process, address, address_len=8):
array = ctypes.create_string_buffer(address_len)
if ReadProcessMemory(h_process, void_p(address), array, address_len, 0) == 0: return "None"
@@ -50,6 +53,7 @@ def get_key(h_process, address, address_len=8):
# 读取微信信息(account,mobile,name,mail,wxid,key)
@log
def read_info(version_list, is_logging=False):
wechat_process = []
result = []