0cyn / ktool

pip install k2l | Mach-O + Obj-C analysis TUI / CLI kit and library. Zero compiled deps, runs anywhere with a python interpreter.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can not parse 32bit macho

zxvzxv opened this issue · comments

commented

this code raise an error when parsing 32bit macho file, because the pointer length is not 8bytes. And some objc structures also have differece
https://github.com/zxvzxv/ktool/blob/596404b085af4f3c2406251ef3bbbc77b81a4981/src/ktool/objc.py#L117

You can refer to this link, this include 32bit and 64bit objc structures
https://github.com/apple-oss-distributions/clang/blob/8204159ac8569f29fddc48862412243c2b79ce8c/src/lib/ObjCMetadata/macho-obj.h

i know it's hard to support 32bit files, and ios/mac is not support 32bit apps in newer version, so i don't expect too much

Hi, sorry this took so long, finally found some time to work on this project again.

ad4b1e3 should resolve this. For the time being you can install this version via python3 -m pip install -U git+https://github.com/0cyn/ktool.git This will land on pypi with the 2.0 version alongside a slew of other features "soon", and I'll close this issue once it's published there.

Landed