Skip to content
Guest Big Announcement

Instagram application crashes using specific header to hook

Featured Replies

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

Updated by dillidahal

Create an account or sign in to comment

Featured Content

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.