# -*- 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 sorted(zf.namelist()):
        if not name.endswith(".dex"):
            continue
        data = zf.read(name)
        found = set()
        for m in re.finditer(rb"L[a-zA-Z0-9_$/]+;", data):
            s = m.group().decode()[1:-1].replace("/", ".")
            low = s.lower()
            if any(k in low for k in ("rootdetect", "emulatordetect", "safemode", "risk", "integrity", "xposed", "hookdetect")):
                found.add(s)
            if "WBRoot" in s or "WBEmulator" in s:
                found.add(s)
        if found:
            print("=== %s ===" % name)
            for s in sorted(found):
                print(s)
