Pure-python implementation of simple netcat-like functionality