Class: Rex::Post::Process

Inherits:
Object
  • Object
show all
Defined in:
lib/rex/post/process.rb

Overview

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.

Class Method Summary collapse

Class Method Details

.egidObject



35
36
37
# File 'lib/rex/post/process.rb', line 35

def Process.egid
  getresgid()[1]
end

.egid=(id) ⇒ Object



38
39
40
# File 'lib/rex/post/process.rb', line 38

def Process.egid=(id)
  setresgid(-1, id, -1)
end

.euidObject



22
23
24
# File 'lib/rex/post/process.rb', line 22

def Process.euid
  getresuid()[1]
end

.euid=(id) ⇒ Object



25
26
27
# File 'lib/rex/post/process.rb', line 25

def Process.euid=(id)
  setresuid(-1, id, -1)
end

.getresuidObject

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/rex/post/process.rb', line 15

def Process.getresuid
  raise NotImplementedError
end

.gidObject



41
42
43
# File 'lib/rex/post/process.rb', line 41

def Process.gid
  getresgid()[0]
end

.gid=(id) ⇒ Object



44
45
46
# File 'lib/rex/post/process.rb', line 44

def Process.gid=(id)
  setresgid(id, -1, -1)
end

.pidObject

Raises:

  • (NotImplementedError)


48
49
50
# File 'lib/rex/post/process.rb', line 48

def Process.pid
  raise NotImplementedError
end

.ppidObject

Raises:

  • (NotImplementedError)


51
52
53
# File 'lib/rex/post/process.rb', line 51

def Process.ppid
  raise NotImplementedError
end

.setresuid(a, b, c) ⇒ Object

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/rex/post/process.rb', line 18

def Process.setresuid(a, b, c)
  raise NotImplementedError
end

.uidObject



28
29
30
# File 'lib/rex/post/process.rb', line 28

def Process.uid
  getresuid()[0]
end

.uid=(id) ⇒ Object



31
32
33
# File 'lib/rex/post/process.rb', line 31

def Process.uid=(id)
  setresuid(id, -1, -1)
end