arandomdev / DyldExtractor

Extract Binaries from Apple's Dyld Shared Cache
MIT License
404 stars 40 forks source link

Case-sensitive Python imports #18

Closed PoomSmart closed 3 years ago

PoomSmart commented 3 years ago

Describe the bug

image

Given these imports, for examples:

from DyldExtractor.dyld.dyld_context import DyldContext
from DyldExtractor.macho.macho_context import MachOContext

Due to the fact the dyld and macho directories are actually Dyld and MachO, imports won't be resolved correctly and make running scripts impossible.

This occurs at least with Python 3.9.5 on macOS.

There are two possible solutions:

  1. Rename the directories Dyld to dyld, MachO to macho and Converter to converter.
  2. Replace every occurrence of dyld,macho and converter in imports with Dyld, MachO and Converter, respectively.
arandomdev commented 3 years ago

Oh sorry I ran into this issue before. Because git doesn’t keep track of folder case changes, when you pulled the latest version it didn’t rename it. Can you delete DyldExtractor and clone it again? Alternatively you can do 1 from your suggestions.

PoomSmart commented 3 years ago

It's okay. By the way, if you do git mv the changes should reflect.

arandomdev commented 3 years ago

Thanks for letting me know!