(self, name, val)
| 1218 | return self.pe.__data__[offset:end] |
| 1219 | |
| 1220 | def __setattr__(self, name, val): |
| 1221 | |
| 1222 | if name == "Characteristics": |
| 1223 | section_flags = retrieve_flags(SECTION_CHARACTERISTICS, "IMAGE_SCN_") |
| 1224 | |
| 1225 | # Set the section's flags according to the Characteristics member |
| 1226 | set_flags(self, val, section_flags) |
| 1227 | |
| 1228 | elif "IMAGE_SCN_" in name and hasattr(self, name): |
| 1229 | if val: |
| 1230 | self.__dict__["Characteristics"] |= SECTION_CHARACTERISTICS[name] |
| 1231 | else: |
| 1232 | self.__dict__["Characteristics"] ^= SECTION_CHARACTERISTICS[name] |
| 1233 | |
| 1234 | self.__dict__[name] = val |
| 1235 | |
| 1236 | def get_rva_from_offset(self, offset): |
| 1237 | return offset - self.get_PointerToRawData_adj() + self.get_VirtualAddress_adj() |
nothing calls this directly
no test coverage detected