How to use the lief.MachO.LOAD_COMMAND_TYPES function in lief

To help you get started, we’ve selected a few lief examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lief-project / LIEF / tests / macho / macho_builder.py View on Github external
def test_id(self):
        original = lief.parse(get_sample('MachO/MachO64_x86-64_binary_id.bin'))
        _, output = tempfile.mkstemp(prefix="lief_id_remove_cmd")

        uuid_cmd = original[lief.MachO.LOAD_COMMAND_TYPES.UUID]
        original.remove(uuid_cmd)
        original.remove_command(len(original.commands) - 1)


        original.write(output)

        new = lief.parse(output)
        self.assertFalse(lief.MachO.LOAD_COMMAND_TYPES.UUID in new)
        self.assertFalse(lief.MachO.LOAD_COMMAND_TYPES.CODE_SIGNATURE in new)

        if sys.platform.startswith("darwin"):
            stdout = run_program(output)
            self.logger.debug(stdout)
            self.assertIsNotNone(re.search(r'uid=', stdout))
github viper-framework / viper / viper / modules / lief_imports / macho.py View on Github external
lief.MachO.LOAD_COMMAND_TYPES.DYLD_ENVIRONMENT          :   "DYLD_ENVIRONMENT",
    lief.MachO.LOAD_COMMAND_TYPES.DYLD_INFO                 :   "DYLD_INFO",
    lief.MachO.LOAD_COMMAND_TYPES.DYLD_INFO_ONLY            :   "DYLD_INFO_ONLY",
    lief.MachO.LOAD_COMMAND_TYPES.DYLIB_CODE_SIGN_DRS       :   "DYLIB_CODE_SIGN_DRC",
    lief.MachO.LOAD_COMMAND_TYPES.DYSYMTAB                  :   "DYSYMTAB",
    lief.MachO.LOAD_COMMAND_TYPES.ENCRYPTION_INFO           :   "ENCRYPTION_INFO",
    lief.MachO.LOAD_COMMAND_TYPES.ENCRYPTION_INFO_64        :   "ENCRYPTION_INFO_64",
    lief.MachO.LOAD_COMMAND_TYPES.FUNCTION_STARTS           :   "FUNCTION_STARTS",
    lief.MachO.LOAD_COMMAND_TYPES.FVMFILE                   :   "FVMFILE",
    lief.MachO.LOAD_COMMAND_TYPES.IDENT                     :   "IDENT",
    lief.MachO.LOAD_COMMAND_TYPES.IDFVMLIB                  :   "IDFVMLAB",
    lief.MachO.LOAD_COMMAND_TYPES.ID_DYLIB                  :   "ID_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.ID_DYLINKER               :   "ID_DYLINKER",
    lief.MachO.LOAD_COMMAND_TYPES.LAZY_LOAD_DYLIB           :   "LAZY_LOAD_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LINKER_OPTIMIZATION_HINT  :   "LINKER_OPTIMIZATION_HINT",
    lief.MachO.LOAD_COMMAND_TYPES.LINKER_OPTION             :   "LINKER_OPTION",
    lief.MachO.LOAD_COMMAND_TYPES.LOADFVMLIB                :   "LOADFVMLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_DYLIB                :   "LOAD_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_DYLINKER             :   "LOAD_DYLINKER",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_UPWARD_DYLIB         :   "LOAD_UPWARD_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_WEAK_DYLIB           :   "LOAD_WEAK_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.MAIN                      :   "MAIN",
    lief.MachO.LOAD_COMMAND_TYPES.PREBIND_CKSUM             :   "PREBIND_CKSUM",
    lief.MachO.LOAD_COMMAND_TYPES.PREBOUND_DYLIB            :   "PREBOUND_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.PREPAGE                   :   "PREPAGE",
    lief.MachO.LOAD_COMMAND_TYPES.REEXPORT_DYLIB            :   "REEXPORT_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.ROUTINES                  :   "ROUTINES",
    lief.MachO.LOAD_COMMAND_TYPES.ROUTINES_64               :   "ROUTINES_64",
    lief.MachO.LOAD_COMMAND_TYPES.RPATH                     :   "RPATH",
    lief.MachO.LOAD_COMMAND_TYPES.SEGMENT                   :   "SEGMENT",
    lief.MachO.LOAD_COMMAND_TYPES.SEGMENT_64                :   "SEGMENT_64",
    lief.MachO.LOAD_COMMAND_TYPES.SEGMENT_SPLIT_INFO        :   "SEGMENT_SPLIT_INFO",
github viper-framework / viper / viper / modules / lief_imports / macho.py View on Github external
MACHO_LOAD_COMMAND_TYPES = {
    lief.MachO.LOAD_COMMAND_TYPES.CODE_SIGNATURE            :   "CODE_SIGNATURE",
    lief.MachO.LOAD_COMMAND_TYPES.DATA_IN_CODE              :   "DATA_IN_CODE",
    lief.MachO.LOAD_COMMAND_TYPES.DYLD_ENVIRONMENT          :   "DYLD_ENVIRONMENT",
    lief.MachO.LOAD_COMMAND_TYPES.DYLD_INFO                 :   "DYLD_INFO",
    lief.MachO.LOAD_COMMAND_TYPES.DYLD_INFO_ONLY            :   "DYLD_INFO_ONLY",
    lief.MachO.LOAD_COMMAND_TYPES.DYLIB_CODE_SIGN_DRS       :   "DYLIB_CODE_SIGN_DRC",
    lief.MachO.LOAD_COMMAND_TYPES.DYSYMTAB                  :   "DYSYMTAB",
    lief.MachO.LOAD_COMMAND_TYPES.ENCRYPTION_INFO           :   "ENCRYPTION_INFO",
    lief.MachO.LOAD_COMMAND_TYPES.ENCRYPTION_INFO_64        :   "ENCRYPTION_INFO_64",
    lief.MachO.LOAD_COMMAND_TYPES.FUNCTION_STARTS           :   "FUNCTION_STARTS",
    lief.MachO.LOAD_COMMAND_TYPES.FVMFILE                   :   "FVMFILE",
    lief.MachO.LOAD_COMMAND_TYPES.IDENT                     :   "IDENT",
    lief.MachO.LOAD_COMMAND_TYPES.IDFVMLIB                  :   "IDFVMLAB",
    lief.MachO.LOAD_COMMAND_TYPES.ID_DYLIB                  :   "ID_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.ID_DYLINKER               :   "ID_DYLINKER",
    lief.MachO.LOAD_COMMAND_TYPES.LAZY_LOAD_DYLIB           :   "LAZY_LOAD_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LINKER_OPTIMIZATION_HINT  :   "LINKER_OPTIMIZATION_HINT",
    lief.MachO.LOAD_COMMAND_TYPES.LINKER_OPTION             :   "LINKER_OPTION",
    lief.MachO.LOAD_COMMAND_TYPES.LOADFVMLIB                :   "LOADFVMLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_DYLIB                :   "LOAD_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_DYLINKER             :   "LOAD_DYLINKER",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_UPWARD_DYLIB         :   "LOAD_UPWARD_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_WEAK_DYLIB           :   "LOAD_WEAK_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.MAIN                      :   "MAIN",
    lief.MachO.LOAD_COMMAND_TYPES.PREBIND_CKSUM             :   "PREBIND_CKSUM",
    lief.MachO.LOAD_COMMAND_TYPES.PREBOUND_DYLIB            :   "PREBOUND_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.PREPAGE                   :   "PREPAGE",
    lief.MachO.LOAD_COMMAND_TYPES.REEXPORT_DYLIB            :   "REEXPORT_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.ROUTINES                  :   "ROUTINES",
    lief.MachO.LOAD_COMMAND_TYPES.ROUTINES_64               :   "ROUTINES_64",
    lief.MachO.LOAD_COMMAND_TYPES.RPATH                     :   "RPATH",
github viper-framework / viper / viper / modules / lief_imports / macho.py View on Github external
MACHO_CPU_TYPES = {
    lief.MachO.CPU_TYPES.ANY        :   "ANY",
    lief.MachO.CPU_TYPES.ARM        :   "ARM",
    lief.MachO.CPU_TYPES.ARM64      :   "ARM64",
    lief.MachO.CPU_TYPES.MC98000    :   "MC98000",
    lief.MachO.CPU_TYPES.POWERPC    :   "POWERPC",
    lief.MachO.CPU_TYPES.POWERPC64  :   "POWERPC64",
    lief.MachO.CPU_TYPES.SPARC      :   "SPARC",
    lief.MachO.CPU_TYPES.x86        :   "x86",
    lief.MachO.CPU_TYPES.x86_64     :   "x86_64"
}

MACHO_LOAD_COMMAND_TYPES = {
    lief.MachO.LOAD_COMMAND_TYPES.CODE_SIGNATURE            :   "CODE_SIGNATURE",
    lief.MachO.LOAD_COMMAND_TYPES.DATA_IN_CODE              :   "DATA_IN_CODE",
    lief.MachO.LOAD_COMMAND_TYPES.DYLD_ENVIRONMENT          :   "DYLD_ENVIRONMENT",
    lief.MachO.LOAD_COMMAND_TYPES.DYLD_INFO                 :   "DYLD_INFO",
    lief.MachO.LOAD_COMMAND_TYPES.DYLD_INFO_ONLY            :   "DYLD_INFO_ONLY",
    lief.MachO.LOAD_COMMAND_TYPES.DYLIB_CODE_SIGN_DRS       :   "DYLIB_CODE_SIGN_DRC",
    lief.MachO.LOAD_COMMAND_TYPES.DYSYMTAB                  :   "DYSYMTAB",
    lief.MachO.LOAD_COMMAND_TYPES.ENCRYPTION_INFO           :   "ENCRYPTION_INFO",
    lief.MachO.LOAD_COMMAND_TYPES.ENCRYPTION_INFO_64        :   "ENCRYPTION_INFO_64",
    lief.MachO.LOAD_COMMAND_TYPES.FUNCTION_STARTS           :   "FUNCTION_STARTS",
    lief.MachO.LOAD_COMMAND_TYPES.FVMFILE                   :   "FVMFILE",
    lief.MachO.LOAD_COMMAND_TYPES.IDENT                     :   "IDENT",
    lief.MachO.LOAD_COMMAND_TYPES.IDFVMLIB                  :   "IDFVMLAB",
    lief.MachO.LOAD_COMMAND_TYPES.ID_DYLIB                  :   "ID_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.ID_DYLINKER               :   "ID_DYLINKER",
    lief.MachO.LOAD_COMMAND_TYPES.LAZY_LOAD_DYLIB           :   "LAZY_LOAD_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LINKER_OPTIMIZATION_HINT  :   "LINKER_OPTIMIZATION_HINT",
    lief.MachO.LOAD_COMMAND_TYPES.LINKER_OPTION             :   "LINKER_OPTION",
    lief.MachO.LOAD_COMMAND_TYPES.LOADFVMLIB                :   "LOADFVMLIB",
github viper-framework / viper / viper / modules / lief_imports / macho.py View on Github external
lief.MachO.LOAD_COMMAND_TYPES.ROUTINES_64               :   "ROUTINES_64",
    lief.MachO.LOAD_COMMAND_TYPES.RPATH                     :   "RPATH",
    lief.MachO.LOAD_COMMAND_TYPES.SEGMENT                   :   "SEGMENT",
    lief.MachO.LOAD_COMMAND_TYPES.SEGMENT_64                :   "SEGMENT_64",
    lief.MachO.LOAD_COMMAND_TYPES.SEGMENT_SPLIT_INFO        :   "SEGMENT_SPLIT_INFO",
    lief.MachO.LOAD_COMMAND_TYPES.SOURCE_VERSION            :   "SOURCE_VERSION",
    lief.MachO.LOAD_COMMAND_TYPES.SUB_CLIENT                :   "SUB_CLIENT",
    lief.MachO.LOAD_COMMAND_TYPES.SUB_FRAMEWORK             :   "SUB_FRAMEWORK",
    lief.MachO.LOAD_COMMAND_TYPES.SUB_LIBRARY               :   "SUB_LIBRARY",
    lief.MachO.LOAD_COMMAND_TYPES.SUB_UMBRELLA              :   "SUB_UMBRELLA",
    lief.MachO.LOAD_COMMAND_TYPES.SYMSEG                    :   "SYMSEG",
    lief.MachO.LOAD_COMMAND_TYPES.SYMTAB                    :   "SYMTAB",
    lief.MachO.LOAD_COMMAND_TYPES.THREAD                    :   "THRAD",
    lief.MachO.LOAD_COMMAND_TYPES.TWOLEVEL_HINTS            :   "TWOLEVEL_HINTS",
    lief.MachO.LOAD_COMMAND_TYPES.UNIXTHREAD                :   "UNIXTHREAD",
    lief.MachO.LOAD_COMMAND_TYPES.UUID                      :   "UUID",
    lief.MachO.LOAD_COMMAND_TYPES.VERSION_MIN_IPHONEOS      :   "VERSION_MIN_IPHONEOS",
    lief.MachO.LOAD_COMMAND_TYPES.VERSION_MIN_MACOSX        :   "VERSION_MIN_MACOSX",
    lief.MachO.LOAD_COMMAND_TYPES.VERSION_MIN_TVOS          :   "VERSION_MIN_TVOS",
    lief.MachO.LOAD_COMMAND_TYPES.VERSION_MIN_WATCHOS       :   "VERSION_MIN_WATCHOS"
}


MACHO_SYMBOL_ORIGINS = {
    lief.MachO.SYMBOL_ORIGINS.DYLD_EXPORT   :   "DYLD_EXPORT",
    lief.MachO.SYMBOL_ORIGINS.LC_SYMTAB     :   "LC_SYMTAB",
    lief.MachO.SYMBOL_ORIGINS.UNKNOWN       :   "UNKNOWN"
}

MACHO_SECTION_TYPES = {
    lief.MachO.SECTION_TYPES.COALESCED                              :   "COALESCED",
    lief.MachO.SECTION_TYPES.CSTRING_LITERALS                       :   "CSTRING_LITERALS",
github viper-framework / viper / viper / modules / lief_imports / macho.py View on Github external
lief.MachO.LOAD_COMMAND_TYPES.LOADFVMLIB                :   "LOADFVMLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_DYLIB                :   "LOAD_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_DYLINKER             :   "LOAD_DYLINKER",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_UPWARD_DYLIB         :   "LOAD_UPWARD_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_WEAK_DYLIB           :   "LOAD_WEAK_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.MAIN                      :   "MAIN",
    lief.MachO.LOAD_COMMAND_TYPES.PREBIND_CKSUM             :   "PREBIND_CKSUM",
    lief.MachO.LOAD_COMMAND_TYPES.PREBOUND_DYLIB            :   "PREBOUND_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.PREPAGE                   :   "PREPAGE",
    lief.MachO.LOAD_COMMAND_TYPES.REEXPORT_DYLIB            :   "REEXPORT_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.ROUTINES                  :   "ROUTINES",
    lief.MachO.LOAD_COMMAND_TYPES.ROUTINES_64               :   "ROUTINES_64",
    lief.MachO.LOAD_COMMAND_TYPES.RPATH                     :   "RPATH",
    lief.MachO.LOAD_COMMAND_TYPES.SEGMENT                   :   "SEGMENT",
    lief.MachO.LOAD_COMMAND_TYPES.SEGMENT_64                :   "SEGMENT_64",
    lief.MachO.LOAD_COMMAND_TYPES.SEGMENT_SPLIT_INFO        :   "SEGMENT_SPLIT_INFO",
    lief.MachO.LOAD_COMMAND_TYPES.SOURCE_VERSION            :   "SOURCE_VERSION",
    lief.MachO.LOAD_COMMAND_TYPES.SUB_CLIENT                :   "SUB_CLIENT",
    lief.MachO.LOAD_COMMAND_TYPES.SUB_FRAMEWORK             :   "SUB_FRAMEWORK",
    lief.MachO.LOAD_COMMAND_TYPES.SUB_LIBRARY               :   "SUB_LIBRARY",
    lief.MachO.LOAD_COMMAND_TYPES.SUB_UMBRELLA              :   "SUB_UMBRELLA",
    lief.MachO.LOAD_COMMAND_TYPES.SYMSEG                    :   "SYMSEG",
    lief.MachO.LOAD_COMMAND_TYPES.SYMTAB                    :   "SYMTAB",
    lief.MachO.LOAD_COMMAND_TYPES.THREAD                    :   "THRAD",
    lief.MachO.LOAD_COMMAND_TYPES.TWOLEVEL_HINTS            :   "TWOLEVEL_HINTS",
    lief.MachO.LOAD_COMMAND_TYPES.UNIXTHREAD                :   "UNIXTHREAD",
    lief.MachO.LOAD_COMMAND_TYPES.UUID                      :   "UUID",
    lief.MachO.LOAD_COMMAND_TYPES.VERSION_MIN_IPHONEOS      :   "VERSION_MIN_IPHONEOS",
    lief.MachO.LOAD_COMMAND_TYPES.VERSION_MIN_MACOSX        :   "VERSION_MIN_MACOSX",
    lief.MachO.LOAD_COMMAND_TYPES.VERSION_MIN_TVOS          :   "VERSION_MIN_TVOS",
    lief.MachO.LOAD_COMMAND_TYPES.VERSION_MIN_WATCHOS       :   "VERSION_MIN_WATCHOS"
}
github viper-framework / viper / viper / modules / lief_imports / macho.py View on Github external
lief.MachO.CPU_TYPES.ARM64      :   "ARM64",
    lief.MachO.CPU_TYPES.MC98000    :   "MC98000",
    lief.MachO.CPU_TYPES.POWERPC    :   "POWERPC",
    lief.MachO.CPU_TYPES.POWERPC64  :   "POWERPC64",
    lief.MachO.CPU_TYPES.SPARC      :   "SPARC",
    lief.MachO.CPU_TYPES.x86        :   "x86",
    lief.MachO.CPU_TYPES.x86_64     :   "x86_64"
}

MACHO_LOAD_COMMAND_TYPES = {
    lief.MachO.LOAD_COMMAND_TYPES.CODE_SIGNATURE            :   "CODE_SIGNATURE",
    lief.MachO.LOAD_COMMAND_TYPES.DATA_IN_CODE              :   "DATA_IN_CODE",
    lief.MachO.LOAD_COMMAND_TYPES.DYLD_ENVIRONMENT          :   "DYLD_ENVIRONMENT",
    lief.MachO.LOAD_COMMAND_TYPES.DYLD_INFO                 :   "DYLD_INFO",
    lief.MachO.LOAD_COMMAND_TYPES.DYLD_INFO_ONLY            :   "DYLD_INFO_ONLY",
    lief.MachO.LOAD_COMMAND_TYPES.DYLIB_CODE_SIGN_DRS       :   "DYLIB_CODE_SIGN_DRC",
    lief.MachO.LOAD_COMMAND_TYPES.DYSYMTAB                  :   "DYSYMTAB",
    lief.MachO.LOAD_COMMAND_TYPES.ENCRYPTION_INFO           :   "ENCRYPTION_INFO",
    lief.MachO.LOAD_COMMAND_TYPES.ENCRYPTION_INFO_64        :   "ENCRYPTION_INFO_64",
    lief.MachO.LOAD_COMMAND_TYPES.FUNCTION_STARTS           :   "FUNCTION_STARTS",
    lief.MachO.LOAD_COMMAND_TYPES.FVMFILE                   :   "FVMFILE",
    lief.MachO.LOAD_COMMAND_TYPES.IDENT                     :   "IDENT",
    lief.MachO.LOAD_COMMAND_TYPES.IDFVMLIB                  :   "IDFVMLAB",
    lief.MachO.LOAD_COMMAND_TYPES.ID_DYLIB                  :   "ID_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.ID_DYLINKER               :   "ID_DYLINKER",
    lief.MachO.LOAD_COMMAND_TYPES.LAZY_LOAD_DYLIB           :   "LAZY_LOAD_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LINKER_OPTIMIZATION_HINT  :   "LINKER_OPTIMIZATION_HINT",
    lief.MachO.LOAD_COMMAND_TYPES.LINKER_OPTION             :   "LINKER_OPTION",
    lief.MachO.LOAD_COMMAND_TYPES.LOADFVMLIB                :   "LOADFVMLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_DYLIB                :   "LOAD_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_DYLINKER             :   "LOAD_DYLINKER",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_UPWARD_DYLIB         :   "LOAD_UPWARD_DYLIB",
github viper-framework / viper / viper / modules / lief_imports / macho.py View on Github external
lief.MachO.LOAD_COMMAND_TYPES.FUNCTION_STARTS           :   "FUNCTION_STARTS",
    lief.MachO.LOAD_COMMAND_TYPES.FVMFILE                   :   "FVMFILE",
    lief.MachO.LOAD_COMMAND_TYPES.IDENT                     :   "IDENT",
    lief.MachO.LOAD_COMMAND_TYPES.IDFVMLIB                  :   "IDFVMLAB",
    lief.MachO.LOAD_COMMAND_TYPES.ID_DYLIB                  :   "ID_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.ID_DYLINKER               :   "ID_DYLINKER",
    lief.MachO.LOAD_COMMAND_TYPES.LAZY_LOAD_DYLIB           :   "LAZY_LOAD_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LINKER_OPTIMIZATION_HINT  :   "LINKER_OPTIMIZATION_HINT",
    lief.MachO.LOAD_COMMAND_TYPES.LINKER_OPTION             :   "LINKER_OPTION",
    lief.MachO.LOAD_COMMAND_TYPES.LOADFVMLIB                :   "LOADFVMLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_DYLIB                :   "LOAD_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_DYLINKER             :   "LOAD_DYLINKER",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_UPWARD_DYLIB         :   "LOAD_UPWARD_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_WEAK_DYLIB           :   "LOAD_WEAK_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.MAIN                      :   "MAIN",
    lief.MachO.LOAD_COMMAND_TYPES.PREBIND_CKSUM             :   "PREBIND_CKSUM",
    lief.MachO.LOAD_COMMAND_TYPES.PREBOUND_DYLIB            :   "PREBOUND_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.PREPAGE                   :   "PREPAGE",
    lief.MachO.LOAD_COMMAND_TYPES.REEXPORT_DYLIB            :   "REEXPORT_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.ROUTINES                  :   "ROUTINES",
    lief.MachO.LOAD_COMMAND_TYPES.ROUTINES_64               :   "ROUTINES_64",
    lief.MachO.LOAD_COMMAND_TYPES.RPATH                     :   "RPATH",
    lief.MachO.LOAD_COMMAND_TYPES.SEGMENT                   :   "SEGMENT",
    lief.MachO.LOAD_COMMAND_TYPES.SEGMENT_64                :   "SEGMENT_64",
    lief.MachO.LOAD_COMMAND_TYPES.SEGMENT_SPLIT_INFO        :   "SEGMENT_SPLIT_INFO",
    lief.MachO.LOAD_COMMAND_TYPES.SOURCE_VERSION            :   "SOURCE_VERSION",
    lief.MachO.LOAD_COMMAND_TYPES.SUB_CLIENT                :   "SUB_CLIENT",
    lief.MachO.LOAD_COMMAND_TYPES.SUB_FRAMEWORK             :   "SUB_FRAMEWORK",
    lief.MachO.LOAD_COMMAND_TYPES.SUB_LIBRARY               :   "SUB_LIBRARY",
    lief.MachO.LOAD_COMMAND_TYPES.SUB_UMBRELLA              :   "SUB_UMBRELLA",
    lief.MachO.LOAD_COMMAND_TYPES.SYMSEG                    :   "SYMSEG",
    lief.MachO.LOAD_COMMAND_TYPES.SYMTAB                    :   "SYMTAB",
github viper-framework / viper / viper / modules / lief_imports / macho.py View on Github external
lief.MachO.LOAD_COMMAND_TYPES.LINKER_OPTION             :   "LINKER_OPTION",
    lief.MachO.LOAD_COMMAND_TYPES.LOADFVMLIB                :   "LOADFVMLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_DYLIB                :   "LOAD_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_DYLINKER             :   "LOAD_DYLINKER",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_UPWARD_DYLIB         :   "LOAD_UPWARD_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_WEAK_DYLIB           :   "LOAD_WEAK_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.MAIN                      :   "MAIN",
    lief.MachO.LOAD_COMMAND_TYPES.PREBIND_CKSUM             :   "PREBIND_CKSUM",
    lief.MachO.LOAD_COMMAND_TYPES.PREBOUND_DYLIB            :   "PREBOUND_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.PREPAGE                   :   "PREPAGE",
    lief.MachO.LOAD_COMMAND_TYPES.REEXPORT_DYLIB            :   "REEXPORT_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.ROUTINES                  :   "ROUTINES",
    lief.MachO.LOAD_COMMAND_TYPES.ROUTINES_64               :   "ROUTINES_64",
    lief.MachO.LOAD_COMMAND_TYPES.RPATH                     :   "RPATH",
    lief.MachO.LOAD_COMMAND_TYPES.SEGMENT                   :   "SEGMENT",
    lief.MachO.LOAD_COMMAND_TYPES.SEGMENT_64                :   "SEGMENT_64",
    lief.MachO.LOAD_COMMAND_TYPES.SEGMENT_SPLIT_INFO        :   "SEGMENT_SPLIT_INFO",
    lief.MachO.LOAD_COMMAND_TYPES.SOURCE_VERSION            :   "SOURCE_VERSION",
    lief.MachO.LOAD_COMMAND_TYPES.SUB_CLIENT                :   "SUB_CLIENT",
    lief.MachO.LOAD_COMMAND_TYPES.SUB_FRAMEWORK             :   "SUB_FRAMEWORK",
    lief.MachO.LOAD_COMMAND_TYPES.SUB_LIBRARY               :   "SUB_LIBRARY",
    lief.MachO.LOAD_COMMAND_TYPES.SUB_UMBRELLA              :   "SUB_UMBRELLA",
    lief.MachO.LOAD_COMMAND_TYPES.SYMSEG                    :   "SYMSEG",
    lief.MachO.LOAD_COMMAND_TYPES.SYMTAB                    :   "SYMTAB",
    lief.MachO.LOAD_COMMAND_TYPES.THREAD                    :   "THRAD",
    lief.MachO.LOAD_COMMAND_TYPES.TWOLEVEL_HINTS            :   "TWOLEVEL_HINTS",
    lief.MachO.LOAD_COMMAND_TYPES.UNIXTHREAD                :   "UNIXTHREAD",
    lief.MachO.LOAD_COMMAND_TYPES.UUID                      :   "UUID",
    lief.MachO.LOAD_COMMAND_TYPES.VERSION_MIN_IPHONEOS      :   "VERSION_MIN_IPHONEOS",
    lief.MachO.LOAD_COMMAND_TYPES.VERSION_MIN_MACOSX        :   "VERSION_MIN_MACOSX",
    lief.MachO.LOAD_COMMAND_TYPES.VERSION_MIN_TVOS          :   "VERSION_MIN_TVOS",
    lief.MachO.LOAD_COMMAND_TYPES.VERSION_MIN_WATCHOS       :   "VERSION_MIN_WATCHOS"
github viper-framework / viper / viper / modules / lief_imports / macho.py View on Github external
lief.MachO.CPU_TYPES.x86_64     :   "x86_64"
}

MACHO_LOAD_COMMAND_TYPES = {
    lief.MachO.LOAD_COMMAND_TYPES.CODE_SIGNATURE            :   "CODE_SIGNATURE",
    lief.MachO.LOAD_COMMAND_TYPES.DATA_IN_CODE              :   "DATA_IN_CODE",
    lief.MachO.LOAD_COMMAND_TYPES.DYLD_ENVIRONMENT          :   "DYLD_ENVIRONMENT",
    lief.MachO.LOAD_COMMAND_TYPES.DYLD_INFO                 :   "DYLD_INFO",
    lief.MachO.LOAD_COMMAND_TYPES.DYLD_INFO_ONLY            :   "DYLD_INFO_ONLY",
    lief.MachO.LOAD_COMMAND_TYPES.DYLIB_CODE_SIGN_DRS       :   "DYLIB_CODE_SIGN_DRC",
    lief.MachO.LOAD_COMMAND_TYPES.DYSYMTAB                  :   "DYSYMTAB",
    lief.MachO.LOAD_COMMAND_TYPES.ENCRYPTION_INFO           :   "ENCRYPTION_INFO",
    lief.MachO.LOAD_COMMAND_TYPES.ENCRYPTION_INFO_64        :   "ENCRYPTION_INFO_64",
    lief.MachO.LOAD_COMMAND_TYPES.FUNCTION_STARTS           :   "FUNCTION_STARTS",
    lief.MachO.LOAD_COMMAND_TYPES.FVMFILE                   :   "FVMFILE",
    lief.MachO.LOAD_COMMAND_TYPES.IDENT                     :   "IDENT",
    lief.MachO.LOAD_COMMAND_TYPES.IDFVMLIB                  :   "IDFVMLAB",
    lief.MachO.LOAD_COMMAND_TYPES.ID_DYLIB                  :   "ID_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.ID_DYLINKER               :   "ID_DYLINKER",
    lief.MachO.LOAD_COMMAND_TYPES.LAZY_LOAD_DYLIB           :   "LAZY_LOAD_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LINKER_OPTIMIZATION_HINT  :   "LINKER_OPTIMIZATION_HINT",
    lief.MachO.LOAD_COMMAND_TYPES.LINKER_OPTION             :   "LINKER_OPTION",
    lief.MachO.LOAD_COMMAND_TYPES.LOADFVMLIB                :   "LOADFVMLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_DYLIB                :   "LOAD_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_DYLINKER             :   "LOAD_DYLINKER",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_UPWARD_DYLIB         :   "LOAD_UPWARD_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.LOAD_WEAK_DYLIB           :   "LOAD_WEAK_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.MAIN                      :   "MAIN",
    lief.MachO.LOAD_COMMAND_TYPES.PREBIND_CKSUM             :   "PREBIND_CKSUM",
    lief.MachO.LOAD_COMMAND_TYPES.PREBOUND_DYLIB            :   "PREBOUND_DYLIB",
    lief.MachO.LOAD_COMMAND_TYPES.PREPAGE                   :   "PREPAGE",
    lief.MachO.LOAD_COMMAND_TYPES.REEXPORT_DYLIB            :   "REEXPORT_DYLIB",