Hello, when attempting to dump headers for a shared library extracted from the dyld cache (using keith/dyld-shared-cache-extractor), the following error comes up:
➜ ~ ktool dump --headers --out ~/Desktop/test/headers /Users/lnatan/Desktop/test/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
ERROR - ktool.dyld:L#83:ImageHeader:from_image() -
ERROR - ktool.dyld:L#84:ImageHeader:from_image() - Load Command LOAD_COMMAND.LOAD_UPWARD_DYLIB doesn't have a mapped struct type
ERROR - ktool.dyld:L#85:ImageHeader:from_image() - *Please* file an issue on the github @ https://github.com/cxnder/ktool
ERROR - ktool.dyld:L#86:ImageHeader:from_image() -
ERROR - ktool.dyld:L#87:ImageHeader:from_image() - Run with the -f flag before the subcommand to try and force loading anyways
ERROR - ktool.dyld:L#88:ImageHeader:from_image() -
Traceback (most recent call last):
File "/opt/homebrew/bin/ktool", line 8, in <module>
sys.exit(main())
File "/opt/homebrew/lib/python3.9/site-packages/ktool/ktool_script.py", line 376, in main
args.func(args)
File "/opt/homebrew/lib/python3.9/site-packages/ktool/ktool_script.py", line 898, in dump
image = ktool.load_image(fp, args.slice_index, use_mmaped_io=MMAP_ENABLED)
File "/opt/homebrew/lib/python3.9/site-packages/ktool/ktool.py", line 84, in load_image
return Dyld.load(macho_slice, load_symtab=load_symtab, load_imports=load_imports, load_exports=load_exports)
File "/opt/homebrew/lib/python3.9/site-packages/ktool/dyld.py", line 292, in load
image = Image(macho_slice)
File "/opt/homebrew/lib/python3.9/site-packages/ktool/dyld.py", line 139, in __init__
self.macho_header: ImageHeader = ImageHeader.from_image(macho_slice=macho_slice)
File "/opt/homebrew/lib/python3.9/site-packages/ktool/dyld.py", line 89, in from_image
raise ex
File "/opt/homebrew/lib/python3.9/site-packages/ktool/dyld.py", line 74, in from_image
load_cmd = Struct.create_with_bytes(LOAD_COMMAND_MAP[LOAD_COMMAND(cmd)], cmd_raw)
KeyError: <LOAD_COMMAND.LOAD_UPWARD_DYLIB: 2147483683>
Hello, when attempting to dump headers for a shared library extracted from the dyld cache (using keith/dyld-shared-cache-extractor), the following error comes up:
Running with the
-f
flag doesn't help.Thanks