MCPcopy Index your code
hub / github.com/qilingframework/qiling / __init__

Method __init__

qiling/loader/macho_parser/parser.py:19–32  ·  view source on GitHub ↗
(self, ql, path, arch= None)

Source from the content-addressed store, hash-verified

17
18 # arch = "x8664" or "x86"
19 def __init__(self, ql, path, arch= None):
20 self.ql = ql
21 self.binary_file = self.readFile(path)
22 self.raw_data = self.binary_file
23 self.archtype = ql.arch.type
24 self.parseFile()
25 self.page_zero_size = 0
26 self.header_address = 0x0
27 for seg in self.segments:
28 # find page zero
29 if seg.vm_address == 0 and seg.file_size == 0:
30 ql.log.info("PageZero Size: {:X}".format(seg.vm_size))
31 self.page_zero_size = seg.vm_size
32 self.header_address = seg.vm_size
33
34 @staticmethod
35 def readFile(path):

Callers

nothing calls this directly

Calls 3

readFileMethod · 0.95
parseFileMethod · 0.95
formatMethod · 0.80

Tested by

no test coverage detected