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

Method __init__

qiling/loader/macho_parser/header.py:19–32  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

17class BinaryHeader(Header):
18
19 def __init__(self, data):
20 super().__init__(data)
21 FR = FileReader(data)
22 self.magic = unpack("<L", FR.read(4))[0]
23 self.cpu_type = unpack("<L", FR.read(4))[0]
24 self.cpu_subtype = unpack("<L", FR.read(4))[0]
25 self.file_type = unpack("<L", FR.read(4))[0]
26 self.lc_num = unpack("<L", FR.read(4))[0]
27 self.lc_size = unpack("<L", FR.read(4))[0]
28 self.flags = unpack("<L", FR.read(4))[0]
29
30 if self.magic in MAGIC_64:
31 self.reserved = unpack("<L", FR.read(4))[0]
32 self.header_size = FR.offset
33
34 #def __str__(self):
35 # return ("magic : 0x%X, cputype: 0x%X, subType: 0x%X, FileType: 0x%X, lc num: 0x%X, lc size: 0x%X, flags: 0x%X" % (self.magic,

Callers

nothing calls this directly

Calls 3

readMethod · 0.95
FileReaderClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected