Path: blob/master/lib/rex/post/meterpreter/extensions/stdapi/fs/io.rb
19612 views
# -*- coding: binary -*-12require 'rex/post/io'34module Rex5module Post6module Meterpreter7module Extensions8module Stdapi9module Fs1011##12#13# The IO class acts as a base class for things that would normally implement14# the IO interface. The methods it implements are for general operations that15# are common to all channels, such as read, write, and close.16#17##18class IO < Rex::Post::IO1920#21# Read the specified number of bytes from the channel.22#23def sysread(length = nil)24self.filed.read(length)25end2627alias read sysread2829#30# Writes the supplied buffer to the channel.31#32def syswrite(buf)33self.filed.write(buf)34end3536alias write syswrite3738#39# Closes the channel.40#41def close42self.filed.close43end4445end4647end; end; end; end; end; end484950