ios_system
ios_system copied to clipboard
Scan dynamic libraries for functions without opening them
Currently, all functions are loaded at startup time in an NSDictionary
, or later added to the dictionary using replaceCommand
. In order to be executed a function must be both:
- in this dictionary,
- in a dynamic library, that is signed and embedded in the application.
It would be good to also scan unknown embedded libraries for functions that can be used. This must be done without dlopen
-ing the library, as it would defeat the purpose (dlclose
does not always release the dynamic library).
Something like: nm unknown.dylib | grep _main$
should extract the name of the functions, if it works on a signed library (and if I can find the source of nm
).
This won't work on the AppStore, obviously. But I now have a working nm
.