Class: Rex::Post::Meterpreter::Extensions::Stdapi::Railgun::DLLFunction
- Inherits:
-
Object
- Object
- Rex::Post::Meterpreter::Extensions::Stdapi::Railgun::DLLFunction
- Defined in:
- lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_function.rb
Overview
represents one function, e.g. MessageBoxW
Constant Summary collapse
- @@allowed_datatypes =
{ "VOID" => ["return"], "BOOL" => ["in", "return"], "DWORD" => ["in", "return"], "WORD" => ["in", "return"], "BYTE" => ["in", "return"], "LPVOID" => ["in", "return"], # sf: for specifying a memory address (e.g. VirtualAlloc/HeapAlloc/...) where we dont want ot back it up with actuall mem ala PBLOB "HANDLE" => ["in", "return"], "PDWORD" => ["in", "out", "inout"], # todo: support for functions that return pointers to strings "PWCHAR" => ["in", "out", "inout"], "PCHAR" => ["in", "out", "inout"], "PBLOB" => ["in", "out", "inout"], }.freeze
- @@allowed_convs =
["stdcall", "cdecl"]
- @@directions =
["in", "out", "inout", "return"].freeze
Instance Attribute Summary collapse
-
#calling_conv ⇒ Object
readonly
Returns the value of attribute calling_conv.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#return_type ⇒ Object
readonly
Returns the value of attribute return_type.
-
#windows_name ⇒ Object
readonly
Returns the value of attribute windows_name.
Instance Method Summary collapse
-
#initialize(return_type, params, windows_name, calling_conv = "stdcall") ⇒ DLLFunction
constructor
A new instance of DLLFunction.
Constructor Details
#initialize(return_type, params, windows_name, calling_conv = "stdcall") ⇒ DLLFunction
Returns a new instance of DLLFunction.
57 58 59 60 61 62 63 64 65 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_function.rb', line 57 def initialize(return_type, params, windows_name, calling_conv="stdcall") check_return_type(return_type) # we do error checking as early as possible so the library is easier to use check_params(params) check_calling_conv(calling_conv) @return_type = return_type @params = params @windows_name = windows_name @calling_conv = calling_conv end |
Instance Attribute Details
#calling_conv ⇒ Object (readonly)
Returns the value of attribute calling_conv.
55 56 57 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_function.rb', line 55 def calling_conv @calling_conv end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
55 56 57 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_function.rb', line 55 def params @params end |
#return_type ⇒ Object (readonly)
Returns the value of attribute return_type.
55 56 57 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_function.rb', line 55 def return_type @return_type end |
#windows_name ⇒ Object (readonly)
Returns the value of attribute windows_name.
55 56 57 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_function.rb', line 55 def windows_name @windows_name end |