Thursday, 5 September 2013

iOS jailbreak get object based on class name

iOS jailbreak get object based on class name

I have a dylib which has a object of class "mConWifi". I have the main app
which loads this dylib and executes following code
Class klass = objc_getClass("mConWifi");
SEL sel = sel_getUid("ListAllWifi:");
if ( [klass respondsToSelector:sel] )
objc_msgSend(klass, sel);
When above code is called, object of class mConWifi is already created in
Memory.
My objective is to get object based on class name and then invoke a
method. With above code I am not able to as respondsToSelector fails. I
have already tried "ListAllWifi" and "ListAllWifi:"
Any ideas how to get object of a class based on class name?
Thanks in advance.

No comments:

Post a Comment