commands ¤
Modules:
-
ai–This command sends information on the current debugging context to OpenAI's
-
argv– -
aslr– -
asm– -
attachp– -
auxv– -
binder– -
binja– -
binja_functions– -
branch– -
canary– -
checksec– -
comments– -
config–Dumps all pwndbg-specific configuration points.
-
context– -
cpsr– -
cyclic– -
cymbol–Add, load, show, edit, or delete symbols for custom structures.
-
dev– -
distance– -
dt– -
dumpargs– -
elf– -
flags– -
gdt– -
ghidra– -
godbg– -
got– -
got_tracking– -
hex2ptr– -
hexdump– -
hijack_fd– -
ida– -
ignore–Ignoring a breakpoint
-
integration– -
ipython_interactive–Command to start an interactive IPython prompt.
-
jemalloc– -
kbase– -
kchecksec– -
kcmdline– -
kconfig– -
killthreads– -
klookup– -
knft– -
kversion– -
leakfind–Find a chain of leaks given some starting address.
-
libcinfo– -
linkmap– -
memoize– -
misc– -
mmap– -
mprotect– -
nearpc– -
next–Stepping until an event occurs
-
onegadget– -
p2p– -
patch– -
pcplist– -
peda– -
pie– -
plist– -
probeleak– -
procinfo– -
profiler–Utilities for profiling pwndbg.
-
ptmalloc2– -
ptmalloc2_tracking– -
radare2– -
reload– -
retaddr– -
rizin– -
rop– -
ropper– -
search– -
segments– -
shell–Wrapper for shell commands.
-
sigreturn– -
slab–Commands for dealing with Linux kernel slab allocator. Currently, only SLUB is supported.
-
spray– -
start–Launches the target process after setting a breakpoint at a convenient
-
strings– -
telescope–Prints out pointer chains starting at some address in memory.
-
tips– -
tls–Command to print the information of the current Thread Local Storage (TLS).
-
valist– -
version–Implements version and bugreport commands.
-
vmmap–Command to print the virtual memory map a la /proc/self/maps.
-
windbg–Compatibility functionality for Windbg users.
-
xinfo– -
xor–
Classes:
-
CommandCategory– -
Command–Generic command wrapper
-
ArgparsedCommand–Adds documentation and offloads parsing for a Command via argparse
Functions:
-
fix–Fix a single command-line argument coming from the CLI.
-
fix_reraise– -
fix_reraise_arg–fix_reraise wrapper for evaluating command arguments
-
fix_int– -
fix_int_reraise– -
fix_int_reraise_arg–fix_int_reraise wrapper for evaluating command arguments
-
func_name– -
OnlyWhenLocal– -
OnlyWithFile– -
OnlyWhenQemuKernel– -
OnlyWhenUserspace– -
OnlyWithKernelDebugSyms– -
OnlyWhenPagingEnabled– -
OnlyWhenRunning– -
OnlyWithTcache– -
OnlyWhenHeapIsInitialized– -
OnlyWithResolvedHeapSyms– -
sloppy_gdb_parse–This function should be used as
argparse.ArgumentParser.add_argument method'stypehelper. -
AddressExpr–Parses an address expression. Returns an int.
-
HexOrAddressExpr–Parses string as hexadecimal int or an address expression. Returns an int.
-
load_commands–
Attributes:
-
log– -
T– -
P– -
commands(list[Command]) – -
command_names(set[str]) – -
GDB_BUILTIN_COMMANDS– -
pwndbg_is_reloading–
CommandCategory ¤
Command ¤
Command(
function: Callable[..., str | None],
prefix: bool = False,
command_name: str | None = None,
shell: bool = False,
is_alias: bool = False,
aliases: list[str] = [],
category: CommandCategory = MISC,
doc: str | None = None,
)
Generic command wrapper
Methods:
-
split_args–Split a command-line string from the user into arguments.
-
invoke–Invoke the command with an argument string
-
check_repeated–Keep a record of all commands which come from the TTY.
-
__call__–
Attributes:
-
builtin_override_whitelist(set[str]) – -
history(dict[int, str]) – -
is_alias– -
aliases– -
category– -
shell– -
doc– -
handle– -
function– -
__name__– -
repeat–
builtin_override_whitelist class-attribute instance-attribute ¤
builtin_override_whitelist: set[str] = {
"up",
"down",
"search",
"pwd",
"start",
"starti",
"ignore",
}
split_args ¤
Split a command-line string from the user into arguments.
This is only used by pwndbg/commands/shell.py which is deprecated. Usually _ArgparsedCommand.split_args is called.
Returns:
-
list[str]–A
(tuple, dict), in the form of*args, **kwargs. -
dict[Any, Any]–The contents of the tuple/dict are undefined.
check_repeated ¤
Keep a record of all commands which come from the TTY.
Returns:
-
bool–True if this command was executed by the user just hitting "enter".
ArgparsedCommand ¤
ArgparsedCommand(
parser_or_desc: str | ArgumentParser,
category: CommandCategory,
command_name: str | None = None,
aliases: list[str] = [],
only_debuggers: set[DebuggerType] = None,
exclude_debuggers: set[DebuggerType] = None,
)
Adds documentation and offloads parsing for a Command via argparse
Methods:
-
__call__–
Attributes:
-
parser– -
aliases– -
category– -
only_debuggers– -
exclude_debuggers–
fix ¤
fix(
arg: str | Value,
sloppy: bool = False,
quiet: bool = True,
reraise: bool = False,
) -> str | Value | None
Fix a single command-line argument coming from the CLI.
Parameters:
-
arg(str | Value) –Original string representation (e.g. '0', '$rax', '$rax+44')
-
sloppy(bool, default:False) –If
argcannot be evaluated, returnarg. (default: False) -
quiet(bool, default:True) –If an error occurs, suppress it. (default: True)
-
reraise(bool, default:False) –If an error occurs, raise the exception. (default: False)
Returns:
fix_reraise_arg ¤
fix_reraise_arg(arg) -> Value
fix_reraise wrapper for evaluating command arguments
fix_int_reraise_arg ¤
fix_int_reraise wrapper for evaluating command arguments
OnlyWithKernelDebugSyms ¤
OnlyWhenHeapIsInitialized ¤
OnlyWithResolvedHeapSyms ¤
sloppy_gdb_parse ¤
This function should be used as argparse.ArgumentParser .add_argument method's type helper.
This makes the type being parsed as gdb value and if that parsing fails, a string is returned.
:param s: String. :return: Whatever gdb.parse_and_eval returns or string.
HexOrAddressExpr ¤
Parses string as hexadecimal int or an address expression. Returns an int. (e.g. '1234' will return 0x1234)