-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom hooks causing traced app to crash #34
Comments
I'm not 100% sure but I'm guessing your hook to Another theory is it may not be hooking the right class name. I experienced a crash when I was hooking Can you share any crash/exception logs? Additionally, you don't need |
Also, I am not sure how to hook variadic functions. This may not be an Introspy problem but a theos limitation like #32. |
@radj Thanks for the tip! A couple of things:
Now I just need to figure out how I can do variadic parameters. |
I created a demo iOS app. Pretty much the only thing it does is call |
Closing this and opening a more relevant issue (#35) |
I want to find an important key in an app , so the only way , that I know is make a hook on nsstringwithformat method , but it's not working! so do you have any idea to find that key ? |
@KiranPanesar how can I make a hook on nsstringwithformat ? |
I've created a custom hook to trace
NSString
's+stringWithFormat
method. Seeing as there is no README or wiki post on how to do this, I followed the UIPasteboard hook. Here are the steps I have taken:NSStringHooks.xm
in the/hooks
directory. That file looks like this.PlistObjectConverter
to convert NSString data. Those files look like this. Line 527 is the beginning of the implementation of+convertNSString:
.NSStringHooks
toTweak.xmi
. That file looks like this. Line 159 is where I am initialising theNSStringHooks
group.When I run
make package
in the /src directory, adeb
file is successfully created. I can SFTP that to my device and successfully rundpkg -i introspy.deb
to install the custom build onto my device. But when I open an app for which I have enabled tracing, it crashes on launch.Troubleshooting
NSStringHooks
tweak altogether, built it usingmake package
and then installed it. That works fine. No crashes when launching a traced app.NSStringHooks
back in (using the above steps), except I removed all tracing logic from NSStringHooks.xm. So all it was doing was intercepting the call and then passing it straight to the original method. This still causes a crash on the device.I feel like I am missing a step, because I can't get my custom trace's toggle to show up under the Introspy Settings. The
Introspy2.plist
files seem to be generated by themake
routine, so any changes I make there to add a toggle are overwritten.Can any contributors see what I am missing in my setup of a custom hook?
Once I've got all this figured out, I'll create a concise list of steps and add it to the README/Wiki.
The text was updated successfully, but these errors were encountered: