vagd.virts.dogd =============== .. py:module:: vagd.virts.dogd Classes ------- .. autoapisummary:: vagd.virts.dogd.Dogd Module Contents --------------- .. py:class:: Dogd(binary: str, image: str = DEFAULT_IMAGE, user: str = DEFAULT_USER, forward: Optional[Dict[str, int]] = None, packages: Optional[List[str]] = None, symbols: bool = True, rm: bool = True, ex: bool = False, fast: bool = False, alpine: bool = False, **kwargs: Any) Bases: :py:obj:`vagd.virts.shgd.Shgd` | Docker virtualization for pwntools :param binary: binary to execute :param image: docker base image :param user: name of user on docker container :param forward: Dictionary of forwarded ports, needs to follow docker api format: 'hostport/(tcp|udp)' : guestport :param packages: packages to install on the container :param symbols: additionally install libc6 debug symbols (also updates libc6) :param ex: if experimental features, e.g. alpine, gdbserver should be enabled :param rm: remove container after exit :param alpine: if the conainter is alpine (also autochecks image name) :param fast: mounts libs locally for faster symbol extraction (experimental) NOT COMPATIBLE WITH ALPINE :param kwargs: parameters to pass through to super | SSH from cmd .. code-block:: bash vagd ssh # or ssh -o "StrictHostKeyChecking=no" -i ~/.share/local/vagd/keyfile -p $(cut .vagd/docker.lock -d":" -f 2) vagd@0.0.0.0 | connect with docker exec .. code-block:: bash docker exec -it $(cut ./.vagd/docker.lock -d":" -f 1) /bin/bash | Kill from cmd: .. code-block:: bash vagd clean #or docker kill $(cut ./.vagd/docker.lock -d":" -f 1) | Docker containers are automatically removed after they stop | Docker images need to be manually removed from docker | Dockerfiles are stored in home directory to allow caching ~/.share/local/vagd/docker//Dockerfile .. code-block:: bash docker images # list images docker rmi # remove correct image .. py:attribute:: _image :type: str .. py:attribute:: _name :type: str .. py:attribute:: _user :type: str .. py:attribute:: _port :type: int .. py:attribute:: _packages :type: List[str] .. py:attribute:: _client :type: docker.client .. py:attribute:: _id :type: str .. py:attribute:: _dockerdir :type: str .. py:attribute:: _dockerfile :type: str .. py:attribute:: _isalpine :type: bool .. py:attribute:: _rm :type: bool .. py:attribute:: _ex :type: bool .. py:attribute:: _forward :type: Dict[str, int] .. py:attribute:: _symbols :type: bool .. py:attribute:: VAGD_PREFIX :value: 'vagd-' .. py:attribute:: TYPE :value: 'dogd' .. py:attribute:: DOCKERHOME .. py:attribute:: DEFAULT_USER :value: 'vagd' .. py:attribute:: DEFAULT_PORT :value: 2222 .. py:attribute:: DEFAULT_IMAGE :value: 'ubuntu:noble' .. py:attribute:: DEFAULT_PACKAGES :value: ['gdbserver', 'python3', 'sudo', 'openssh-server'] .. py:attribute:: LOCKFILE :value: './.vagd/docker.lock' .. py:method:: _create_dockerfile() .. py:method:: _create_docker_instance() .. py:method:: _build_image() .. py:method:: _vm_create() .. py:method:: _vm_setup() -> None pass