-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathKC.py
40 lines (30 loc) · 857 Bytes
/
KC.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- coding: utf-8 -*-
#@category iOS.kernel
#@toolbar logos/kc.png
#@keybinding Meta Shift K
from utils.helpers import *
from utils.ios_kc import *
from utils.iometa import ParseIOMeta
def fix_map():
prog = currentProgram
memory = prog.getMemory()
blocks = memory.getBlocks()
for b in blocks:
if "__got" in b.getName():
b.setWrite(False)
def loadAll():
default = "/tmp/kernel.txt"
ff = askString("iometa symbol file","Symbol file: ",default)
iom = ParseIOMeta(ff)
Obj = iom.getObjects()
kc = kernelCache(Obj)
#kc.clear_class_structures()
kc.process_all_classes()
#kc.process_class("IOUserClient")
#kc.process_classes_for_bundle("com.apple.iokit.IOSurface")
#kc.explore_pac()
if __name__ == "__main__":
#DeclareDataTypes()
prepare()
#fix_map()
loadAll()