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
– -
msr
– -
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
– -
saved_register_frames
– -
search
– -
segments
– -
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
– -
InvalidDebuggerError
–Raised when a command is called in a debugger for which
-
CommandFormatter
–The formatter_class that is passed to argparse for all
-
CommandObj
–Represents a command that can be invoked from the
-
Command
–Parametrized decorator for functions that serve as pwndbg commands.
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'stype
helper. -
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[CommandObj]
) – -
command_names
(set[str]
) – -
GDB_BUILTIN_COMMANDS
– -
pwndbg_is_reloading
–
CommandCategory ¤
InvalidDebuggerError ¤
Bases: Exception
Raised when a command is called in a debugger for which it is disallowed.
CommandFormatter ¤
Bases: RawDescriptionHelpFormatter
The formatter_class that is passed to argparse for all commands.
Subclassing this isn't officially supported, but there isn't a good alternative.
CommandObj ¤
CommandObj(
function: Callable[..., str | None],
parser: ArgumentParser,
command_name: str | None,
category: CommandCategory,
aliases: list[str],
examples: str,
notes: str,
)
Represents a command that can be invoked from the debugger.
Methods:
-
register_command
–Register this object command with the underlying debugger
-
initialize_parser
– -
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]
) – -
function
– -
command_name
– -
category
– -
aliases
– -
examples
– -
notes
– -
parser
– -
repeat
–
builtin_override_whitelist class-attribute
instance-attribute
¤
builtin_override_whitelist: set[str] = {
"up",
"down",
"search",
"pwd",
"start",
"starti",
"ignore",
}
register_command ¤
Register this object command with the underlying debugger and update pwndbg global state to know about this command.
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".
Command ¤
Command(
parser_or_desc: str | ArgumentParser,
*,
category: CommandCategory,
command_name: str | None = None,
aliases: list[str] = [],
examples: str = "",
notes: str = "",
only_debuggers: set[DebuggerType] = None,
exclude_debuggers: set[DebuggerType] = None,
)
Parametrized decorator for functions that serve as pwndbg commands.
Always use this to decorate your commands.
Methods:
-
__call__
–
Attributes:
-
parser
– -
category
– -
command_name
– -
aliases
– -
examples
– -
notes
– -
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
arg
cannot 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)