2005-12-17 06:46:23 +00:00
|
|
|
#!/usr/bin/env ruby
|
2005-04-16 07:29:06 +00:00
|
|
|
|
|
|
|
module Rex
|
|
|
|
module Post
|
|
|
|
|
2005-11-15 05:22:13 +00:00
|
|
|
###
|
|
|
|
#
|
|
|
|
# This class provides generalized methods for interacting with a thread
|
|
|
|
# running in a process on a remote machine via a post-exploitation client.
|
|
|
|
#
|
|
|
|
###
|
2005-04-16 07:29:06 +00:00
|
|
|
class Thread
|
2005-11-15 05:22:13 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Suspend the remote thread.
|
|
|
|
#
|
2005-04-16 07:29:06 +00:00
|
|
|
def suspend
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
2005-11-15 05:22:13 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Resume execution of the remote thread.
|
|
|
|
#
|
2005-04-16 07:29:06 +00:00
|
|
|
def resume
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
2005-11-15 05:22:13 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Terminate the remote thread.
|
|
|
|
#
|
2005-04-16 07:29:06 +00:00
|
|
|
def terminate
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
2005-11-15 05:22:13 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Query architecture-specific register state.
|
|
|
|
#
|
2005-04-16 07:29:06 +00:00
|
|
|
def query_regs
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
2005-11-15 05:22:13 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Set architecture-specific register state.
|
|
|
|
#
|
2005-04-16 07:29:06 +00:00
|
|
|
def set_regs
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
2005-11-15 05:22:13 +00:00
|
|
|
#
|
|
|
|
# Close resources associated with the thread.
|
|
|
|
#
|
2005-04-16 07:29:06 +00:00
|
|
|
def close
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2008-10-19 21:03:39 +00:00
|
|
|
end; end
|