class Metasm::OS::Process

represents a running process with a few information, and defines methods to get more interaction (memory, debugger)

Attributes

modules[RW]
path[RW]
pid[RW]

Public Class Methods

new(pid=nil) click to toggle source
# File metasm/os/main.rb, line 20
def initialize(pid=nil)
        @pid = pid
end

Public Instance Methods

inspect() click to toggle source
# File metasm/os/main.rb, line 28
def inspect
        '<Process:' + ["pid: #@pid", modules.to_a.map { |m| " #{'%X' % m.addr} #{m.path}" }].join("\n") + '>'
end
to_s() click to toggle source
# File metasm/os/main.rb, line 24
def to_s
        mod = File.basename(path) rescue nil
        "#{pid}: ".ljust(6) << (mod || '<unknown>')
end