fixed issues with CA now generates its own new cert
All checks were successful
release / build-and-upload (push) Successful in 16m53s

This commit is contained in:
404errordeveloper 2026-10-08 20:16:08 +02:00
parent a930a697fa
commit c1948a1439
11 changed files with 458 additions and 34 deletions

View file

@ -76,6 +76,11 @@ func RunPassive(opt Options) (res Result, err error) {
}
proxyBin, caHash := resolveProxy(nil, root)
if h, err := proxy.InstallCA(c, "", false); err != nil {
return res, fmt.Errorf("CA: %w", err)
} else if h != "" {
caHash = h
}
if err := proxy.PushAndStart(c, proxyBin); err != nil {
return res, err
}
@ -201,32 +206,37 @@ func Run(opt Options) (res Result, err error) {
if useTProxy {
// Transparent REDIRECT — keeps phone VPN (BBC UK geo) working.
// StartTransparent creates a per-install CA under data/ if needed and pushes cert+key.
proxy.ClearHTTPProxy(c)
remoteDir := "/data/local/tmp/capture/" + a.Package()
if err := proxy.StartTransparent(c, proxyBin, a.Package(), "8080", remoteDir, false); err != nil {
return res, err
return res, fmt.Errorf("transparent MITM start: %w", err)
}
defer proxy.StopTransparent(c)
hints.RemoteCaps = []string{remoteDir + "/cap.json"}
hints.RemoteLog = remoteDir + "/appproxy.log"
fmt.Println("[*] Transparent MITM (VPN OK) — package", a.Package())
} else {
if h, err := proxy.InstallCA(c, "", false); err != nil {
return res, fmt.Errorf("CA: %w", err)
} else if h != "" {
caHash = h
}
if err := proxy.PushAndStart(c, proxyBin, hints.Score.ProxyArgs()...); err != nil {
return res, err
return res, fmt.Errorf("proxy start: %w", err)
}
if err := proxy.EnsureHTTPProxy(c, ""); err != nil {
return res, err
return res, fmt.Errorf("http_proxy: %w", err)
}
proxy.ReinjectCA(c, caHash)
}
if err := a.Launch(c); err != nil {
fmt.Fprintf(os.Stderr, "[!] launch: %v\n", err)
return res, fmt.Errorf("launch: %w", err)
}
if !opt.NoAutoPlay {
if err := a.AutoPlay(c, opt.Channel); err != nil {
fmt.Fprintf(os.Stderr, "[!] auto-play failed: %v\n", err)
fmt.Println("[*] Open the channel on the phone manually and start playback…")
return res, fmt.Errorf("auto-play: %w", err)
}
} else {
fmt.Println("[*] Open the channel on the phone and wait for playback…")