Hello, I'm currently trying to hook into a specific header I got from class-dump for instagram.
Header file is https://pastebin.com/Ck1L8MSU
@interface logTool: NSObject
+ (void)logDataFromNSString: (NSString *)logContent;
@end
@implementation logTool
+ (void)logDataFromNSString: (NSString *)logContent
{
NSFileHandle *file;
NSData *data;
file = [NSFileHandle fileHandleForUpdatingAtPath: @"/tmp/filelog.txt"];
[file seekToEndOfFile];
logContent = [logContent stringByAppendingString:@"\n------------\n"];
data = [logContent dataUsingEncoding:NSUTF8StringEncoding];
[file writeData: data];
[file closeFile];
}
@end
%hook IGAPIRequestBuilder
+ (id)builderWithHTTPMethod:(unsigned long long)arg1 format:(id)arg2 {
id ret = %orig;
return ret;
}
%end
When I use some other functions aside from builderWithHTTPMethod; it seems to be working. That one specific header is crashing and I have no idea why.
Here's my crash report. https://pastebin.com/Y2NpT4n3