Class: Rex::Post::Meterpreter::Extensions::Stdapi::Fs::Mount
- Inherits:
-
Object
- Object
- Rex::Post::Meterpreter::Extensions::Stdapi::Fs::Mount
- Defined in:
- lib/rex/post/meterpreter/extensions/stdapi/fs/mount.rb
Constant Summary collapse
- DRIVE_TYPES =
Used when matching against windows drive types
[ :unknown, :no_root, :removable, :fixed, :remote, :cdrom, :ramdisk ]
Instance Attribute Summary collapse
-
#client ⇒ Object
protected
:nodoc:.
Instance Method Summary collapse
-
#initialize(client) ⇒ Mount
constructor
A new instance of Mount.
- #show_mount ⇒ Object
Constructor Details
#initialize(client) ⇒ Mount
Returns a new instance of Mount.
25 26 27 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/fs/mount.rb', line 25 def initialize(client) self.client = client end |
Instance Attribute Details
#client ⇒ Object (protected)
:nodoc:
51 52 53 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/fs/mount.rb', line 51 def client @client end |
Instance Method Details
#show_mount ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/fs/mount.rb', line 29 def show_mount request = Packet.create_request(COMMAND_ID_STDAPI_FS_MOUNT_SHOW) response = client.send_request(request) results = [] response.each(TLV_TYPE_MOUNT) do |d| results << { name: d.get_tlv_value(TLV_TYPE_MOUNT_NAME), type: DRIVE_TYPES[d.get_tlv_value(TLV_TYPE_MOUNT_TYPE)], user_space: d.get_tlv_value(TLV_TYPE_MOUNT_SPACE_USER), total_space: d.get_tlv_value(TLV_TYPE_MOUNT_SPACE_TOTAL), free_space: d.get_tlv_value(TLV_TYPE_MOUNT_SPACE_FREE), unc: d.get_tlv_value(TLV_TYPE_MOUNT_UNCPATH) } end results end |