Skip to content

Commit

Permalink
stub more shit i dont care about
Browse files Browse the repository at this point in the history
closes #1

tested against my entire archive, should be robust
  • Loading branch information
kfatehi committed Dec 10, 2016
1 parent e530b22 commit af5cf87
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ichat2json/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ int main(int argc, const char * argv[]) {
fprintf(stderr, "Usage: %s path/to/ichat\n", argv[0]);
exit(-1);
}

NSURL *f = [NSURL fileURLWithPath:[NSString stringWithUTF8String:argv[1]]];
NSString *filePath = [NSString stringWithUTF8String:argv[1]];
[NSKeyedUnarchiver setClass:[InstantMessage class] forClassName:@"InstantMessage"];
[NSKeyedUnarchiver setClass:[StubCoder class] forClassName:@"NSFont"];
[NSKeyedUnarchiver setClass:[StubCoder class] forClassName:@"NSMutableParagraphStyle"];
[NSKeyedUnarchiver setClass:[StubCoder class] forClassName:@"NSTextAttachment"];
[NSKeyedUnarchiver setClass:[StubCoder class] forClassName:@"NSColor"];
[NSKeyedUnarchiver setClass:[Sender class] forClassName:@"Presentity"];
for (id object in [NSKeyedUnarchiver unarchiveObjectWithFile: [f path]]) {
for (id object in [NSKeyedUnarchiver unarchiveObjectWithFile: filePath]) {
if ([object isKindOfClass:[NSMutableArray class]]) {
for (id sub in object) {
if ([sub isKindOfClass:[InstantMessage class]]) {
Expand Down

0 comments on commit af5cf87

Please sign in to comment.