(self)
| 510 | return [h for h in windows.system.handles if h.dwProcessId == pid] |
| 511 | |
| 512 | def __del__(self): |
| 513 | super(Process, self).__del__() |
| 514 | # Same logic that AutoHandle.__del__ for Process.limited_handle |
| 515 | # Assert that Process inherit AutoHandle |
| 516 | # sys.path is not None -> check if python shutdown |
| 517 | if sys.path is not None and hasattr(self, "_limited_handle") and self._limited_handle: |
| 518 | # Prevent some bug where dbgprint might be None when __del__ is called in a closing process |
| 519 | # This line is bad -> it reopens a handle closed by 'super(Process, self).__del__()' ._. |
| 520 | dbgprint("Closing limited handle {0} for {1}".format(hex(self._limited_handle), self), "HANDLE") if dbgprint is not None else None |
| 521 | self._close_function(self._limited_handle) |
| 522 | |
| 523 | class Thread(utils.AutoHandle): |
| 524 | def open_token(self, flags=MAXIMUM_ALLOWED, as_self=False): |
nothing calls this directly
no outgoing calls
no test coverage detected