This repository was archived by the owner on Dec 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -224,6 +224,11 @@ def main():
224224 with open (args .dyld_path , "rb" ) as f :
225225 dyldCtx = DyldContext (f )
226226
227+ # Check magic
228+ if dyldCtx .header .magic [0 :4 ] != b"dyld" :
229+ print ("Cache's magic does not start with 'dyld', most likely given a file that's not a cache or the file is broken." ) # noqa
230+ return
231+
227232 # enumerate images, create a map of paths and images
228233 imageMap = {}
229234 for imageData in dyldCtx .images :
Original file line number Diff line number Diff line change @@ -254,6 +254,11 @@ def _main() -> None:
254254 with open (args .dyld_path , "rb" ) as f :
255255 dyldCtx = DyldContext (f )
256256
257+ # Check magic
258+ if dyldCtx .header .magic [0 :4 ] != b"dyld" :
259+ print ("Cache's magic does not start with 'dyld', most likely given a file that's not a cache or the file is broken." ) # noqa
260+ return
261+
257262 for image in dyldCtx .images :
258263 imagePath = dyldCtx .readString (
259264 image .pathFileOffset
Original file line number Diff line number Diff line change 22
33setup (
44 name = 'dyldextractor' ,
5- version = '2.0.3 ' ,
5+ version = '2.0.4 ' ,
66 description = 'Extract Binaries from Apple\' s Dyld Shared Cache' ,
77 long_description = 'file: README.md' ,
88 long_description_content_type = 'text/markdown' ,
You can’t perform that action at this time.
0 commit comments