(self, attribute)
| 258 | return bool(self.ValidAttributes & attribute) |
| 259 | |
| 260 | def get_attribute(self, attribute): |
| 261 | if not self.is_allocated(attribute): |
| 262 | raise ValueError("Cannot get non-allocated attribute <{0}>".format(attribute)) |
| 263 | offset = ctypes.sizeof(self) |
| 264 | for sflag, struct in self.ATTRIBUTE_BY_FLAG: |
| 265 | if sflag == attribute: |
| 266 | # print("Attr {0:#x} was at offet {1:#x}".format(attribute, offset)) |
| 267 | return struct.from_address(ctypes.addressof(self) + offset) |
| 268 | elif self.is_allocated(sflag): |
| 269 | offset += ctypes.sizeof(struct) |
| 270 | raise ValueError("ALPC Attribute <{0}> not found :(".format(attribute)) |
| 271 | |
| 272 | def _extract_alpc_attributes_values(self, value): |
| 273 | attrs = [] |
no test coverage detected