Module: Msf::Post::Windows::Railgun

Defined in:
lib/msf/core/post/windows/railgun.rb

Instance Method Summary collapse

Instance Method Details

#lookup_error(err_code, filter_regex = nil) ⇒ Object

Returns an array of windows error code names for a given windows error code matching err_code


37
38
39
40
41
# File 'lib/msf/core/post/windows/railgun.rb', line 37

def lookup_error (err_code, filter_regex=nil)
  select_const_names(err_code, /^ERROR_/).select do |name|
    name =~ filter_regex
  end
end

#memread(address, length) ⇒ Object

Read length bytes starting at address


46
47
48
# File 'lib/msf/core/post/windows/railgun.rb', line 46

def memread(address, length)
  railgun.memread(address, length)
end

#memwrite(address, length) ⇒ Object

Write length bytes starting at address


53
54
55
# File 'lib/msf/core/post/windows/railgun.rb', line 53

def memwrite(address, length)
  railgun.memwrite(address, length)
end

#pointer_sizeObject

Returns the pointer size of the remote system


64
65
66
# File 'lib/msf/core/post/windows/railgun.rb', line 64

def pointer_size
  railgun.util.pointer_size
end

#railgunObject


57
58
59
# File 'lib/msf/core/post/windows/railgun.rb', line 57

def railgun
  client.railgun
end

#select_const_names(winconst, filter_regex = nil) ⇒ Object

Return an array of windows constants names matching winconst


30
31
32
# File 'lib/msf/core/post/windows/railgun.rb', line 30

def select_const_names(winconst, filter_regex=nil)
  railgun.constant_manager.select_const_names(winconst, filter_regex)
end