Identifying cocoa (NSData, NSArray, etc) objects in a file format [duplicate]
In order to reverse engineer a file format, How can I identify cocoa objects in a file format?
I've got a document format based with NSDocument, the program which created it can't export in a sane format and the vendor can't help export the data - they've gone out of business.
I've tried debugging the application and get back to -[docFile initWithContentsOfFile:ofType:] but beyond that isn't much help.
I'm assuming they're writing pure cocoa objects to disk - like NSA开发者_C百科rray, NSObject, NSDate, etc. So how do I recognize this structures on disk?
class-dump will dump all the internal classes/structs from a binary into a header file. It's the same as tool -ov, but it dumps into an .h file.
It's not perfect, but it'll get you a long way there right off the bat.
精彩评论