Skip to content

1.3.0 - Insert fixes + refactor

Compare
Choose a tag to compare
@0cyn 0cyn released this 14 May 22:08
· 66 commits to master since this release

Class Renames:
Dyld -> MachOImageLoader
ImageHeader -> MachOImageHeader

LD64 class was removed
insert_load_cmd(load_command, index=-1, suffix=None) and remove_load_command(index) added to MachOImageHeader which supports adding and removing all types of load commands now.

ktool.dyld module renamed to ktool.loader, now contains only code relevant specifically to loading the Image class from a standard MachO
Image class and a few others moved to new image.py, in which contained code is a non-platform-specific abstraction not tied to MachO.

Fixes:

  • Rewritten load command injection should fix issues with round-tripping and producing bad patches. A ton of unit testing for this area was added to try and maintain this.
  • Fix for some issues on certain weird linux environments

Improvements:

  • ktool no longer tries to guess the property getter/setter; it decodes it from the actual standard attr_string or generates it from the property name if none is specified. This avoids potential false positives and also clarifies when non-standard ones are used. We also decode whether a property is @ dynamic but do not encode that in the header yet.
  • json output for properties now embeds attr_string, getter, and setter.
  • More unit tests