class Rex::Proto::Rmi::Model::ReturnData
This class provides a representation of an RMI return data stream
Attributes
return_value[RW]
@!attribute return value
@return [Rex::Proto::Rmi::Model::ReturnValue] the return value
stream_id[RW]
@!attribute stream_id
@return [Fixnum] the stream id
Private Instance Methods
decode_return_value(io)
click to toggle source
decode_stream_id(io)
click to toggle source
Reads the stream id from the IO
@param io [IO] the IO
to read from @return [String] @raise [Rex::Proto::Rmi::DecodeError] if fails to decode the stream id
# File lib/rex/proto/rmi/model/return_data.rb, line 23 def decode_stream_id(io) stream_id = read_byte(io) unless stream_id == RETURN_DATA raise Rex::Proto::Rmi::DecodeError, 'Failed to decode ReturnData stream id' end stream_id end
encode_return_value()
click to toggle source
Encodes the return_value
field
@return [String]
# File lib/rex/proto/rmi/model/return_data.rb, line 52 def encode_return_value return_value.encode end
encode_stream_id()
click to toggle source
Encodes the stream_id
field
@return [String]
# File lib/rex/proto/rmi/model/return_data.rb, line 45 def encode_stream_id [stream_id].pack('C') end