From c8b71269fbf72aacda06163821cc2063aef9a87e Mon Sep 17 00:00:00 2001 From: Derek Selander Date: Sun, 8 Dec 2019 21:57:23 -0700 Subject: [PATCH] dsdump doesn't like protected executables #6, tmp bandaid --- dsdump/XRMachOLibrary.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dsdump/XRMachOLibrary.mm b/dsdump/XRMachOLibrary.mm index 860393a2..16d9e342 100644 --- a/dsdump/XRMachOLibrary.mm +++ b/dsdump/XRMachOLibrary.mm @@ -280,6 +280,12 @@ - (instancetype)initWithPath:(NSString*)path { char seg_name[17] = {}; memcpy(seg_name, cmd->segname, 16); NSString *segmentKey = [NSString stringWithUTF8String:seg_name]; + if (cmd->flags & SG_PROTECTED_VERSION_1) { + // FIXME, implement protected executables + // https://github.com/DerekSelander/dsdump/issues/6 + printf("%s is protected, come again at a later beta\n", cmd->segname); + exit(1); + } self.segmentCommandsDictionary[segmentKey] = @((uintptr_t)cmd); for (int j = 0; j < cmd->nsects; j++) {