# `pwnlib.tubes.serialtube` — Serial Ports

class pwnlib.tubes.serialtube.serialtube(port=None, baudrate=115200, convert_newlines=True, bytesize=8, parity='N', stopbits=1, xonxoff=False, rtscts=False, dsrdtr=False, *a, **kw)
  __init__(port=None, baudrate=115200, convert_newlines=True, bytesize=8, parity='N', stopbits=1, xonxoff=False, rtscts=False, dsrdtr=False, *a, **kw)
  can_recv_raw(timeout) → bool

    Should not be called directly. Returns True, if there is data available within the timeout, but ignores the buffer on the object.

  close()

    Closes the tube.

  connected_raw(direction)

    connected(direction = ‘any’) -> bool

    Should not be called directly. Returns True iff the tube is connected in the given direction.

  fileno() → int

    Returns the file number used for reading.

  recv_raw(numb) → str

    Should not be called directly. Receives data without using the buffer on the object.

    Unless there is a timeout or closed connection, this should always return data. In case of a timeout, it should return None, in case of a closed connection it should raise an `exceptions.EOFError`.

  send_raw(data)

    Should not be called directly. Sends data to the tube.

    Should return `exceptions.EOFError`, if it is unable to send any more, because of a closed tube.

  settimeout_raw(timeout)

    Should not be called directly. Sets the timeout for the tube.

  shutdown_raw(direction)

    Should not be called directly. Closes the tube for further reading or writing.