I have asked this on several forums and just trying my luck here incase anyone came across this. I have an application and I used class dump on it to get the header files. I found out the method that I need to swap and swap it successfully. That method is called:
now what is BIInstantMessage? It a struct which is defined as:
I am interested in _field2, because I want some sort of message so I am guessing it resides in _field2, so what is CFString? It's defined as:
Now, I know that CFStringRef is defined as
so my guess is it is stored in mCFRef. so, this is what i do to try to access this CFStringRef called mCFRef:
Now, whenever I do anything to s, i get an EXC BAD ACCESS. So my guess was its probably the _vptr$CFObject. So i dereferenced it, and casted it to CFStringRef and still, i get an EXC BAD ACCESS.
Any suggestions/tips are welcome. I have been at this for the past 12 hours. Thanks!
Code:
- (void)ReceiveMessageInjected:(const struct BInstantMessage *)arg1
now what is BIInstantMessage? It a struct which is defined as:
Code:
struct BInstantMessage {
struct CFString _field2;
unsigned short *_field3;
struct BChat *_field6;
struct BUser *_field5;
};
I am interested in _field2, because I want some sort of message so I am guessing it resides in _field2, so what is CFString? It's defined as:
Code:
struct CFString {
void **_vptr$CFObject;
struct __CFString *mCFRef;
_Bool mIsMutable;
};
Now, I know that CFStringRef is defined as
Code:
struct __CFString *const
Code:
CFStringRef s = (arg1->_field2).mCFRef;
Now, whenever I do anything to s, i get an EXC BAD ACCESS. So my guess was its probably the _vptr$CFObject. So i dereferenced it, and casted it to CFStringRef and still, i get an EXC BAD ACCESS.
Any suggestions/tips are welcome. I have been at this for the past 12 hours. Thanks!