Class: Rex::Post::Meterpreter::Extensions::Stdapi::Fs::IO

Inherits:
IO
  • Object
show all
Defined in:
lib/rex/post/meterpreter/extensions/stdapi/fs/io.rb

Overview

The IO class acts as a base class for things that would normally implement the IO interface. The methods it implements are for general operations that are common to all channels, such as read, write, and close.

Direct Known Subclasses

File

Instance Method Summary collapse

Methods inherited from IO

#binmode, #close_read, #close_write, #closed?, #each, #each_byte, #each_line, #eof, #eof?, #fcntl, #flush, #fsync, #getc, #gets, #ioctl, #isatty, #lineno, #pos, #print, #printf, #putc, #puts, #readchar, #readline, #readlines, #rewind, #seek, #stat, #sync, #sysseek, #tell, #tty?, #ungetc

Instance Method Details

#closeObject

Closes the channel.



42
43
44
# File 'lib/rex/post/meterpreter/extensions/stdapi/fs/io.rb', line 42

def close
  self.filed.close
end

#sysread(length = nil) ⇒ Object Also known as: read

Read the specified number of bytes from the channel.



24
25
26
# File 'lib/rex/post/meterpreter/extensions/stdapi/fs/io.rb', line 24

def sysread(length = nil)
  self.filed.read(length)
end

#syswrite(buf) ⇒ Object Also known as: write

Writes the supplied buffer to the channel.



33
34
35
# File 'lib/rex/post/meterpreter/extensions/stdapi/fs/io.rb', line 33

def syswrite(buf)
  self.filed.write(buf)
end