noobpk / frida-ios-hook

A tool that helps you easy trace classes, functions, and modify the return values of methods on iOS platform
MIT License
916 stars 154 forks source link

Add option for attach by PID #114

Open FrancYescO opened 8 months ago

FrancYescO commented 8 months ago

IDK Exactly why but attaching to an app is failing with

[x_x] Unable to find process with name MyApp. You need run app first.!!

just as fast fix, i've edited the all .attach method in hook.py file with hardcoded PID got via frida-ps -U and is working so seems, having an option to attach by PID (or get the PID via frida-ps -U as fallback?) can be useful

PS. also frida-trace -U -f net.myapp will crash with

Failed to attach: process with pid 7781 either refused to load frida-agent, or terminated during injection

so it's a more general frida issue