vagd.cli

Attributes

DOGD_BOX

DOGD

QEGD_BOX

QEGD

SHGD

VAGD_BOX

VAGD

ATAKA_ENV

app

err_console

console

quote

Functions

_version(→ None)

main() → None)

add_virt(dependencies, vms, dependency, template, args)

_info(→ str)

template([binary, ip, port, output_exploit, output, ...])

creates a template

info([binary])

analyses the binary, prints checksec and .comment (often includes Distro and Compiler info)

_get_type(→ str)

_exec(cmd[, env])

_ssh(port, user)

ssh([user])

ssh to current vagd instance (must be in exploit dir)

_scp(port, user, source, target, recursive[, keyfile])

scp([source, target, recursive, user])

scp to from current vagd instance (must be in exploit dir)

clean()

clean current vagd instance (stop/kill/remove/destroy)

start()

Module Contents

vagd.cli.DOGD_BOX = 'Box.DOCKER_UBUNTU'
vagd.cli.DOGD = 'vm = Dogd(BINARY, image={box}, {args})  # Docker'
vagd.cli.QEGD_BOX = 'Box.QEMU_UBUNTU'
vagd.cli.QEGD = 'vm = Qegd(BINARY, img={box}, {args})  # Qemu'
vagd.cli.SHGD = "vm = Shgd(BINARY, user='user', host='localhost', port=22, {args})  # SSH"
vagd.cli.VAGD_BOX = 'Box.VAGRANT_JAMMY64'
vagd.cli.VAGD = 'vm = Vagd(BINARY, {box}, {args})  # Vagrant'
vagd.cli.ATAKA_ENV = Multiline-String
Show Value
"""# ataka envs
ATAKA  = os.getenv('TARGET_IP') is not None           # running on ataka
IP     = os.getenv('TARGET_IP', IP)                   # remote ip
EXTRA  = json.loads(os.getenv('TARGET_EXTRA', '[]'))  # flag ids"""
vagd.cli.app
vagd.cli.err_console
vagd.cli.console
vagd.cli.quote
vagd.cli._version(value: bool) None
vagd.cli.main(version: bool | None = typer.Option(None, '--version', '-v', help='Show current vagd version and exit.', callback=_version, is_eager=True)) None
vagd.cli.add_virt(dependencies: List[str], vms: List[str], dependency: str, template: str, args: Dict[str, str], multi=False, box='')
vagd.cli._info(binary, color=True) str
vagd.cli.template(binary: str | None = typer.Argument('', help='Binary to Exploit'), ip: str | None = typer.Argument('', help='Ip or Domain of the remote target'), port: int | None = typer.Argument(0, help='port of the remote target'), output_exploit: bool | None = typer.Option(False, '-e', help='output file of the template (also add +x) to exploit.py'), output: str | None = typer.Option('', '-o', help='output file of the template (also add +x), default stdout'), libc: str | None = typer.Option('', '--libc', '-l', help='add libc to template'), libs: bool | None = typer.Option(False, '--libs', help='download libraries from virt'), files: List[str] | None = typer.Option([], '--files', '-f', help='add files to remote'), aslr: bool | None = typer.Option(False, '--aslr', '-a', help='enable gdb ASLR (default: disabled for gdb)'), dogd: bool | None = typer.Option(False, '--dogd', '--docker', '-d', help='create docker template'), image: str | None = typer.Option(DOGD_BOX, '--image', help='docker image to use'), qegd: bool | None = typer.Option(False, '--qegd', '--qemu', '-q', help='create qemu template'), img: str | None = typer.Option(QEGD_BOX, '--img', help='qemu cloud image to use'), vagd: bool | None = typer.Option(False, '--vagd', '--vagrant', help='DEPRECATED: create vagrant template'), vbox: str | None = typer.Option(VAGD_BOX, '--vbox', help='vagrant box to use'), shgd: bool | None = typer.Option(False, '--shgd', '--ssh', '-s', help='create ssh template'), local: bool | None = typer.Option(False, '--local', help='create local template'), ataka: bool | None = typer.Option(False, '--ataka', help='create an ataka compatible template'), root: bool | None = typer.Option(False, '--root', '-r', help='create a root environment'), no_aliases: bool | None = typer.Option(False, '--no-aliases', help='no aliases in the template'), no_info: bool | None = typer.Option(False, '--no-info', help='no binary info'))

creates a template

vagd.cli.info(binary: str = typer.Argument(..., help='Binary to analyse'))

analyses the binary, prints checksec and .comment (often includes Distro and Compiler info)

vagd.cli._get_type() str
vagd.cli._exec(cmd: str, env: Dict = None)
vagd.cli._ssh(port, user)
vagd.cli.ssh(user: str | None = typer.Option(None, '--user', '-u', help='ssh user'))

ssh to current vagd instance (must be in exploit dir)

vagd.cli._scp(port: int, user: str, source: str, target: str, recursive: bool, keyfile: str = Pwngd.KEYFILE)
vagd.cli.scp(source: str = typer.Argument(..., help='source file'), target: str = typer.Argument('vagd:./', help='target file'), recursive: bool = typer.Option(False, '-r', '--recursive', help='recursive copy'), user: str | None = typer.Option(None, '--user', '-u', help='ssh user'))

scp to from current vagd instance (must be in exploit dir)

vagd.cli.clean()

clean current vagd instance (stop/kill/remove/destroy)

vagd.cli.start()