Class: Rex::Post::Meterpreter::Extensions::Stdapi_Fs::Stdapi_Fs
- Inherits:
-
Rex::Post::Meterpreter::Extension
- Object
- Rex::Post::Meterpreter::Extension
- Rex::Post::Meterpreter::Extensions::Stdapi_Fs::Stdapi_Fs
- Defined in:
- lib/rex/post/meterpreter/extensions/stdapi_fs/stdapi_fs.rb
Instance Attribute Summary
Attributes inherited from Rex::Post::Meterpreter::Extension
Class Method Summary collapse
Instance Method Summary collapse
-
#brand(klass) ⇒ Object
Sets the client instance on a duplicated copy of the supplied class.
-
#dir ⇒ Object
Returns a copy of the Dir class.
-
#file ⇒ Object
Returns a copy of the File class.
-
#filestat ⇒ Object
Returns a copy of the FileStat class.
-
#initialize(client) ⇒ Stdapi_Fs
constructor
Initializes an instance of the Standard API (Fs Namespace) extension.
Constructor Details
#initialize(client) ⇒ Stdapi_Fs
Initializes an instance of the Standard API (Fs Namespace) extension.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/rex/post/meterpreter/extensions/stdapi_fs/stdapi_fs.rb', line 33 def initialize(client) super(client, 'stdapi_fs') # Alias the following things on the client object so that they # can be directly referenced client.register_extension_aliases( [ { 'name' => 'fs', 'ext' => ObjectAliases.new( { 'dir' => self.dir, 'file' => self.file, 'filestat' => self.filestat, 'mount' => Fs::Mount.new(client) }) }, ]) end |
Class Method Details
.extension_id ⇒ Object
26 27 28 |
# File 'lib/rex/post/meterpreter/extensions/stdapi_fs/stdapi_fs.rb', line 26 def self.extension_id Rex::Post::Meterpreter::Extensions::Stdapi::EXTENSION_ID_STDAPI end |
Instance Method Details
#brand(klass) ⇒ Object
Sets the client instance on a duplicated copy of the supplied class.
56 57 58 59 60 |
# File 'lib/rex/post/meterpreter/extensions/stdapi_fs/stdapi_fs.rb', line 56 def brand(klass) klass = klass.dup klass.client = self.client return klass end |
#dir ⇒ Object
Returns a copy of the Dir class.
65 66 67 |
# File 'lib/rex/post/meterpreter/extensions/stdapi_fs/stdapi_fs.rb', line 65 def dir brand(Rex::Post::Meterpreter::Extensions::Stdapi_Fs::Fs::Dir) end |
#file ⇒ Object
Returns a copy of the File class.
72 73 74 |
# File 'lib/rex/post/meterpreter/extensions/stdapi_fs/stdapi_fs.rb', line 72 def file brand(Rex::Post::Meterpreter::Extensions::Stdapi_Fs::Fs::File) end |
#filestat ⇒ Object
Returns a copy of the FileStat class.
79 80 81 |
# File 'lib/rex/post/meterpreter/extensions/stdapi_fs/stdapi_fs.rb', line 79 def filestat brand(Rex::Post::Meterpreter::Extensions::Stdapi_Fs::Fs::FileStat) end |