Files
metasploit-gs/lib/rex/post/process.rb
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
932 B
Ruby
Raw Normal View History

# -*- coding: binary -*-
2005-04-03 21:52:10 +00:00
module Rex
module Post
2005-11-15 05:22:13 +00:00
###
#
# This class performs basic process operations against a process running on a
# remote machine via the post-exploitation mechanisms. Refer to the Ruby
# documentation for expected behaviors.
#
###
2005-04-03 21:52:10 +00:00
class Process
def Process.getresuid
raise NotImplementedError
end
def Process.setresuid(a, b, c)
raise NotImplementedError
end
2013-08-30 16:28:33 -05:00
2005-04-03 21:52:10 +00:00
def Process.euid
getresuid()[1]
end
def Process.euid=(id)
setresuid(-1, id, -1)
end
def Process.uid
getresuid()[0]
end
def Process.uid=(id)
setresuid(id, -1, -1)
end
2013-08-30 16:28:33 -05:00
2005-04-03 21:52:10 +00:00
def Process.egid
getresgid()[1]
end
def Process.egid=(id)
setresgid(-1, id, -1)
end
def Process.gid
getresgid()[0]
end
def Process.gid=(id)
setresgid(id, -1, -1)
end
2013-08-30 16:28:33 -05:00
2005-04-03 23:14:33 +00:00
def Process.pid
2005-04-04 01:33:26 +00:00
raise NotImplementedError
2005-04-03 23:14:33 +00:00
end
def Process.ppid
2005-04-04 01:33:26 +00:00
raise NotImplementedError
2005-04-03 23:14:33 +00:00
end
2005-04-03 21:52:10 +00:00
end
2012-04-15 23:35:38 -05:00
end; end # Post/Rex