# -*- coding: utf-8 -*-
import re
import zipfile

APK = r"C:\Users\Administrator\Desktop\notiMessage\reverse\apks\seabank_ph_base.apk"
with zipfile.ZipFile(APK) as zf:
    for name in zf.namelist():
        if not name.endswith(".dex"):
            continue
        data = zf.read(name)
        if b"WBRootDetectionModule" not in data:
            continue
        print("===", name, "===")
        for m in re.finditer(rb"Lcom/shopee/[a-zA-Z0-9_$/]+;", data):
            s = m.group().decode()[1:-1].replace("/", ".")
            if "Root" in s or "Detect" in s or "Emulator" in s or "Safe" in s or "Risk" in s or "WB" in s:
                print(s)
