Skip to content

Commit

Permalink
Fix superclass resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
KritantaDev authored and KritantaDev committed Aug 3, 2021
1 parent 2e2733e commit adfc4f6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = k2l
version = 0.2.1
version = 0.2.3
author = _kritanta
author_email = [email protected]
description = Static mach-o binary analysis tool.
Expand Down
2 changes: 1 addition & 1 deletion src/ktool/generator.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from ktool.dyld import SymbolType
from ktool.objc import Class, ObjCLibrary

_KTOOL_VERSION = "0.2.1"
_KTOOL_VERSION = "0.2.3"


class TBDGenerator:
Expand Down
1 change: 1 addition & 0 deletions src/ktool/objc.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ def _load_objc2_class(self, ptr):
continue
if action_file_location == struct_location + 0x8:
try:
self.superclass = symbol.name[1:]
self.linked_classes.append(LinkedClass(symbol.name[1:], self.library.library.linked[int(symbol.ordinal) - 1].install_name))
except IndexError:
continue
Expand Down
Binary file added tests/bins/SpringBoardHome
Binary file not shown.
3 changes: 2 additions & 1 deletion tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_bin(self):
class KDumpTestCase(unittest.TestCase):
def test_kdump(self):

fd = open('bins/PreferencesUI', 'rb')
fd = open('bins/SpringBoardHome', 'rb')
machofile = MachOFile(fd)
library = Dyld.load(machofile.slices[0])
objc_lib = ObjCLibrary(library)
Expand All @@ -36,6 +36,7 @@ def test_kdump(self):
# print(sym.name)
#print(library.allowed_clients)
fd.close()

def test_tapi_dump(self):
with open('bins/PreferencesUI.dyldex', 'rb') as file:
machofile = MachOFile(file)
Expand Down

0 comments on commit adfc4f6

Please sign in to comment.