Class: Rex::Post::Meterpreter::Extensions::Stdapi::Railgun::LibraryFunction
- Inherits:
-
Object
- Object
- Rex::Post::Meterpreter::Extensions::Stdapi::Railgun::LibraryFunction
- Defined in:
- lib/rex/post/meterpreter/extensions/stdapi/railgun/library_function.rb
Overview
represents one function, e.g. MessageBoxW
Constant Summary collapse
- @@allowed_datatypes =
{ 'VOID' => ['return'], 'BOOL' => ['in', 'return'], 'BYTE' => ['in', 'return'], 'WORD' => ['in', 'return'], 'DWORD' => ['in', 'return'], 'LPVOID' => ['in', 'return'], # sf: for specifying a memory address (e.g. VirtualAlloc/HeapAlloc/...) where we don't want to back it up with actual mem ala PBLOB 'ULONG_PTR' => ['in', 'return'], 'PDWORD' => ['in', 'out', 'inout'], # todo: support for functions that return pointers to strings 'PULONG_PTR' => ['in', 'out', 'inout', 'return'], 'PWCHAR' => ['in', 'out', 'inout', 'return'], 'PCHAR' => ['in', 'out', 'inout', 'return'], '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.
-
#remote_name ⇒ Object
readonly
Returns the value of attribute remote_name.
-
#return_type ⇒ Object
readonly
Returns the value of attribute return_type.
Instance Method Summary collapse
-
#initialize(return_type, params, remote_name, calling_conv = 'stdcall') ⇒ LibraryFunction
constructor
A new instance of LibraryFunction.
Constructor Details
#initialize(return_type, params, remote_name, calling_conv = 'stdcall') ⇒ LibraryFunction
Returns a new instance of LibraryFunction.
58 59 60 61 62 63 64 65 66 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/library_function.rb', line 58 def initialize(return_type, params, remote_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 @remote_name = remote_name @calling_conv = calling_conv end |
Instance Attribute Details
#calling_conv ⇒ Object (readonly)
Returns the value of attribute calling_conv.
56 57 58 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/library_function.rb', line 56 def calling_conv @calling_conv end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
56 57 58 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/library_function.rb', line 56 def params @params end |
#remote_name ⇒ Object (readonly)
Returns the value of attribute remote_name.
56 57 58 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/library_function.rb', line 56 def remote_name @remote_name end |
#return_type ⇒ Object (readonly)
Returns the value of attribute return_type.
56 57 58 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/library_function.rb', line 56 def return_type @return_type end |