feat: add Zalo database extraction and schema analysis script using ADB
This commit is contained in:
@@ -8,7 +8,7 @@ logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(
|
|||||||
|
|
||||||
def run_adb_command(command: str):
|
def run_adb_command(command: str):
|
||||||
"""Chạy lệnh ADB shell và trả về kết quả"""
|
"""Chạy lệnh ADB shell và trả về kết quả"""
|
||||||
full_cmd = f"adb -s 10.160.138.2:5555 shell {command}"
|
full_cmd = f"adb -s 192.168.1.193:5555 shell {command}"
|
||||||
try:
|
try:
|
||||||
result = subprocess.run(full_cmd, shell=True, check=True, capture_output=True, text=True)
|
result = subprocess.run(full_cmd, shell=True, check=True, capture_output=True, text=True)
|
||||||
return result.stdout.strip()
|
return result.stdout.strip()
|
||||||
@@ -21,7 +21,7 @@ def run_adb_command(command: str):
|
|||||||
def analyze_zalo():
|
def analyze_zalo():
|
||||||
logging.info("BẮT ĐẦU TRÍCH XUẤT DATABASE ZALO (PULL VỀ SERVER)")
|
logging.info("BẮT ĐẦU TRÍCH XUẤT DATABASE ZALO (PULL VỀ SERVER)")
|
||||||
# Đảm bảo kết nối
|
# Đảm bảo kết nối
|
||||||
subprocess.run("adb connect 10.160.138.2:5555", shell=True, capture_output=True)
|
subprocess.run("adb connect 192.168.1.193:5555", shell=True, capture_output=True)
|
||||||
|
|
||||||
# Tạo thư mục chứa db
|
# Tạo thư mục chứa db
|
||||||
os.makedirs("zalo_dbs", exist_ok=True)
|
os.makedirs("zalo_dbs", exist_ok=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user