Files
notiMessage/scripts/_tng_proc_scan.sh
mars 609635aba1 chore: 备份 TNG 注册/captcha 逆向与 MariBank SG bypass 进展
TngRootBypassHook 增强 captcha 诊断、TigerTally/JNIC 分层与 HWUI 策略;新增逆向脚本、Frida 工具与 UI dump;同步 MariBank SG hook 与 tng_exit_guard 更新。
2026-08-03 15:23:02 +08:00

47 lines
1.6 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/system/bin/sh
# TNG eWallet — 启动期 /proc 扫描:定位阻塞在 read 的 TigerTally 线程及其 fd 目标。
# 用法: adb shell su -c 'sh /data/local/tmp/_tng_proc_scan.sh [loop_seconds]'
PKG="my.com.tngdigital.ewallet"
LOOP="${1:-1}" # 持续扫描秒数(默认 1 秒抓一次快照)
# 选主进程cmdline 恰为包名,排除 :tools / :goacqowmmt 等子进程)
main_pid=""
for p in $(pidof "$PKG"); do
if [ "$(tr '\0' ' ' < /proc/$p/cmdline 2>/dev/null | tr -d ' ')" = "$PKG" ]; then
main_pid="$p"
break
fi
done
[ -z "$main_pid" ] && { echo "NO-MAIN-PROC pidof=$(pidof $PKG)"; exit 1; }
echo "=== main pid=$main_pid ==="
i=0
while [ $i -lt "$LOOP" ]; do
i=$((i+1))
echo "--- scan #$i ---"
# 1) 所有可疑线程的状态
for tid in $(ls /proc/$main_pid/task 2>/dev/null); do
comm=$(cat /proc/$main_pid/task/$tid/comm 2>/dev/null)
case "$comm" in
*pool*|*location*|*tally*|*Tiger*|*tiger*)
syscall=$(cat /proc/$main_pid/task/$tid/syscall 2>/dev/null)
wchan=$(cat /proc/$main_pid/task/$tid/wchan 2>/dev/null)
stat=$(cat /proc/$main_pid/task/$tid/stat 2>/dev/null | awk '{print $3}')
echo "TID=$tid comm=$comm state=$stat syscall=[$syscall] wchan=$wchan"
;;
esac
done
# 2) 所有管道/套接字 fdTigerTally 握手候选)
for fd in /proc/$main_pid/fd/*; do
tgt=$(readlink "$fd" 2>/dev/null)
case "$tgt" in
*pipe:*|*socket:*|*anon_inode:*)
echo "FD=$(basename $fd) -> $tgt"
;;
esac
done
[ $i -lt "$LOOP" ] && sleep 1
done
echo "=== done ==="