新增 MariBank/SeaBank PH Root 与 SHPSSDK bypass、riskToken 净化及 Up/Suncorp/ubank 消息 Hook;整理 reverse/ 脚本与 Frida 工具链,并补充当日工作说明文档。
39 lines
1.6 KiB
Python
39 lines
1.6 KiB
Python
# -*- coding: utf-8 -*-
|
|
import subprocess
|
|
import zipfile
|
|
from pathlib import Path
|
|
|
|
APK = Path(__file__).resolve().parent.parent / "apks" / "seabank_ph_base.apk"
|
|
DEXDUMP = Path(r"C:\Users\Administrator\AppData\Local\Android\Sdk\build-tools\37.0.0\dexdump.exe")
|
|
targets = [
|
|
"Lcom/shopee/bke/biz/user/viewmodel/PhoneNumViewModel;",
|
|
"Lcom/shopee/bke/biz/user/viewmodel/RegisterViewModel;",
|
|
]
|
|
|
|
with zipfile.ZipFile(str(APK)) as zf:
|
|
for name in zf.namelist():
|
|
if not name.endswith(".dex"):
|
|
continue
|
|
data = zf.read(name)
|
|
if b"PhoneNumViewModel" not in data and b"RegisterViewModel" not in data:
|
|
continue
|
|
tmp = Path(__file__).resolve().parent.parent / "tmp" / "tmp_user.dex"
|
|
tmp.write_bytes(data)
|
|
out = subprocess.check_output(
|
|
[str(DEXDUMP), "-d", str(tmp)], universal_newlines=True, errors="replace"
|
|
)
|
|
for target in targets:
|
|
if target.replace("L", "").replace(";", "") not in data.decode("latin1", errors="ignore"):
|
|
continue
|
|
print("=" * 60, name, target)
|
|
cap = False
|
|
for line in out.splitlines():
|
|
if f"Class descriptor : '{target}'" in line:
|
|
cap = True
|
|
elif cap and line.startswith(" Class descriptor") and target not in line:
|
|
break
|
|
if cap and ("name :" in line or "type :" in line
|
|
or "Method" in line or "register" in line.lower()):
|
|
safe = line.strip().encode("ascii", "replace").decode()
|
|
print(safe)
|