Class: Rex::Proto::DRDA::Packet::SERVER_PACKET

Inherits:
Array
  • Object
show all
Defined in:
lib/rex/proto/drda/packet.rb

Instance Method Summary collapse

Instance Method Details

#read(str = "") ⇒ Object

Raises:



177
178
179
180
181
182
183
184
185
186
187
# File 'lib/rex/proto/drda/packet.rb', line 177

def read(str="")
  raise DRDA::Error, "Input isn't a String." if !str.kind_of? String
  self.clear
  i = 0
  while(i < str.size)
    this_ddm = BASIC_DDM.new.read(str[i,str.size])
    self << this_ddm
    i += this_ddm.to_s.size
  end
  return self
end

#szObject



190
# File 'lib/rex/proto/drda/packet.rb', line 190

def sz; self.to_s.size; end

#to_sObject



189
# File 'lib/rex/proto/drda/packet.rb', line 189

def to_s; self.join; end