Skip to content

tempfile ¤

Common helper and cache for pwndbg tempdir

Functions:

  • tempdir

    Returns a safe and unpredictable temporary directory with pwndbg prefix.

  • cachedir

    Returns and potentially creates a persistent safe cachedir location

tempdir ¤

tempdir() -> str

Returns a safe and unpredictable temporary directory with pwndbg prefix.

cachedir ¤

cachedir(namespace: str | None = None) -> str

Returns and potentially creates a persistent safe cachedir location based on XDG_CACHE_HOME or ~/.cache

Optionally creates a sub namespace inside the pwndbg cache folder.