(self, data)
| 17 | class 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, |
nothing calls this directly
no test coverage detected