vagd.virts.docker_exec

Classes

DockerExecTube

Pwntools tube backed by an attached Docker exec socket.

Module Contents

class vagd.virts.docker_exec.DockerExecTube(api: Any, exec_id: str, stream: Any, tty: bool = False, timeout: Any = tube.default, level: str | None = None)

Bases: pwnlib.tubes.tube.tube

Pwntools tube backed by an attached Docker exec socket.

_HEADER_SIZE = 8
_api
exec_id
_stream
sock
tty = False
closed
_wire_buffer
_output_buffer
_decode_frames() None
recv_raw(numb: int) bytes | None

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: bytes) None

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.

can_recv_raw(timeout: float) bool

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.

connected_raw(direction: str) bool

connected(direction = ‘any’) -> bool

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

settimeout_raw(timeout: float | None) None

settimeout_raw(timeout)

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

shutdown_raw(direction: str) None

shutdown_raw(direction)

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

close() None

close()

Closes the tube.

fileno() int

fileno() -> int

Returns the file number used for reading.

poll(block: bool = False) int | None
property pid: int