Interface to a thread in another process.
|
|
__init__(self,
dwThreadId,
hThread=None,
process=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
|
|
|
|
__get_pid_by_scanning(self)
Internally used by get_pid(). |
|
|
|
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
|
|
Process
|
|
|
int
|
get_pid(self)
Returns:
Parent process global ID. |
|
|
|
int
|
get_tid(self)
Returns:
Thread global ID. |
|
|
|
str
|
get_name(self)
Returns:
Thread name, or None if the thread is nameless. |
|
|
|
|
set_name(self,
name=None)
Sets the thread's name. |
|
|
|
bool
|
is_alive(self)
Returns:
True if the thread if currently running. |
|
|
|
int
|
get_exit_code(self)
Returns:
Thread exit code, or STILL_ACTIVE if it's still alive. |
|
|
|
TEB
|
|
|
|
wait(self,
dwTimeout=None)
Waits for the thread to finish executing. |
|
|
|
|
kill(self,
dwExitCode=0)
Terminates the thread execution. |
|
|
|
int
|
suspend(self)
Suspends the thread execution. |
|
|
|
int
|
resume(self)
Resumes the thread execution. |
|
|
|
dict( str → int )
|
get_context(self,
ContextFlags=65599)
Returns:
Dictionary mapping register names to their values. |
|
|
|
|
set_context(self,
context)
Sets the values of the registers. |
|
|
|
int
|
get_pc(self)
Returns:
Value of the program counter register. |
|
|
|
|
set_pc(self,
pc)
Sets the value of the program counter register. |
|
|
|
int
|
get_sp(self)
Returns:
Value of the stack pointer register. |
|
|
|
|
set_sp(self,
sp)
Sets the value of the stack pointer register. |
|
|
|
int
|
get_fp(self)
Returns:
Value of the frame pointer register. |
|
|
|
|
set_fp(self,
fp)
Sets the value of the frame pointer register. |
|
|
|
int
|
get_register(self,
register)
Returns:
Value of the requested register. |
|
|
|
int
|
set_register(self,
register,
value)
Sets the value of a specific register. |
|
|
|
int
|
get_flags(self,
FlagMask=4294967295)
Returns:
Flags register contents, optionally masking out some bits. |
|
|
|
|
set_flags(self,
eflags,
FlagMask=4294967295)
Sets the flags register, optionally masking some bits. |
|
|
|
bool
|
get_flag_value(self,
FlagBit)
Returns:
Boolean value of the requested flag. |
|
|
|
|
set_flag_value(self,
FlagBit,
FlagValue)
Sets a single flag, leaving the others intact. |
|
|
|
bool
|
get_zf(self)
Returns:
Boolean value of the Zero flag. |
|
|
|
bool
|
get_cf(self)
Returns:
Boolean value of the Carry flag. |
|
|
|
bool
|
get_sf(self)
Returns:
Boolean value of the Sign flag. |
|
|
|
bool
|
get_df(self)
Returns:
Boolean value of the Direction flag. |
|
|
|
bool
|
get_tf(self)
Returns:
Boolean value of the Trap flag. |
|
|
|
|
clear_zf(self)
Clears the Zero flag. |
|
|
|
|
clear_cf(self)
Clears the Carry flag. |
|
|
|
|
clear_sf(self)
Clears the Sign flag. |
|
|
|
|
clear_df(self)
Clears the Direction flag. |
|
|
|
|
clear_tf(self)
Clears the Trap flag. |
|
|
|
|
set_zf(self)
Sets the Zero flag. |
|
|
|
|
set_cf(self)
Sets the Carry flag. |
|
|
|
|
set_sf(self)
Sets the Sign flag. |
|
|
|
|
set_df(self)
Sets the Direction flag. |
|
|
|
|
set_tf(self)
Sets the Trap flag. |
|
|
|
|
open_handle(self,
dwDesiredAccess=2035711)
Opens a new handle to the thread. |
|
|
|
|
close_handle(self)
Closes the handle to the thread. |
|
|
|
ThreadHandle
|
|
|
list of tuple( long, int, str, str )
|
|
|
list of tuple( long, int, str, str )
|
|
|
list of tuple( long, int, str, str )
|
|
|
str
|
|
|
tuple( int, int )
|
|
|
tuple( int, int )
|
|
|
tuple of tuple( int, int, str )
|
|
|
tuple of tuple( int, int, str )
|
|
|
str
|
|
|
tuple( int... )
|
|
|
str
|
|
|
tuple( int... )
|
|
|
str
|
|
|
dict( str → str )
|
|
|
dict( str → str )
|
|
|
str
|
|