chore: 清理临时逆向脚本,保留 TNG 安装工具与 captcha 文档
删除未跟踪的一次性 _*.py 扫描脚本,并从仓库移除已过时辅助脚本。
This commit is contained in:
35
scripts/install-tng-xapk.ps1
Normal file
35
scripts/install-tng-xapk.ps1
Normal file
@@ -0,0 +1,35 @@
|
||||
# 解压 XAPK 并通过 adb install-multiple 安装 TNG
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$XapkPath
|
||||
)
|
||||
$ErrorActionPreference = "Stop"
|
||||
$adb = "C:\Users\Administrator\AppData\Local\Android\Sdk\platform-tools\adb.exe"
|
||||
|
||||
if (-not (Test-Path $XapkPath)) {
|
||||
Write-Host "文件不存在: $XapkPath" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
$extractDir = Join-Path ([IO.Path]::GetDirectoryName($XapkPath)) "tng_xapk_extracted"
|
||||
if (Test-Path $extractDir) { Remove-Item $extractDir -Recurse -Force }
|
||||
New-Item -ItemType Directory -Path $extractDir | Out-Null
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory((Resolve-Path $XapkPath), $extractDir)
|
||||
|
||||
$apks = Get-ChildItem $extractDir -Filter "*.apk" -Recurse | Sort-Object Name
|
||||
if ($apks.Count -eq 0) {
|
||||
Write-Host "XAPK 内未找到 apk 文件" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "找到 $($apks.Count) 个 APK,开始安装..." -ForegroundColor Cyan
|
||||
$apkArgs = @("install-multiple", "-r") + ($apks | ForEach-Object { $_.FullName })
|
||||
& $adb @apkArgs
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Write-Host "TNG 安装成功" -ForegroundColor Green
|
||||
& $adb shell monkey -p my.com.tngdigital.ewallet -c android.intent.category.LAUNCHER 1
|
||||
} else {
|
||||
Write-Host "安装失败,exit=$LASTEXITCODE" -ForegroundColor Red
|
||||
}
|
||||
32
scripts/pull-tng-apk.ps1
Normal file
32
scripts/pull-tng-apk.ps1
Normal file
@@ -0,0 +1,32 @@
|
||||
# 从已安装 TNG 的手机 pull 完整 split APK,供另一台 adb install-multiple
|
||||
$ErrorActionPreference = "Stop"
|
||||
$adb = "C:\Users\Administrator\AppData\Local\Android\Sdk\platform-tools\adb.exe"
|
||||
$pkg = "my.com.tngdigital.ewallet"
|
||||
$outDir = Join-Path (Split-Path -Parent $PSScriptRoot) "reverse\dumps\tng_splits"
|
||||
|
||||
$paths = & $adb shell pm path $pkg 2>$null
|
||||
if (-not $paths) {
|
||||
Write-Host "设备未安装 $pkg" -ForegroundColor Red
|
||||
Write-Host "请先在已装 TNG 的手机(如 Pixel 6)上 USB 调试连接。"
|
||||
exit 1
|
||||
}
|
||||
|
||||
New-Item -ItemType Directory -Force -Path $outDir | Out-Null
|
||||
Remove-Item "$outDir\*.apk" -Force -ErrorAction SilentlyContinue
|
||||
|
||||
$i = 0
|
||||
foreach ($line in $paths) {
|
||||
if ($line -match "package:(.+)") {
|
||||
$remote = $Matches[1].Trim()
|
||||
$name = Split-Path $remote -Leaf
|
||||
if ($name -eq "base.apk") { $local = Join-Path $outDir "base.apk" }
|
||||
else { $local = Join-Path $outDir $name }
|
||||
Write-Host "Pull $remote -> $local"
|
||||
& $adb pull $remote $local
|
||||
$i++
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "`n已 pull $i 个 APK 到 $outDir" -ForegroundColor Green
|
||||
Write-Host "安装到另一台手机:"
|
||||
Write-Host " adb install-multiple -r $outDir\*.apk"
|
||||
Reference in New Issue
Block a user