Coder Social home page Coder Social logo

macholibre's People

Contributors

aaronst avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

macholibre's Issues

Possible error in parse dylib list?

Faield to parse macho, sha256: a42380933ae13b0ce023b38b576f5d2c48c1c82f19033781dfbf2f3e53e19711

Error:

Traceback (most recent call last):
 File "/app/static_analysis.py", line 112, in _parse_macho
 parsed_machos[sha] = parse_macho(file_path)
 File "/usr/local/lib/python3.7/site-packages/macholibre/__init__.py", line 45, in parse
 return parser.parse()
 File "/usr/local/lib/python3.7/site-packages/macholibre/parser.py", line 1680, in parse
 self.parse_file()
 File "/usr/local/lib/python3.7/site-packages/macholibre/parser.py", line 1671, in parse_file
 self.parse_macho(0, self.__output['size'])
 File "/usr/local/lib/python3.7/site-packages/macholibre/parser.py", line 1618, in parse_macho
 lc_dysymtab=lc_dysymtab, lc_dylibs=lc_dylibs)
 File "/usr/local/lib/python3.7/site-packages/macholibre/parser.py", line 1028, in parse_imports
 dylib = lc_dylibs[dylib - 1]['name']
IndexError: list index out of range

The value of the args are:

dylib = 14
lc_dylibs =  [{'cmd': 'LOAD_DYLIB', 'cmd_size': 56, 'name': '/usr/lib/libSystem.B.dylib', 'timestamp': '1970-01-01 02:00:02', 'current_version': '1252.50.4', 'compatability_version': '1.0.0'}]

UPDATE
found another one, same error: sha256: 473a6a364e369ee9e9bbc4b38b2179d9984245cd83617c8b4021cbf6c3dbb32b

Process MachO file from buffer

Would you be able to add a method that parses a MachO file from a data buffer, besides a file?
That would be helpful, thanks!

Error in parse_certs

Could not parse file: /sample/eb2c3cc63cd753790f29d0ce3004945f7a7a40630230a6f73d971ecf7d22a08f
ERROR:root:Traceback (most recent call last):
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/__init__.py", line 67, in main
    parse(args.input[0], f=args.output)
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/__init__.py", line 41, in parse
    p.parse_file()
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 814, in parse_file
    endi=identity[1], size=self.get_file_size()))
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 757, in parse_macho
    self.parse_sig(macho)
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 672, in parse_sig
    self.parse_certs(signature, offset)
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 300, in parse_certs
    signed_data = cms.CMS(self.f.read(size), format='DER')
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/ctypescrypto/cms.py", line 63, in CMS
    raise CMSError("Error parsing CMS data")
CMSError: Error parsing CMS data
	error:0D06B08E:asn1 encoding routines:ASN1_D2I_READ_BIO:not enough data

plistlib import error after porting to Python3

I'm getting this error, which may be a result of the code change to Python3:

from plistlib import loads, ImportError: cannot import name loads

Does the project still support Python2?

ValueError: read length must be non-negative or -1

Traceback (most recent call last):
  File "/Users/x/Downloads/Projects/ios-apps-research-2021/exynex/cli/analyze.py", line 291, in run
    app_executable_macho = macholibre.parse(f"{app_dir}/{app_executable}")
  File "/Users/x/.pyenv/versions/3.9.0/lib/python3.9/site-packages/macholibre/__init__.py", line 45, in parse
    return parser.parse(certs=certs)
  File "/Users/x/.pyenv/versions/3.9.0/lib/python3.9/site-packages/macholibre/parser.py", line 1695, in parse
    self.parse_file()
  File "/Users/x/.pyenv/versions/3.9.0/lib/python3.9/site-packages/macholibre/parser.py", line 1685, in parse_file
    self.parse_macho(0, self.__output['size'])
  File "/Users/x/.pyenv/versions/3.9.0/lib/python3.9/site-packages/macholibre/parser.py", line 1602, in parse_macho
    self.parse_lcs(offset, size, nlcs, slcs)
  File "/Users/x/.pyenv/versions/3.9.0/lib/python3.9/site-packages/macholibre/parser.py", line 789, in parse_lcs
    self.__file.read(cmd_size - 8)  # skip load command
ValueError: read length must be non-negative or -1

Crash python when parse Apple signed files

Commands:
from macholibre import macholibre print macholibre.processFile('/bin/ls')

Line:
parser.py", line 329, in parseCerts

Call Stack:
thread 1: libcrypto.dylibCMS_get0_type + 4, stop reason = EXC_BAD_ACCESS (code=1, address=0x367740)
frame 0: 0x000000010410c5f7 libcrypto.dylibCMS_get0_type + 4 frame 1: 0x0000000101f2e427 _ctypes.soffi_call_unix64 + 79
frame 2: 0x0000000101f2f2df _ctypes.soffi_call + 575 frame 3: 0x0000000101f293ef _ctypes.so_ctypes_callproc + 895
frame 4: 0x0000000101f212df _ctypes.soPyCFuncPtr_call + 303

ls-macOS.zip

LC_BUILD_VERSION not parsed and cause the parse to fail

you can try to parse sha256 "f05d79dd0e21acc96377e38617bfe070bf8e4c430dc9552808cfbff9841d6427"

the fix i think will work best is update parse_lcs with:

        for lc_num in range(nlcs):
            # Add this:
            prev = self._file.tell()
            cmd = self.get_int()       # Load command type
            cmd_size = self.get_int()  # Size of load command
            ...
            ...
            ...
            elif cmd == 'MAIN':
                self.__macho['lcs'].append(self.parse_main(cmd, cmd_size))
            # and this
            elif cmd == "BUILD_VERSION":
                self.__macho['lcs'].append(self.parse_version_min_os(cmd, cmd_size))
                self._file.seek(prev + cmd_size)
            else:
                logger.warning(f"Failed to parse lc {cmd}, skipping it")
                self._file.seek(prev + cmd_size)

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfd in position 3: invalid start byte

This happens to me when I try to parse a core dump Mach-O file:

$ macholibre core.16057 
Traceback (most recent call last):
  File "/home/lubos/.local/bin/macholibre", line 11, in <module>
    load_entry_point('macholibre==1.0', 'console_scripts', 'macholibre')()
  File "/home/lubos/.local/lib64/python3.6/site-packages/macholibre/__init__.py", line 70, in main
    print(dumps(parse(args.input[0])))
  File "/home/lubos/.local/lib64/python3.6/site-packages/macholibre/__init__.py", line 45, in parse
    return parser.parse()
  File "/home/lubos/.local/lib64/python3.6/site-packages/macholibre/parser.py", line 1680, in parse
    self.parse_file()
  File "/home/lubos/.local/lib64/python3.6/site-packages/macholibre/parser.py", line 1671, in parse_file
    self.parse_macho(0, self.__output['size'])
  File "/home/lubos/.local/lib64/python3.6/site-packages/macholibre/parser.py", line 1588, in parse_macho
    self.parse_lcs(offset, size, nlcs, slcs)
  File "/home/lubos/.local/lib64/python3.6/site-packages/macholibre/parser.py", line 791, in parse_lcs
    self.parse_segment(offset, size, cmd, cmd_size))
  File "/home/lubos/.local/lib64/python3.6/site-packages/macholibre/parser.py", line 230, in parse_segment
    name = self.__file.read(16).decode().rstrip('\u0000')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfd in position 3: invalid start byte

KeyError in list_macho_flags

Could not parse file: /sample/1824ed42581e489a7e916faf9f3967ef77844e6775cd29c87ff6ac314ebca0fc
ERROR:root:Traceback (most recent call last):
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/__init__.py", line 67, in main
    parse(args.input[0], f=args.output)
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/__init__.py", line 41, in parse
    p.parse_file()
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 814, in parse_file
    endi=identity[1], size=self.get_file_size()))
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 736, in parse_macho
    flags = self.list_macho_flags(flags)
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 90, in list_macho_flags
    l.append(dictionary.flags[2 ** j])
KeyError: 67108864

Use module ´argparse` for option handling

The Readme says:

For single files, make sure you put the filename first, before any options.

Please use argparse and overcome this limitation.

In the same turn you could remove the very, very unusual handling of globs, wich is normaly revolded by the shell already.

OutOfMemory crash

Extracting data from 104166ae77e366f0b5d66ce09ae7c28f12914b7156cc5c00afd000b624b8a2f1 results in python process consuming all available memory on the system then crashing.

Error parsing headers in universal files

  File "./macho.py", line 98, in <module>
    json_data = parse(file)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/macholibre/__init__.py", line 45, in parse
    return parser.parse()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/macholibre/parser.py", line 1701, in parse
    self.parse_file()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/macholibre/parser.py", line 1687, in parse_file
    self.parse_universal()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/macholibre/parser.py", line 1655, in parse_universal
    identity = self.identify_file()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/macholibre/parser.py", line 135, in identify_file
    magic))
ValueError: Provided file has unrecognized magic: 12

The errors appear to be in the loop inside parse_universal():

  • Should seek to offset before calling identify_file() at line 1646 so __file is pointing to the start of the Mach Header
  • On return from identify_file(), should restore the previous file position and then read another 4 bytes (to skip over align) to be in position to read the next section of the Fat Header during the next iteration

can't extract certificates while codesign can

I've got a mach-o binary taken from an IPA application. Macholibre can't extract certificates info from this binary while codesign on mac can. Any interest to investigate more? I could provide the binary.

.egg-info included in git repo

The .egg-info is included in the git repository, but it contains data pip/distutils generate when installing the package. It should not be part of the repo.

AttributeError in parse_lcs()

Could not parse file: /sample/1e733b7b44454690a84d33b715b16ccf1a8f2312abb8ccd260edf88736198730
ERROR:root:Traceback (most recent call last):
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/__init__.py", line 67, in main
    parse(args.input[0], f=args.output)
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/__init__.py", line 41, in parse
    p.parse_file()
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 814, in parse_file
    endi=identity[1], size=self.get_file_size()))
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 746, in parse_macho
    lc.parse_lcs()
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/loadcommander.py", line 529, in parse_lcs
    self.addAbnormality(a)
AttributeError: 'LoadCommander' object has no attribute 'addAbnormality'

UnboundLocalError in parse_syms

Could not parse file: /sample/d1de3d372d1df43cebb0869bac8e55304f1bd2d6ce925afeafd586559dde1d70
ERROR:root:Traceback (most recent call last):
  File "/.virtualenvs/macholibre/lib/python2.7/site-packages/macholibre/__init__.py", line 69, in main
    print parse(args.input[0])
  File "/.virtualenvs/macholibre/lib/python2.7/site-packages/macholibre/__init__.py", line 41, in parse
    p.parse_file()
  File "/.virtualenvs/macholibre/lib/python2.7/site-packages/macholibre/parser.py", line 814, in parse_file
    endi=identity[1], size=self.get_file_size()))
  File "/.virtualenvs/macholibre/lib/python2.7/site-packages/macholibre/parser.py", line 753, in parse_macho
    self.parse_syms(macho)
  File "/.virtualenvs/macholibre/lib/python2.7/site-packages/macholibre/parser.py", line 185, in parse_syms
    sym = Symbol(index=index, pext=pext, sym_type=n_type,
UnboundLocalError: local variable 'n_type' referenced before assignment

endless while loop

In the parser code:

def get_string(self):
        """Read a null-terminated string from macho."""

        string = bytearray()

        c = self.__file.read(1)

        while c not in (b'\x00', ''):
            string += c
            c = self.__file.read(1)

        return string.decode('utf-8', errors='replace')

This row:

while c not in (b'\x00', ''):

should change to:

while c not in (b'\x00', b''):

Otherwise it won't stop when reaching EOF

Also after you fix this you need to fix:

        while current_location < true_offset + lc_symtab['strsize']:
            try:
                string = self.get_string()

                if string != '':
                    self.__macho['strtab'].append(string)
            except:
                break

because the headers are invalid true_offset + lc_symtab['strsize'] is bigger then file size so it will never stop.

Maybe something like :

        current_location = self._file.tell()
        while current_location < true_offset + lc_symtab['strsize'] and current_location != self.file_size:
            try:
                string = self.get_string()
                current_location = self._file.tell()
                if string != '':
                    self.__macho['strtab'].append(string)
            except:
                break

Alternate code directory

you should add support for alternate code directory:

cs_blobs.h

CSSLOT_ALTERNATE_CODEDIRECTORIES = 0x1000, /* first alternate CodeDirectory, if any */

dictionary.py

indeces = {
    0: 'CodeDirectorySlot',
    1: 'InfoSlot',
    2: 'RequirementsSlot',
    3: 'ResourceDirSlot',
    4: 'ApplicationSlot',
    5: 'EntitlementSlot',
    0x1000: 'AlternateCodeDirectorySlot',  # <-- Add this
    0x10000: 'SignatureSlot'
}

and here

parser.py

            elif index_type in ['CodeDirectorySlot', 'AlternateCodeDirectorySlot']:
                self.parse_codedirectory(true_offset, index_offset)

ValueError in parse_requirements

Could not parse file: /sample/5d4233be60ec93e8918c463790ebad305e53d2cf266ba651357d3a743f5aaab3
ERROR:root:Traceback (most recent call last):
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/__init__.py", line 67, in main
    parse(args.input[0], f=args.output)
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/__init__.py", line 41, in parse
    p.parse_file()
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 814, in parse_file
    endi=identity[1], size=self.get_file_size()))
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 757, in parse_macho
    self.parse_sig(macho)
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 678, in parse_sig
    self.parse_requirements(signature, offset)
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 605, in parse_requirements
    magic = get_int(self.f)
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/utilities.py", line 87, in get_int
    def get_int(f): return int(f.read(4).encode('hex'), 16)
ValueError: invalid literal for int() with base 16: ''

AttributeError in parse_dysymtab

Could not parse file: /sample/01f6269609707284a591b2a31a2f36329b78e2adc02f46573ab33caf21edf698
ERROR:root:Traceback (most recent call last):
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/__init__.py", line 67, in main
    parse(args.input[0], f=args.output)
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/__init__.py", line 41, in parse
    p.parse_file()
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 814, in parse_file
    endi=identity[1], size=self.get_file_size()))
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 746, in parse_macho
    lc.parse_lcs()
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/loadcommander.py", line 554, in parse_lcs
    self.parse_dysymtab(lc)
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/loadcommander.py", line 244, in parse_dysymtab
    self.macho.symtab.il = little(il, 'I')
AttributeError: 'NoneType' object has no attribute 'il'

Script does nothing but printing "Hello World"

When installing with pip install …, the command macholibre Print "Hello World" and does nothing.

This is caused be setup.py defining the entry-point to be macholibre:main, which just print Hello World.

Symbol not found when running on OS X

I’m trying to get macholibre working on OS X (already works fine on Ubuntu).

I followed the instructions and installed the latest ctypescrypto from GitHub, before installing macholibre via pip. However I’m still getting the following error when from macholibre import macholibre:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/macholibre/macholibre.py", line 27, in <module>
    from parser import Parser
  File "/Library/Python/2.7/site-packages/macholibre/parser.py", line 30, in <module>
    from ctypescrypto import cms, oid
  File "/Library/Python/2.7/site-packages/ctypescrypto/cms.py", line 18, in <module>
    from ctypescrypto.x509 import StackOfX509
  File "/Library/Python/2.7/site-packages/ctypescrypto/x509.py", line 13, in <module>
    from ctypescrypto.pkey import PKey
  File "/Library/Python/2.7/site-packages/ctypescrypto/pkey.py", line 310, in <module>
    libcrypto.EVP_PKEY_print_public.argtypes = (c_void_p, c_void_p, c_int, c_void_p)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 378, in __getattr__
    func = self.__getitem__(name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 383, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(0x7f8fbb424110, EVP_PKEY_print_public): symbol not found

Any hint?

Execution hangs on sample

Attempting to extract the data, using standalone form, from 05575fb9fd4cbf35e53e80c3c9ccbc4f53d47c44b3e69e06b85bbfacb3669e1c results in a hang.

TypeError in parse_file

Could not parse file: /sample/06e3a7cd2330d2dca49b0b9396c9601267844d7446192fcd14b03be9c40081f6
ERROR:root:Traceback (most recent call last):
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/__init__.py", line 67, in main
    parse(args.input[0], f=args.output)
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/__init__.py", line 41, in parse
    p.parse_file()
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 813, in parse_file
    self.parse_macho(MachO(archive=False, offset=0, arch=identity[0],
TypeError: 'int' object has no attribute '__getitem__'

found an error is certificate parsing

Tried to parse binary macho, sha256: d6ecabe85f39bf1e07998afce68efa2c76c03aea715e38d13827c8643390c0f6
Error:

to parse file with macholibre Traceback: 'Traceback (most recent call last):
 File "/app/static_analysis.py", line 112, in _parse_macho
 parsed_machos[sha] = parse_macho(file_path)
 File "/usr/local/lib/python3.7/site-packages/macholibre/__init__.py", line 45, in parse
 return parser.parse()
 File "/usr/local/lib/python3.7/site-packages/macholibre/parser.py", line 1680, in parse
 self.parse_file()
 File "/usr/local/lib/python3.7/site-packages/macholibre/parser.py", line 1671, in parse_file
 self.parse_macho(0, self.__output['size'])
 File "/usr/local/lib/python3.7/site-packages/macholibre/parser.py", line 1624, in parse_macho
 self.parse_sig(offset, size, lc_codesig)
 File "/usr/local/lib/python3.7/site-packages/macholibre/parser.py", line 1525, in parse_sig
 self.parse_certs(true_offset, index_offset)
 File "/usr/local/lib/python3.7/site-packages/macholibre/parser.py", line 1082, in parse_certs
 subject[name] = str(value.parsed)
AttributeError: 'DirectoryString' object has no attribute 'parsed'

I'm not sure why you used value.parsed but i think value.chosen will fix it

KeyError: 'dylib'

Traceback (most recent call last):
  File "/Users/x/Downloads/Projects/ios-apps-research-2021/exynex/cli/analyze.py", line 149, in run
    app_main_executable_props = macholibre.parse(f"{app_dir}/{app_executable}")
  File "/Users/x/.pyenv/versions/3.9.0/lib/python3.9/site-packages/macholibre/__init__.py", line 45, in parse
    return parser.parse(certs=certs)
  File "/Users/x/.pyenv/versions/3.9.0/lib/python3.9/site-packages/macholibre/parser.py", line 1695, in parse
    self.parse_file()
  File "/Users/x/.pyenv/versions/3.9.0/lib/python3.9/site-packages/macholibre/parser.py", line 1685, in parse_file
    self.parse_macho(0, self.__output['size'])
  File "/Users/x/.pyenv/versions/3.9.0/lib/python3.9/site-packages/macholibre/parser.py", line 1631, in parse_macho
    self.parse_imports(offset, size, lc_symtab,
  File "/Users/x/.pyenv/versions/3.9.0/lib/python3.9/site-packages/macholibre/parser.py", line 1021, in parse_imports
    dylib = sym['dylib']
KeyError: 'dylib'

ExpatError in parse_entitlement

Could not parse file: /sample/c45f9b91abaa453a59898cebbb6f8bdd2e5942418dda4191b5e2f2ef11450148
ERROR:root:Traceback (most recent call last):
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/__init__.py", line 67, in main
    parse(args.input[0], f=args.output)
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/__init__.py", line 41, in parse
    p.parse_file()
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 814, in parse_file
    endi=identity[1], size=self.get_file_size()))
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 757, in parse_macho
    self.parse_sig(macho)
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 676, in parse_sig
    self.parse_entitlement(signature, offset)
  File "/.virtualenvs/tmp-6c7055859c255549/lib/python2.7/site-packages/macholibre/parser.py", line 448, in parse_entitlement
    plist = plistlib.readPlistFromString(self.f.read(size))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 103, in readPlistFromString
    return readPlist(StringIO(data))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 78, in readPlist
    rootObject = p.parse(pathOrFile)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 406, in parse
    parser.ParseFile(fileobj)
ExpatError: XML or text declaration not at start of entity: line 1, column 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.