Jump to content

1 post in this topic

Recommended Posts

Posted (edited)

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

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines