Add new docs theme with commands documentation. (#1999)

pull/2000/head
Niko 2 years ago committed by GitHub
parent 266ce01a12
commit 561169d97c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

3
.gitignore vendored

@ -57,6 +57,9 @@ coverage.xml
# Sphinx documentation
docs/_build/
# mkdocs
site/
# PyBuilder
target/

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

@ -0,0 +1,2 @@
# Blog

@ -0,0 +1,34 @@
# ai
## Description
Ask GPT-3 a question about the current debugging context.
## Usage:
```bash
usage: ai [-h] [-M MODEL] [-t TEMPERATURE] [-m MAX_TOKENS] [-v] [-L] [-c COMMAND] [question ...]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`question`|The question to ask.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
|`-M`|`--model`|`None`|The OpenAI model to use.|
|`-t`|`--temperature`|`None`|The temperature to use.|
|`-m`|`--max-tokens`|`None`|The maximum number of tokens to generate.|
|`-v`|`--verbose`||Print the prompt and response. (default: %(default)s)|
|`-L`|`--list-models`||List the available models. (default: %(default)s)|
|`-c`|`--command`|`None`|Run a command in the GDB debugger and ask a question about the output.|

@ -0,0 +1,22 @@
# argc
## Description
Prints out the number of arguments.
## Usage:
```bash
usage: argc [-h]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,28 @@
# argv
## Description
Prints out the contents of argv.
## Usage:
```bash
usage: argv [-h] [i]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`i`|Index of the argument to print out.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,28 @@
# envp
## Description
Prints out the contents of the environment.
## Usage:
```bash
usage: envp [-h] [name]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`name`|Name of the environment variable to see.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -1,11 +0,0 @@
## Command: cpsr ##
```
usage: cpsr [-h]
```
Print out ARM CPSR register
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |

@ -0,0 +1,32 @@
# aslr
## Description
Check the current ASLR status, or turn it on/off.
Does not take effect until the program is restarted.
## Usage:
```bash
usage: aslr [-h] [{on,off}]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`state`|Turn ASLR on or off (takes effect when target is started)|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,36 @@
# asm
## Description
Assemble shellcode into bytes
## Usage:
```bash
usage: asm [-h] [-f {hex,string}] [--arch {powerpc64,aarch64,powerpc,riscv32,riscv64,sparc64,mips64,msp430,alpha,amd64,sparc,thumb,cris,i386,ia64,m68k,mips,s390,none,avr,arm,vax}]
[-v AVOID] [-n] [-z] [-i INFILE]
[shellcode ...]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`shellcode`|Assembler code to assemble (default: %(default)s)|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
|`-f`|`--format`|`hex`|Output format (default: %(default)s)|
||`--arch`|`i386`|Target architecture (default: %(default)s)|
|`-v`|`--avoid`|`None`|Encode the shellcode to avoid the listed bytes (provided as hex)|
|`-n`|`--newline`|`None`|Encode the shellcode to avoid newlines|
|`-z`|`--zero`|`None`|Encode the shellcode to avoid NULL bytes|
|`-i`|`--infile`|`None`|Specify input file|

@ -0,0 +1,46 @@
# attachp
## Description
Attaches to a given pid, process name or device file.
This command wraps the original GDB `attach` command to add the ability
to debug a process with given name. In such case the process identifier is
fetched via the `pidof <name>` command.
Original GDB attach command help:
Attach to a process or file outside of GDB.
This command attaches to another target, of the same type as your last
"target" command ("info files" will show your target stack).
The command may take as argument a process id or a device file.
For a process id, you must have permission to send the process a signal,
and it must have the same effective uid as the debugger.
When using "attach" with a process id, the debugger finds the
program running in the process, looking first in the current working
directory, or (if not found there) using the source file search path
(see the "directory" command). You can also use the "file" command
to specify the program, and to load its symbol table.
## Usage:
```bash
usage: attachp [-h] [--no-truncate] target
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`target`|pid, process name or device file to attach to|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
||`--no-truncate`||dont truncate command args (default: %(default)s)|

@ -0,0 +1,22 @@
# auxv
## Description
Print information from the Auxiliary ELF Vector.
## Usage:
```bash
usage: auxv [-h]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,28 @@
# break-if-not-taken
## Description
Breaks on a branch if it is not taken.
## Usage:
```bash
usage: break-if-not-taken [-h] branch
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`branch`|The branch instruction to break on.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,28 @@
# break-if-taken
## Description
Breaks on a branch if it is taken.
## Usage:
```bash
usage: break-if-taken [-h] branch
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`branch`|The branch instruction to break on.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,22 @@
# canary
## Description
Print out the current stack canary.
## Usage:
```bash
usage: canary [-h]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,22 @@
# checksec
## Description
Prints out the binary security settings using `checksec`.
## Usage:
```bash
usage: checksec [-h]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,29 @@
# comm
## Description
Put comments in assembly code.
## Usage:
```bash
usage: comm [-h] [--addr address] comment
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`comment`|The text you want to comment|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
||`--addr`|`None`|Address to write comments|

@ -1,15 +1,28 @@
## Command: config ##
```
# config
## Description
Shows pwndbg-specific configuration.
## Usage:
```bash
usage: config [-h] [filter_pattern]
```
Shows pwndbg-specific config. The list can be filtered.
| Positional Argument | Info |
|---------------------|------|
| filter_pattern | Filter to apply to config parameters names/descriptions |
```
## Positional Arguments
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
|Positional Argument|Help|
| :--- | :--- |
|`filter_pattern`|Filter to apply to config parameters names/descriptions|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -1,12 +1,23 @@
## Command: configfile ##
```
usage: configfile [-h] [--show-all]
```
Generates a configuration file for the current Pwndbg options
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
| --show-all | Force displaying of all configs. (default: False) |
# configfile
## Description
Generates a configuration file for the current pwndbg options.
## Usage:
```bash
usage: configfile [-h] [--show-all]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
||`--show-all`||Display all configuration options. (default: %(default)s)|

@ -1,15 +1,28 @@
## Command: theme ##
```
# theme
## Description
Shows pwndbg-specific theme configuration.
## Usage:
```bash
usage: theme [-h] [filter_pattern]
```
Shows pwndbg-specific theme config. The list can be filtered.
| Positional Argument | Info |
|---------------------|------|
| filter_pattern | Filter to apply to theme parameters names/descriptions |
```
## Positional Arguments
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
|Positional Argument|Help|
| :--- | :--- |
|`filter_pattern`|Filter to apply to theme parameters names/descriptions|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -1,12 +1,23 @@
## Command: themefile ##
```
usage: themefile [-h] [--show-all]
```
Generates a configuration file for the current Pwndbg theme options
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
| --show-all | Force displaying of all theme options. (default: False) |
# themefile
## Description
Generates a configuration file for the current pwndbg theme options.
## Usage:
```bash
usage: themefile [-h] [--show-all]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
||`--show-all`||Force displaying of all theme options. (default: %(default)s)|

@ -0,0 +1,28 @@
# context
## Description
Print out the current register, instruction, and stack context.
## Usage:
```bash
usage: context [-h] [subcontext ...]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`subcontext`|Submenu to display: 'reg', 'disasm', 'code', 'stack', 'backtrace', 'ghidra', and/or 'args'|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,32 @@
# contextoutput
## Description
Sets the output of a context section.
## Usage:
```bash
usage: contextoutput [-h] section path clearing [banner] [width]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`section`|The section which is to be configured. ('regs', 'disasm', 'code', 'stack', 'backtrace', and/or 'args')|
|`path`|The path to which the output is written|
|`clearing`|Indicates weather to clear the output|
|`banner`|Where a banner should be placed: both, top , bottom, none (default: %(default)s)|
|`width`|Sets a fixed width (used for banner). Set to None for auto|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,28 @@
# contextunwatch
## Description
Removes an expression previously added to be watched.
## Usage:
```bash
usage: contextunwatch [-h] num
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`num`|The expression number to be removed from context|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,33 @@
# contextwatch
## Description
Adds an expression to be shown on context.
To remove an expression, see `cunwatch`.
## Usage:
```bash
usage: contextwatch [-h] [{eval,execute}] expression
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`cmd`|Command to be used with the expression. - eval: the expression is parsed and evaluated as in the debugged language. - execute: the expression is executed as a GDB command. (default: %(default)s)|
|`expression`|The expression to be evaluated and shown in context|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,28 @@
# regs
## Description
Print out all registers and enhance the information.
## Usage:
```bash
usage: regs [-h] [regs ...]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`regs`|Registers to be shown|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,22 @@
# cpsr
## Description
Print out ARM CPSR or xPSR register.
## Usage:
```bash
usage: cpsr [-h]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,31 @@
# cyclic
## Description
Cyclic pattern creator/finder.
## Usage:
```bash
usage: cyclic [-h] [-a charset] [-n length] [-l lookup_value | count]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`count`|Number of characters to print from the sequence (default: print the entire sequence) (default: %(default)s)|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
|`-a`|`--alphabet`|`abcdefghijklmnopqrstuvwxyz`|The alphabet to use in the cyclic pattern (default: %(default)s)|
|`-n`|`--length`|`None`|Size of the unique subsequences (defaults to the pointer size for the current arch)|
|`-o`|`--lookup`|`None`|Do a lookup instead of printing the sequence (accepts constant values as well as expressions)|

@ -0,0 +1,27 @@
# cymbol
## Description
Add, show, load, edit, or delete custom structures in plain C.
## Usage:
```bash
usage: cymbol [-h] [-a name] [-r name] [-e name] [-l name] [-s name]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
|`-a`|`--add`|`None`|Add a new custom structure|
|`-r`|`--remove`|`None`|Remove an existing custom structure|
|`-e`|`--edit`|`None`|Edit an existing custom structure|
|`-l`|`--load`|`None`|Load an existing custom structure|
|`-s`|`--show`|`None`|Show the source code of an existing custom structure|

@ -1,12 +0,0 @@
## Command: bugreport ##
```
usage: bugreport [-h] [--run-browser]
```
Generate bugreport
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
| --run-browser | Open browser on github/issues/new (default: False) |

@ -1,11 +0,0 @@
## Command: reinit_pwndbg ##
```
usage: reinit_pwndbg [-h]
```
Makes pwndbg reinitialize all state.
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |

@ -1,11 +0,0 @@
## Command: reload ##
```
usage: reload [-h]
```
Reload pwndbg.
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |

@ -1,11 +0,0 @@
## Command: version ##
```
usage: version [-h]
```
Displays gdb, python and pwndbg versions.
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |

@ -1,16 +0,0 @@
## Command: emulate ##
```
usage: emulate [-h] [pc] [lines]
```
Like nearpc, but will emulate instructions from the current $PC forward.
| Positional Argument | Info |
|---------------------|------|
| pc | Address to emulate near. |
| lines | Number of lines to show on either side of the address. |
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |

@ -1,17 +0,0 @@
## Command: nearpc ##
```
usage: nearpc [-h] [pc] [lines] [emulate]
```
Disassemble near a specified address.
| Positional Argument | Info |
|---------------------|------|
| pc | Address to disassemble near. |
| lines | Number of lines to show on either side of the address. |
| emulate | Whether to emulate instructions to find the next ones or just linearly disassemble. (default: False) |
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |

@ -1,16 +0,0 @@
## Command: pdisass ##
```
usage: pdisass [-h] [pc] [lines]
```
Compatibility layer for PEDA's pdisass command.
| Positional Argument | Info |
|---------------------|------|
| pc | Address to disassemble near. |
| lines | Number of lines to show on either side of the address. |
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |

@ -0,0 +1,29 @@
# distance
## Description
Print the distance between the two arguments, or print the offset to the address's page base.
## Usage:
```bash
usage: distance [-h] a [b]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`a`|The first address.|
|`b`|The second address.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,33 @@
# dt
## Description
Dump out information on a type (e.g. ucontext_t).
Optionally overlay that information at an address.
## Usage:
```bash
usage: dt [-h] typename [address]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`typename`|The name of the structure being dumped.|
|`address`|The address of the structure.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,23 @@
# dumpargs
## Description
Prints determined arguments for call instruction.
## Usage:
```bash
usage: dumpargs [-h] [-f]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
|`-f`|`--force`||Force displaying of all arguments. (default: %(default)s)|

@ -0,0 +1,22 @@
# elfsections
## Description
Prints the section mappings contained in the ELF header.
## Usage:
```bash
usage: elfsections [-h]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,22 @@
# gotplt
## Description
Prints any symbols found in the .got.plt section if it exists.
## Usage:
```bash
usage: gotplt [-h]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,22 @@
# plt
## Description
Prints any symbols found in the .plt section if it exists.
## Usage:
```bash
usage: plt [-h]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -1,11 +0,0 @@
## Command: auxv ##
```
usage: auxv [-h]
```
Print information from the Auxiliary ELF Vector.
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |

@ -1,11 +0,0 @@
## Command: checksec ##
```
usage: checksec [-h]
```
Prints out the binary security settings using `checksec`.
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |

@ -1,11 +0,0 @@
## Command: elfheader ##
```
usage: elfheader [-h]
```
Prints the section mappings contained in the ELF header.
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |

@ -1,15 +0,0 @@
## Command: got ##
```
usage: got [-h] [name_filter]
```
Show the state of the Global Offset Table
| Positional Argument | Info |
|---------------------|------|
| name_filter | Filter results by passed name. (default: ) |
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |

@ -1,11 +0,0 @@
## Command: gotplt ##
```
usage: gotplt [-h]
```
Prints any symbols found in the .got.plt section if it exists.
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |

@ -1,11 +0,0 @@
## Command: plt ##
```
usage: plt [-h]
```
Prints any symbols found in the .plt section if it exists.
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |

@ -1,18 +0,0 @@
## Command: rop ##
```
usage: rop [-h] [--grep GREP] [argument [argument ...]]
```
Dump ROP gadgets with Jon Salwan's ROPgadget tool.
| Positional Argument | Info |
|---------------------|------|
| argument | Arguments to pass to ROPgadget |
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
| --grep | String to grep the output for |
Example: rop --grep 'pop rdi' -- --nojop

@ -1,17 +0,0 @@
## Command: ropper ##
```
usage: ropper [-h] [argument [argument ...]]
```
ROP gadget search with ropper.
| Positional Argument | Info |
|---------------------|------|
| argument | Arguments to pass to ropper |
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
Example: ropper -- --console; ropper -- --search 'mov e?x'

@ -0,0 +1,29 @@
# setflag
## Description
Modify the flags register.
## Usage:
```bash
usage: setflag [-h] flag value
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`flag`|Flag for which you want to change the value|
|`value`|Value to which you want to set the flag - only valid options are 0 and 1|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -1,11 +0,0 @@
## Command: entry_point ##
```
usage: entry_point [-h]
```
GDBINIT compatibility alias to print the entry point. See also the 'entry' command.
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |

@ -1,11 +0,0 @@
## Command: init ##
```
usage: init [-h]
```
GDBINIT compatibility alias for 'start' command.
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |

@ -1,11 +0,0 @@
## Command: libs ##
```
usage: libs [-h]
```
GDBINIT compatibility alias for 'libs' command.
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |

@ -1,11 +0,0 @@
## Command: main ##
```
usage: main [-h]
```
GDBINIT compatibility alias for 'main' command.
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |

@ -1,11 +0,0 @@
## Command: sstart ##
```
usage: sstart [-h]
```
GDBINIT compatibility alias for 'tbreak __libc_start_main; run' command.
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |

@ -0,0 +1,38 @@
# got
## Description
Show the state of the Global Offset Table.
Examples:
got
got puts
got -p libc
got -a
## Usage:
```bash
usage: got [-h] [-p PATH_FILTER | -a] [-r] [symbol_filter]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`symbol_filter`|Filter results by symbol name. (default: %(default)s)|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
|`-p`|`--path`|``|Filter results by library/objfile path. (default: %(default)s)|
|`-a`|`--all`||Process all libs/obfjiles including the target executable. (default: %(default)s)|
|`-r`|`--show-readonly`||Also display read-only entries (which are filtered out by default). (default: %(default)s)|

@ -0,0 +1,22 @@
# track-got
## Description
Controls GOT tracking
## Usage:
```bash
usage: track-got [-h] {enable,disable,info,query} ...
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -1,15 +1,30 @@
## Command: arena ##
```
# arena
## Description
Print the contents of an arena.
Default to the current thread's arena.
## Usage:
```bash
usage: arena [-h] [addr]
```
Prints out the main arena or the arena at the specified by address.
| Positional Argument | Info |
|---------------------|------|
| addr | The address of the arena. |
```
## Positional Arguments
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
|Positional Argument|Help|
| :--- | :--- |
|`addr`|Address of the arena.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -1,11 +1,22 @@
## Command: arenas ##
```
usage: arenas [-h]
```
Prints out allocated arenas.
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
# arenas
## Description
List this process's arenas.
## Usage:
```bash
usage: arenas [-h]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -1,16 +1,31 @@
## Command: bins ##
```
# bins
## Description
Print the contents of all an arena's bins and a thread's tcache.
Default to the current thread's arena and tcache.
## Usage:
```bash
usage: bins [-h] [addr] [tcache_addr]
```
Prints out the contents of the tcachebins, fastbins, unsortedbin, smallbins, and largebins from the main_arena or the specified address.
| Positional Argument | Info |
|---------------------|------|
| addr | The address of the bins. |
| tcache_addr | The address of the tcache. |
```
## Positional Arguments
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
|Positional Argument|Help|
| :--- | :--- |
|`addr`|Address of the arena.|
|`tcache_addr`|Address of the tcache.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -1,16 +1,31 @@
## Command: fastbins ##
```
usage: fastbins [-h] [addr] [verbose]
```
Prints out the contents of the fastbins of the main arena or the arena at the specified address.
| Positional Argument | Info |
|---------------------|------|
| addr | The address of the fastbins. |
| verbose | Whether to show more details or not. (default: True) |
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
# fastbins
## Description
Print the contents of an arena's fastbins.
Default to the current thread's arena.
## Usage:
```bash
usage: fastbins [-h] [-v] [addr]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`addr`|Address of the arena.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
|`-v`|`--verbose`||Show all fastbins, including empty ones (default: %(default)s)|

@ -1,16 +1,31 @@
## Command: find_fake_fast ##
```
usage: find_fake_fast [-h] addr size
```
Finds candidate fake fast chunks that will overlap with the specified address. Used for fastbin dups and house of spirit
| Positional Argument | Info |
|---------------------|------|
| addr | The start address. |
| size | The size. |
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
# find_fake_fast
## Description
Find candidate fake fast or tcache chunks overlapping the specified address.
## Usage:
```bash
usage: find_fake_fast [-h] [--align] [--glibc-fastbin-bug] target_address [max_candidate_size]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`target_address`|Address of the word-sized value to overlap.|
|`max_candidate_size`|Maximum size of fake chunks to find.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
|`-a`|`--align`||Whether the fake chunk must be aligned to MALLOC_ALIGNMENT. This is required for tcache chunks and for all chunks when Safe Linking is enabled (default: %(default)s)|
|`-b`|`--glibc-fastbin-bug`||Does the GLIBC fastbin size field bug affect the candidate size field width? (default: %(default)s)|

@ -1,15 +1,32 @@
## Command: heap ##
```
usage: heap [-h] [addr]
```
Prints out chunks starting from the address specified by `addr`.
| Positional Argument | Info |
|---------------------|------|
| addr | The address of the heap. |
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
# heap
## Description
Iteratively print chunks on a heap.
Default to the current thread's active heap.
## Usage:
```bash
usage: heap [-h] [-v] [-s] [addr]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`addr`|Address of the first chunk (malloc_chunk struct start, prev_size field).|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
|`-v`|`--verbose`||Print all chunk fields, even unused ones. (default: %(default)s)|
|`-s`|`--simple`||Simply print malloc_chunk struct's contents. (default: %(default)s)|

@ -0,0 +1,28 @@
# heap_config
## Description
Shows heap related configuration.
## Usage:
```bash
usage: heap_config [-h] [filter_pattern]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`filter_pattern`|Filter to apply to config parameters names/descriptions|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,31 @@
# hi
## Description
Searches all heaps to find if an address belongs to a chunk. If yes, prints the chunk.
## Usage:
```bash
usage: hi [-h] [-v] [-s] [-f] addr
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`addr`|Address of the interest.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
|`-v`|`--verbose`||Print all chunk fields, even unused ones. (default: %(default)s)|
|`-s`|`--simple`||Simply print malloc_chunk struct's contents. (default: %(default)s)|
|`-f`|`--fake`||Allow fake chunks. If set, displays any memory as a heap chunk (even if its not a real chunk). (default: %(default)s)|

@ -1,16 +1,31 @@
## Command: largebins ##
```
usage: largebins [-h] [addr] [verbose]
```
Prints out the contents of the large bin of the main arena or the arena at the specified address.
| Positional Argument | Info |
|---------------------|------|
| addr | The address of the largebins. |
| verbose | Whether to show more details or not. (default: False) |
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
# largebins
## Description
Print the contents of an arena's largebins.
Default to the current thread's arena.
## Usage:
```bash
usage: largebins [-h] [-v] [addr]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`addr`|Address of the arena.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
|`-v`|`--verbose`||Show all largebins, including empty ones (default: %(default)s)|

@ -1,16 +1,31 @@
## Command: malloc_chunk ##
```
usage: malloc_chunk [-h] [addr] [fake]
```
Prints out the malloc_chunk at the specified address.
| Positional Argument | Info |
|---------------------|------|
| addr | The address of the chunk. |
| fake | If the chunk is a fake chunk. (default: False) |
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
# malloc_chunk
## Description
Print a chunk.
## Usage:
```bash
usage: malloc_chunk [-h] [-f] [-v] [-s] addr
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`addr`|Address of the chunk (malloc_chunk struct start, prev_size field).|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
|`-f`|`--fake`||Is this a fake chunk? (default: %(default)s)|
|`-v`|`--verbose`||Print all chunk fields, even unused ones. (default: %(default)s)|
|`-s`|`--simple`||Simply print malloc_chunk struct's contents. (default: %(default)s)|

@ -1,11 +1,22 @@
## Command: mp ##
```
usage: mp [-h]
```
Prints out the mp_ structure from glibc.
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
# mp
## Description
Print the mp_ struct's contents.
## Usage:
```bash
usage: mp [-h]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -1,16 +1,31 @@
## Command: smallbins ##
```
usage: smallbins [-h] [addr] [verbose]
```
Prints out the contents of the small bin of the main arena or the arena at the specified address.
| Positional Argument | Info |
|---------------------|------|
| addr | The address of the smallbins. |
| verbose | Whether to show more details or not. (default: False) |
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
# smallbins
## Description
Print the contents of an arena's smallbins.
Default to the current thread's arena.
## Usage:
```bash
usage: smallbins [-h] [-v] [addr]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`addr`|Address of the arena.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
|`-v`|`--verbose`||Show all smallbins, including empty ones (default: %(default)s)|

@ -1,15 +1,30 @@
## Command: tcache ##
```
# tcache
## Description
Print a thread's tcache contents.
Default to the current thread's tcache.
## Usage:
```bash
usage: tcache [-h] [addr]
```
Print malloc thread cache info.
| Positional Argument | Info |
|---------------------|------|
| addr | The address of the tcache. |
```
## Positional Arguments
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
|Positional Argument|Help|
| :--- | :--- |
|`addr`|Address of the tcache.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -1,16 +1,31 @@
## Command: tcachebins ##
```
usage: tcachebins [-h] [addr] [verbose]
```
Prints out the contents of the bins in current thread tcache or in tcache at the specified address.
| Positional Argument | Info |
|---------------------|------|
| addr | The address of the tcache bins. |
| verbose | Whether to show more details or not. (default: False) |
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
# tcachebins
## Description
Print the contents of a tcache.
Default to the current thread's tcache.
## Usage:
```bash
usage: tcachebins [-h] [-v] [addr]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`addr`|The address of the tcache bins.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
|`-v`|`--verbose`||Show all tcachebins, including empty ones (default: %(default)s)|

@ -1,15 +1,30 @@
## Command: top_chunk ##
```
# top_chunk
## Description
Print relevant information about an arena's top chunk.
Default to current thread's arena.
## Usage:
```bash
usage: top_chunk [-h] [addr]
```
Prints out the address of the top chunk of the main arena, or of the arena at the specified address.
| Positional Argument | Info |
|---------------------|------|
| addr | The address of the arena. |
```
## Positional Arguments
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
|Positional Argument|Help|
| :--- | :--- |
|`addr`|Address of the arena.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -1,13 +1,28 @@
## Command: try_free ##
```
# try_free
## Description
Check what would happen if free was called with given address.
## Usage:
```bash
usage: try_free [-h] [addr]
```
Check what would happen if free was called with given address
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`addr`|Address passed to free|
| Positional Argument | Info |
|---------------------|------|
| addr | Address passed to free |
## Optional Arguments
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -1,16 +1,31 @@
## Command: unsortedbin ##
```
usage: unsortedbin [-h] [addr] [verbose]
```
Prints out the contents of the unsorted bin of the main arena or the arena at the specified address.
| Positional Argument | Info |
|---------------------|------|
| addr | The address of the unsorted bin. |
| verbose | Whether to show more details or not. (default: True) |
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
# unsortedbin
## Description
Print the contents of an arena's unsortedbin.
Default to the current thread's arena.
## Usage:
```bash
usage: unsortedbin [-h] [-v] [addr]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`addr`|Address of the arena.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
|`-v`|`--verbose`||Show the "all" bin even if it's empty (default: %(default)s)|

@ -1,17 +1,34 @@
## Command: vis_heap_chunks ##
```
usage: vis_heap_chunks [-h] [--naive] [count] [address]
```
Visualize heap chunks at the specified address
| Positional Argument | Info |
|---------------------|------|
| count | Number of chunks to visualize (default: 10) |
| address | Start address |
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
| -n | Don't use end-of-heap heuristics (default: False) |
# vis_heap_chunks
## Description
Visualize chunks on a heap.
Default to the current arena's active heap.
## Usage:
```bash
usage: vis_heap_chunks [-h] [--beyond_top] [--no_truncate] [--all_chunks] [count] [addr]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`count`|Number of chunks to visualize. (default: %(default)s)|
|`addr`|Address of the first chunk.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
|`-b`|`--beyond_top`||Attempt to keep printing beyond the top chunk. (default: %(default)s)|
|`-n`|`--no_truncate`||Display all the chunk contents (Ignore the `max-visualize-chunk-size` configuration). (default: %(default)s)|
|`-a`|`--all_chunks`|| Display all chunks (Ignore the default-visualize-chunk-number configuration). (default: %(default)s)|

@ -0,0 +1,29 @@
# hexdump
## Description
Hexdumps data at the specified address or module name.
## Usage:
```bash
usage: hexdump [-h] [address] [count]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`address`|Address or module name to dump (default: %(default)s)|
|`count`|Number of bytes to dump (default: %(default)s)|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,28 @@
# down
## Description
Select and print stack frame called by this one.
## Usage:
```bash
usage: down [-h] [n]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`n`|The number of stack frames to go down. (default: %(default)s)|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -1,11 +1,22 @@
## Command: j ##
```
usage: j [-h]
```
Synchronize IDA's cursor with GDB
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
# j
## Description
Synchronize IDA's cursor with GDB.
## Usage:
```bash
usage: j [-h]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -1,11 +1,22 @@
## Command: save_ida ##
```
usage: save_ida [-h]
```
Save the ida database.
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
# save_ida
## Description
Save the ida database.
## Usage:
```bash
usage: save_ida [-h]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,28 @@
# up
## Description
Select and print stack frame that called this one.
## Usage:
```bash
usage: up [-h] [n]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`n`|The number of stack frames to go up. (default: %(default)s)|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,33 @@
# ignore
## Description
Set ignore-count of breakpoint number N to COUNT.
While the ignore count is positive, execution will not stop on the breakpoint.
By default, if `N' is ommitted, the last breakpoint (i.e. greatest breakpoint number) will be used.
## Usage:
```bash
usage: ignore [-h] [N] COUNT
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`bpnum`|The breakpoint number N.|
|`count`|The number to set COUNT.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,209 @@
# Commands
## Integrations
- [ai](ai/ai.md) Ask GPT-3 a question about the current debugging context.
- [j](ida/j.md) Synchronize IDA's cursor with GDB.
- [save_ida](ida/save_ida.md) Save the ida database.
- [r2](radare2/r2.md) Launches radare2.
- [r2pipe](radare2/r2pipe.md) Execute stateful radare2 commands through r2pipe.
- [rz](rizin/rz.md) Launches rizin.
- [rzpipe](rizin/rzpipe.md) Execute stateful rizin commands through rzpipe.
- [rop](rop/rop.md) Dump ROP gadgets with Jon Salwan's ROPgadget tool.
- [ropper](ropper/ropper.md) ROP gadget search with ropper.
## Linux/libc/ELF
- [argc](argv/argc.md) Prints out the number of arguments.
- [argv](argv/argv.md) Prints out the contents of argv.
- [envp](argv/envp.md) Prints out the contents of the environment.
- [aslr](aslr/aslr.md)
- [auxv](auxv/auxv.md) Print information from the Auxiliary ELF Vector.
- [elfsections](elf/elfsections.md) Prints the section mappings contained in the ELF header.
- [gotplt](elf/gotplt.md) Prints any symbols found in the .got.plt section if it exists.
- [plt](elf/plt.md) Prints any symbols found in the .plt section if it exists.
- [got](got/got.md) Show the state of the Global Offset Table.
- [track-got](got_tracking/track_got.md) Controls GOT tracking
- [linkmap](linkmap/linkmap.md) Show the state of the Link Map
- [errno](misc/errno_.md) Converts errno (or argument) to its string representation.
- [piebase](pie/piebase.md) Calculate VA of RVA from PIE base.
- [threads](tls/threads.md) List all threads belonging to the selected inferior.
- [tls](tls/tls.md) Print out base address of the current Thread Local Storage (TLS).
## Misc
- [asm](asm/asm.md) Assemble shellcode into bytes
- [break-if-not-taken](branch/break_if_not_taken.md) Breaks on a branch if it is not taken.
- [break-if-taken](branch/break_if_taken.md) Breaks on a branch if it is taken.
- [checksec](checksec/checksec.md) Prints out the binary security settings using `checksec`.
- [comm](comments/comm.md) Put comments in assembly code.
- [cyclic](cyclic/cyclic_cmd.md) Cyclic pattern creator/finder.
- [cymbol](cymbol/cymbol.md) Add, show, load, edit, or delete custom structures in plain C.
- [dt](dt/dt.md)
- [dumpargs](dumpargs/dumpargs.md) Prints determined arguments for call instruction.
- [down](ida/down.md) Select and print stack frame called by this one.
- [up](ida/up.md) Select and print stack frame that called this one.
- [ipi](ipython_interactive/ipi.md) Start an interactive IPython prompt.
- [stepuntilasm](next/stepuntilasm.md) Breaks on the next matching instruction.
- [patch](patch/patch.md) Patches given instruction with given code or bytes.
- [patch_list](patch/patch_list.md) List all patches.
- [patch_revert](patch/patch_revert.md) Revert patch at given address.
- [getfile](peda/getfile.md) Gets the current file.
- [plist](plist/plist.md) Dumps the elements of a linked list.
- [sigreturn](sigreturn/sigreturn.md) Display the SigreturnFrame at the specific address
- [spray](spray/spray.md) Spray memory with cyclic() generated values
- [tips](tips/tips.md) Shows tips.
- [valist](valist/valist.md) Dumps the arguments of a va_list.
## Start
- [attachp](attachp/attachp.md) Attaches to a given pid, process name or device file.
- [entry](start/entry.md)
- [sstart](start/sstart.md) Alias for 'tbreak __libc_start_main; run'.
- [start](start/start.md)
## Stack
- [canary](canary/canary.md) Print out the current stack canary.
- [retaddr](stack/retaddr.md) Print out the stack addresses that contain return addresses.
- [stack](telescope/stack.md) Dereferences on stack data with specified count and offset.
- [stackf](telescope/stackf.md) Dereferences on stack data, printing the entire stack frame with specified count and offset .
## pwndbg
- [config](config/config.md) Shows pwndbg-specific configuration.
- [configfile](config/configfile.md) Generates a configuration file for the current pwndbg options.
- [theme](config/theme.md) Shows pwndbg-specific theme configuration.
- [themefile](config/themefile.md) Generates a configuration file for the current pwndbg theme options.
- [memoize](memoize/memoize.md)
- [pwndbg](misc/pwndbg_.md) Prints out a list of all pwndbg commands.
- [reinit_pwndbg](reload/reinit_pwndbg.md) Makes pwndbg reinitialize all state.
- [reload](reload/reload.md) Reload pwndbg.
- [bugreport](version/bugreport.md) Generate a bug report.
- [version](version/version.md) Displays GDB, Python, and pwndbg versions.
## Context
- [context](context/context.md) Print out the current register, instruction, and stack context.
- [contextoutput](context/contextoutput.md) Sets the output of a context section.
- [contextunwatch](context/contextunwatch.md) Removes an expression previously added to be watched.
- [contextwatch](context/contextwatch.md)
- [regs](context/regs.md) Print out all registers and enhance the information.
- [xinfo](xinfo/xinfo.md) Shows offsets of the specified address from various useful locations.
## Register
- [cpsr](cpsr/cpsr.md) Print out ARM CPSR or xPSR register.
- [setflag](flags/setflag.md) Modify the flags register.
- [fsbase](segments/fsbase.md) Prints out the FS base address. See also $fsbase.
- [gsbase](segments/gsbase.md) Prints out the GS base address. See also $gsbase.
## Memory
- [distance](distance/distance.md) Print the distance between the two arguments, or print the offset to the address's page base.
- [hexdump](hexdump/hexdump.md) Hexdumps data at the specified address or module name.
- [leakfind](leakfind/leakfind.md)
- [mmap](mmap/mmap.md)
- [mprotect](mprotect/mprotect.md)
- [p2p](p2p/p2p.md) Pointer to pointer chain search. Searches given mapping for all pointers that point to specified mapping.
- [telescope](p2p/ts.md) Recursively dereferences pointers starting at the specified address.
- [telescope](peda/xprint.md) Recursively dereferences pointers starting at the specified address.
- [probeleak](probeleak/probeleak.md)
- [search](search/search.md) Search memory for byte sequences, strings, pointers, and integer values.
- [telescope](telescope/telescope.md) Recursively dereferences pointers starting at the specified address.
- [vmmap](vmmap/vmmap.md) Print virtual memory map pages.
- [vmmap_add](vmmap/vmmap_add.md) Add virtual memory map page.
- [vmmap_clear](vmmap/vmmap_clear.md) Clear the vmmap cache.
- [vmmap_load](vmmap/vmmap_load.md) Load virtual memory map pages from ELF file.
- [xinfo](xinfo/xinfo.md) Shows offsets of the specified address from various useful locations.
- [memfrob](xor/memfrob.md) Memfrobs a region of memory (xor with '*').
- [xor](xor/xor.md) XOR `count` bytes at `address` with the key `key`.
## Heap
- [arena](heap/arena.md) Print the contents of an arena.
- [arenas](heap/arenas.md) List this process's arenas.
- [bins](heap/bins.md) Print the contents of all an arena's bins and a thread's tcache.
- [fastbins](heap/fastbins.md) Print the contents of an arena's fastbins.
- [find_fake_fast](heap/find_fake_fast.md) Find candidate fake fast or tcache chunks overlapping the specified address.
- [heap](heap/heap.md) Iteratively print chunks on a heap.
- [heap_config](heap/heap_config.md) Shows heap related configuration.
- [hi](heap/hi.md) Searches all heaps to find if an address belongs to a chunk. If yes, prints the chunk.
- [largebins](heap/largebins.md) Print the contents of an arena's largebins.
- [malloc_chunk](heap/malloc_chunk.md) Print a chunk.
- [mp](heap/mp.md) Print the mp_ struct's contents.
- [smallbins](heap/smallbins.md) Print the contents of an arena's smallbins.
- [tcache](heap/tcache.md) Print a thread's tcache contents.
- [tcachebins](heap/tcachebins.md) Print the contents of a tcache.
- [top_chunk](heap/top_chunk.md) Print relevant information about an arena's top chunk.
- [try_free](heap/try_free.md) Check what would happen if free was called with given address.
- [unsortedbin](heap/unsortedbin.md) Print the contents of an arena's unsortedbin.
- [vis_heap_chunks](heap/vis_heap_chunks.md) Visualize chunks on a heap.
## Breakpoint
- [ignore](ignore/ignore.md) Set ignore-count of breakpoint number N to COUNT.
- [breakrva](pie/breakrva.md) Break at RVA from PIE base.
## Kernel
- [kbase](kbase/kbase.md) Finds the kernel virtual base address.
- [kchecksec](kchecksec/kchecksec.md) Checks for kernel hardening configuration options.
- [kcmdline](kcmdline/kcmdline.md) Return the kernel commandline (/proc/cmdline).
- [kconfig](kconfig/kconfig.md) Outputs the kernel config (requires CONFIG_IKCONFIG).
- [kversion](kversion/kversion.md) Outputs the kernel version (/proc/version).
- [slab](slab/slab.md) Prints information about the slab allocator
## Process
- [killthreads](killthreads/killthreads.md) Kill all or given threads.
- [pid](procinfo/pid.md) Gets the pid.
- [procinfo](procinfo/procinfo.md) Display information about the running process.
## Disassemble
- [emulate](nearpc/emulate.md) Like nearpc, but will emulate instructions from the current $PC forward.
- [nearpc](nearpc/nearpc.md) Disassemble near a specified address.
## Step/Next/Continue
- [nextcall](next/nextcall.md) Breaks at the next call instruction.
- [nextjmp](next/nextjmp.md) Breaks at the next jump instruction.
- [nextproginstr](next/nextproginstr.md) Breaks at the next instruction that belongs to the running program.
- [nextret](next/nextret.md) Breaks at next return-like instruction.
- [nextsyscall](next/nextsyscall.md) Breaks at the next syscall not taking branches.
- [stepover](next/stepover.md) Breaks on the instruction after this one.
- [stepret](next/stepret.md) Breaks at next return-like instruction by 'stepping' to it.
- [stepsyscall](next/stepsyscall.md) Breaks at the next syscall by taking branches.
- [xuntil](peda/xuntil.md) Continue execution until an address or function.
## WinDbg
- [bc](windbg/bc.md) Clear the breakpoint with the specified index.
- [bd](windbg/bd.md) Disable the breakpoint with the specified index.
- [be](windbg/be.md) Enable the breakpoint with the specified index.
- [bl](windbg/bl.md) List breakpoints.
- [bp](windbg/bp.md) Set a breakpoint at the specified address.
- [da](windbg/da.md) Dump a string at the specified address.
- [db](windbg/db.md) Starting at the specified address, dump N bytes.
- [dc](windbg/dc.md) Starting at the specified address, hexdump.
- [dd](windbg/dd.md) Starting at the specified address, dump N dwords.
- [dds](windbg/dds.md) Dump pointers and symbols at the specified address.
- [dq](windbg/dq.md) Starting at the specified address, dump N qwords.
- [ds](windbg/ds.md) Dump a string at the specified address.
- [dw](windbg/dw.md) Starting at the specified address, dump N words.
- [eb](windbg/eb.md) Write hex bytes at the specified address.
- [ed](windbg/ed.md) Write hex dwords at the specified address.
- [eq](windbg/eq.md) Write hex qwords at the specified address.
- [ew](windbg/ew.md) Write hex words at the specified address.
- [ez](windbg/ez.md) Write a string at the specified address.
- [eza](windbg/eza.md) Write a string at the specified address.
- [go](windbg/go.md) Windbg compatibility alias for 'continue' command.
- [k](windbg/k.md) Print a backtrace (alias 'bt').
- [ln](windbg/ln.md) List the symbols nearest to the provided value.
- [pc](windbg/pc.md) Windbg compatibility alias for 'nextcall' command.
- [peb](windbg/peb.md) Not be windows.

@ -0,0 +1,22 @@
# ipi
## Description
Start an interactive IPython prompt.
## Usage:
```bash
usage: ipi [-h]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,22 @@
# kbase
## Description
Finds the kernel virtual base address.
## Usage:
```bash
usage: kbase [-h]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,22 @@
# kchecksec
## Description
Checks for kernel hardening configuration options.
## Usage:
```bash
usage: kchecksec [-h]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,22 @@
# kcmdline
## Description
Return the kernel commandline (/proc/cmdline).
## Usage:
```bash
usage: kcmdline [-h]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,28 @@
# kconfig
## Description
Outputs the kernel config (requires CONFIG_IKCONFIG).
## Usage:
```bash
usage: kconfig [-h] [config_name]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`config_name`|A config name to search for|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,35 @@
# killthreads
## Description
Kill all or given threads.
Switches to given threads and calls pthread_exit(0) on them.
This is performed with scheduler-locking to prevent other threads from operating at the same time.
Killing all other threads may be useful to use GDB checkpoints, e.g., to test given input & restart the execution to the point of interest (checkpoint).
## Usage:
```bash
usage: killthreads [-h] [-a] [thread_ids ...]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`thread_ids`|Thread IDs to kill.|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
|`-a`|`--all`||Kill all threads except the current one. (default: %(default)s)|

@ -0,0 +1,22 @@
# kversion
## Description
Outputs the kernel version (/proc/version).
## Usage:
```bash
usage: kversion [-h]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,38 @@
# leakfind
## Description
Attempt to find a leak chain given a starting address.
Scans memory near the given address, looks for pointers, and continues that process to attempt to find leaks.
Example: leakfind $rsp --page_name=filename --max_offset=0x48 --max_depth=6. This would look for any chains of leaks that point to a section in filename which begin near $rsp, are never 0x48 bytes further from a known pointer, and are a maximum length of 6.
## Usage:
```bash
usage: leakfind [-h] [-p [PAGE_NAME]] [-o [MAX_OFFSET]] [-d [MAX_DEPTH]] [-s [STEP]] [--negative_offset [NEGATIVE_OFFSET]] [address]
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`address`|Starting address to find a leak chain from (default: %(default)s)|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
|`-p`|`--page_name`|`None`|Substring required to be part of the name of any found pages|
|`-o`|`--max_offset`|`72`|Max offset to add to addresses when looking for leak (default: %(default)s)|
|`-d`|`--max_depth`|`4`|Maximum depth to follow pointers to (default: %(default)s)|
|`-s`|`--step`|`1`|Step to add between pointers so they are considered. For example, if this is 4 it would only consider pointers at an offset divisible by 4 from the starting pointer (default: %(default)s)|
||`--negative_offset`|`0`|Max negative offset to search before an address when looking for a leak (default: %(default)s)|

@ -1,20 +0,0 @@
## Command: leakfind ##
```
usage: leakfind [-h] [-p [PAGE_NAME]] [-o [MAX_OFFSET]] [-d [MAX_DEPTH]] [-s [STEP]] [--negative_offset [NEGATIVE_OFFSET]] address
```
Attempt to find a leak chain given a starting address. Scans memory near the given address, looks for pointers, and continues that process to attempt to find leaks. Example: leakfind $rsp --page_name=filename --max_offset=0x48 --max_depth=6. This would look for any chains of leaks that point to a section in filename which begin near $rsp, are never 0x48 bytes further from a known pointer, and are a maximum length of 6
| Positional Argument | Info |
|---------------------|------|
| address | Starting address to find a leak chain from |
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
| --page_name | Substring required to be part of the name of any found pages |
| --max_offset | Max offset to add to addresses when looking for leak (default: 72) |
| --max_depth | Maximum depth to follow pointers to (default: 4) |
| --step | Step to add between pointers so they are considered. For example, if this is 4 it would only consider pointers at an offset divisible by 4 from the starting pointer (default: 1) |
| --negative_offset | Max negative offset to search before an address when looking for a leak (default: 0) |

@ -1,17 +0,0 @@
## Command: probeleak ##
```
usage: probeleak [-h] [address] [count] [max_distance]
```
Pointer scan for possible offset leaks. Examples: probeleak $rsp 0x64 - leaks 0x64 bytes starting at stack pointer and search for valid pointers probeleak $rsp 0x64 0x10 - as above, but pointers may point 0x10 bytes outside of memory page
| Positional Argument | Info |
|---------------------|------|
| address | Leak memory address (default: $sp) |
| count | Leak size in bytes (default: 64) |
| max_distance | Max acceptable distance between memory page boundary and leaked pointer (default: 0) |
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |

@ -0,0 +1,22 @@
# linkmap
## Description
Show the state of the Link Map
## Usage:
```bash
usage: linkmap [-h]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -0,0 +1,26 @@
# memoize
## Description
Toggles memoization (caching).
Useful for diagnosing caching-related bugs. Decreases performance.
## Usage:
```bash
usage: memoize [-h]
```
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|

@ -1,50 +0,0 @@
## Command ai ##
```
usage: ai [-h] [-M MODEL] [-t TEMPERATURE] [-m MAX_TOKENS] [-v] [-c COMMAND] <QUESTION>
```
| Positional Argument | Info |
|---------------------|------|
| QUESTION | The question you want to ask GPT-3 about the current context or command output. |
| Optional Argument | Info |
|-------------------|------|
| -h | show a help message |
| -M MODEL | specify which language model GPT-3 should use (default: text-davinci-003) |
| -t TEMPERATURE | set the temperature for the response, between 0.0 and 2.0, with higher temperatures provoking more 'adventurous' responses |
| -m MAX\_TOKENS | set the size of the response in token count, but note that there is a limit of 4096 tokens for the prompt and response combined, and a token is about 3 characters on average |
| -v | verbose mode -- show the prompt as well as the response |
| -c COMMAND | instead of asking about the context, run a gdb command and ask about its output |
If you have the [`openai`](https://github.com/openai/openai-python) Python
module installed, and the `OPENAI_API_KEY` environment variable set to a valid
OpenAI API key, then the `ai` command can be used to query the GPT-3 large
language model for insights into the current debugging context. The register
state, the stack, and the nearby assembly instructions will be made visible
to the model, along with the nearby source code, if the binary was compiled
with debugging information.
### Examples ###
```
pwndbg> ai what was the name of the function most recently called?
strcmp
pwndbg> ai how do you know this?
The assembly code shows that the function call 0x7ffff7fea240 <strcmp> was made just before the current instruction at 0x7ffff7fce2a7 <check_match+103>.
pwndbg> ai what will the next two instructions do the the eax and ecx registers?
The next two instructions will move the values stored in the esi and edi registers into the eax and ecx registers, respectively.
pwndbg> ai say that again but as a limerick
The eax and ecx registers will fill
With the values stored in esi and edi still
The instructions will move
Their values to improve
And the registers will have a new thrill
```

@ -1,16 +0,0 @@
## Command: distance ##
```
usage: distance [-h] a b
```
Print the distance between the two arguments.
| Positional Argument | Info |
|---------------------|------|
| a | The first address. |
| b | The second address. |
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save