A few more docs fixups (#3064)

* inline 'Pwndbg version.' comments

* updated some featuresmd screenshots

* explain got cmd invocations

* fix readme cheatsheet link

* Windbg -> WinDbg
pull/3074/head
k4lizen 6 months ago committed by GitHub
parent f763221d2a
commit d380c99020
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -14,14 +14,14 @@ It has a boatload of features, see our [Features page](https://pwndbg.re/pwndbg/
and [CHEATSHEET][CHEATSHEET] (feel free to print it!). If you have any questions you may read the and [CHEATSHEET][CHEATSHEET] (feel free to print it!). If you have any questions you may read the
[documentation](https://pwndbg.re/pwndbg/latest/) or asks us in our [Discord server](https://discord.gg/x47DssnGwm). [documentation](https://pwndbg.re/pwndbg/latest/) or asks us in our [Discord server](https://discord.gg/x47DssnGwm).
[CHEATSHEET]: https://pwndbg.re/pwndbg/latest/CHEATSHEET.pdf [CHEATSHEET]: https://pwndbg.re/pwndbg/dev/CHEATSHEET.pdf
## Why? ## Why?
Vanilla GDB and LLDB are terrible to use for reverse engineering and exploit development. Vanilla GDB and LLDB are terrible to use for reverse engineering and exploit development.
Typing `x/30gx $rsp` or navigating cumbersome LLDB commands is not fun and often provides Typing `x/30gx $rsp` or navigating cumbersome LLDB commands is not fun and often provides
minimal information. The year is 2025, and core debuggers still lack many user-friendly minimal information. The year is 2025, and core debuggers still lack many user-friendly
features such as a robust hexdump command. Windbg users are completely lost when they features such as a robust hexdump command. WinDbg users are completely lost when they
occasionally need to bump into GDB or LLDB. occasionally need to bump into GDB or LLDB.
Pwndbg is a Python module which can be loaded into GDB or run as a REPL interface for LLDB. Pwndbg is a Python module which can be loaded into GDB or run as a REPL interface for LLDB.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 KiB

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

@ -236,10 +236,10 @@
- [ew](windbg/ew.md) - Write hex words 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. - [ez](windbg/ez.md) - Write a string at the specified address.
- [eza](windbg/eza.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. - [go](windbg/go.md) - WinDbg compatibility alias for 'continue' command.
- [k](windbg/k.md) - Print a backtrace (alias 'bt'). - [k](windbg/k.md) - Print a backtrace (alias 'bt').
- [ln](windbg/ln.md) - List the symbols nearest to the provided value. - [ln](windbg/ln.md) - List the symbols nearest to the provided value.
- [pc](windbg/pc.md) - Windbg compatibility alias for 'nextcall' command. - [pc](windbg/pc.md) - WinDbg compatibility alias for 'nextcall' command.
- [peb](windbg/peb.md) - Not be windows. - [peb](windbg/peb.md) - Not be windows.
## jemalloc Heap ## jemalloc Heap

@ -25,10 +25,15 @@ Show the state of the Global Offset Table.
### Examples ### Examples
```text ```text
got > got
got puts Print all writable GOT entries in the executable.
got -p libc > got -r puts
got -a Print all GOT entries that contain the string "puts".
> got -p libc
Print all writable GOT entries used by libc. (And any other loaded
object files that contain the string "libc" in their path).
> got -ra
Print all GOT entries in the address space.
``` ```
<!-- END OF AUTOGENERATED PART. Do not modify this line or the line below, they mark the end of the auto-generated part of the file. If you want to extend the documentation in a way which cannot easily be done by adding to the command help description, write below the following line. --> <!-- END OF AUTOGENERATED PART. Do not modify this line or the line below, they mark the end of the auto-generated part of the file. If you want to extend the documentation in a way which cannot easily be done by adding to the command help description, write below the following line. -->

@ -7,7 +7,7 @@ usage: go [-h]
``` ```
Windbg compatibility alias for 'continue' command. WinDbg compatibility alias for 'continue' command.
### Optional arguments ### Optional arguments
|Short|Long|Help| |Short|Long|Help|

@ -6,7 +6,7 @@ usage: pc [-h]
``` ```
Windbg compatibility alias for 'nextcall' command. WinDbg compatibility alias for 'nextcall' command.
### Optional arguments ### Optional arguments
|Short|Long|Help| |Short|Long|Help|

@ -107,9 +107,9 @@ While most other GDB plugins are well *GDB plugins*, Pwndbg's implementation is
![](assets/caps/lldb.png){ style="width: 70%;" } ![](assets/caps/lldb.png){ style="width: 70%;" }
## Windbg Compatibility ## WinDbg Compatibility
For those coming from a Windows background, Pwndbg has a complete Windbg compatibility layer. You can `dd`, `dps`, `eq`, and even `eb $rip 90` to your heart's content. For those coming from a Windows background, Pwndbg has a complete WinDbg compatibility layer. You can `dd`, `dps`, `eq`, and even `eb $rip 90` to your heart's content.
![](assets/caps/windbg.png){ style="width: 70%;" } ![](assets/caps/windbg.png){ style="width: 70%;" }
@ -127,7 +127,8 @@ Go take a look at [Commands](commands/index.md)! Here is some cool stuff you can
Use the [`procinfo`](commands/process/procinfo.md) command in order to inspect the current process state, like UID, GID, Groups, SELinux context, and open file descriptors! Pwndbg works particularly well with remote GDB debugging like with Android phones. Use the [`procinfo`](commands/process/procinfo.md) command in order to inspect the current process state, like UID, GID, Groups, SELinux context, and open file descriptors! Pwndbg works particularly well with remote GDB debugging like with Android phones.
![](assets/caps/procinfo.png) ![](assets/caps/procinfo.png){ style="width: 50%;" }
![](assets/caps/procinfo_curl.png){ style="width: 50%;" }
### ROP Gadgets ### ROP Gadgets

@ -17,10 +17,6 @@ from pwndbg import dbg as dbg_mod
from pwndbg.dbg import dbg as dbg from pwndbg.dbg import dbg as dbg
__version__ = pwndbg.lib.version.__version__ __version__ = pwndbg.lib.version.__version__
""" """Pwndbg version."""
Pwndbg version.
"""
version = __version__ version = __version__
""" """Pwndbg version."""
Pwndbg version.
"""

@ -1,5 +1,5 @@
""" """
Prints structures in a manner similar to Windbg's "dt" command. Prints structures in a manner similar to WinDbg's "dt" command.
""" """
from __future__ import annotations from __future__ import annotations
@ -33,7 +33,7 @@ def dt(
obj: pwndbg.dbg_mod.Value | None = None, obj: pwndbg.dbg_mod.Value | None = None,
) -> str: ) -> str:
""" """
Dump out a structure type Windbg style. Dump out a structure type WinDbg style.
""" """
# Return value is a list of strings.of # Return value is a list of strings.of
# We concatenate at the end. # We concatenate at the end.

@ -61,10 +61,15 @@ parser.add_argument(
parser, parser,
category=CommandCategory.LINUX, category=CommandCategory.LINUX,
examples=""" examples="""
got > got
got puts Print all writable GOT entries in the executable.
got -p libc > got -r puts
got -a Print all GOT entries that contain the string "puts".
> got -p libc
Print all writable GOT entries used by libc. (And any other loaded
object files that contain the string "libc" in their path).
> got -ra
Print all GOT entries in the address space.
""", """,
) )
@pwndbg.commands.OnlyWhenRunning @pwndbg.commands.OnlyWhenRunning

@ -1,5 +1,5 @@
""" """
Compatibility functionality for Windbg users. Compatibility functionality for WinDbg users.
""" """
from __future__ import annotations from __future__ import annotations
@ -425,12 +425,12 @@ if pwndbg.dbg.is_gdblib_available():
gdb.execute("bt") gdb.execute("bt")
@pwndbg.commands.Command( @pwndbg.commands.Command(
"Windbg compatibility alias for 'continue' command.", category=CommandCategory.WINDBG "WinDbg compatibility alias for 'continue' command.", category=CommandCategory.WINDBG
) )
@pwndbg.commands.OnlyWhenRunning @pwndbg.commands.OnlyWhenRunning
def go() -> None: def go() -> None:
""" """
Windbg compatibility alias for 'continue' command. WinDbg compatibility alias for 'continue' command.
""" """
gdb.execute("continue") gdb.execute("continue")
@ -469,11 +469,11 @@ def peb() -> None:
@pwndbg.commands.Command( @pwndbg.commands.Command(
"Windbg compatibility alias for 'nextcall' command.", category=CommandCategory.WINDBG "WinDbg compatibility alias for 'nextcall' command.", category=CommandCategory.WINDBG
) )
@pwndbg.commands.OnlyWhenRunning @pwndbg.commands.OnlyWhenRunning
def pc(): def pc():
""" """
Windbg compatibility alias for 'nextcall' command. WinDbg compatibility alias for 'nextcall' command.
""" """
return pwndbg.commands.next.nextcall() return pwndbg.commands.next.nextcall()

@ -25,7 +25,7 @@ PWNDBG_TIPS: List[str] = [
"The `set show-flags on` setting will display CPU flags register in the regs context panel", "The `set show-flags on` setting will display CPU flags register in the regs context panel",
"GDB and Pwndbg parameters can be shown or set with `show <param>` and `set <param> <value>` GDB commands", "GDB and Pwndbg parameters can be shown or set with `show <param>` and `set <param> <value>` GDB commands",
"Use Pwndbg's `config` and `theme` commands to tune its configuration and theme colors!", "Use Pwndbg's `config` and `theme` commands to tune its configuration and theme colors!",
"Pwndbg mirrors some of Windbg commands like `eq`, `ew`, `ed`, `eb`, `es`, `dq`, `dw`, `dd`, `db`, `ds` for writing and reading memory", "Pwndbg mirrors some of WinDbg commands like `eq`, `ew`, `ed`, `eb`, `es`, `dq`, `dw`, `dd`, `db`, `ds` for writing and reading memory",
"Pwndbg resolves kernel memory maps by parsing page tables (default) or via `monitor info mem` QEMU gdbstub command (use `set kernel-vmmap-via-page-tables off` for that)", "Pwndbg resolves kernel memory maps by parsing page tables (default) or via `monitor info mem` QEMU gdbstub command (use `set kernel-vmmap-via-page-tables off` for that)",
"Use the `vmmap` command for a better & colored memory maps display (than the GDB's `info proc mappings`)", "Use the `vmmap` command for a better & colored memory maps display (than the GDB's `info proc mappings`)",
"Use the `telescope` command to dereference a given address/pointer multiple times (if the dereferenced value is a valid ptr; see `config telescope` to configure its behavior)", "Use the `telescope` command to dereference a given address/pointer multiple times (if the dereferenced value is a valid ptr; see `config telescope` to configure its behavior)",

Loading…
Cancel
Save