module Rex::Proto::TFTP

Constants

ERRCODES
ErrAccessViolation
ErrDiskFull
ErrFailedOptNegotiation
ErrFileExists
ErrFileNotFound
ErrIllegalOperation
ErrNoSuchUser
ErrUnknownTransferId
OPCODES
OpAck
OpData
OpError
OpOptAck
OpRead
OpWrite

Public Class Methods

get_string(data) click to toggle source

Little util function

# File lib/rex/proto/tftp/server.rb, line 11
def self.get_string(data)
  idx = data.index("\x00")
  return nil if not idx
  ret = data.slice!(0, idx)
  # Slice off the nul byte.
  data.slice!(0,1)
  ret
end