pickledbg
pickledbg is a GDB+GEF-style debugger, where pickles are unpacked instruction by instruction, showing the Pickle Machine state (stack, metastack, and memo) at each step. Additional related tools are linked at the bottom of this README.
Installation
$ pip install pickledbg -U
Usage
┌──(user㉿computer)-[~/pickledbg]
└─$ pickledbg
Usage: pickledbg.py <picklefile>
┌──(user㉿computer)-[~/pickledbg]
└─$ pickledbg examples/helloworld.pickle
pickledbg> help
────────────────────────────────── pickledbg help ──────────────────────────────────
start
Starts the debugger, pointing to the first instruction but not executing it. Must
only be ran once. To restart debugging, close the program and run it again. Must
also be run before stepping through instructions.
Aliases: run
────────────────────────────────────────────────────────────────────────────────────
ni
Executes the next instruction and shows the updated Pickle Machine state. Must be
ran after 'start'.
Aliases: next
────────────────────────────────────────────────────────────────────────────────────
step
Executes the next given number of instructions and shows the updated Pickle Machine
state.
Syntax: step <number>
────────────────────────────────────────────────────────────────────────────────────
step-to
Executes instructions until the instruction address is reached and shows the updated
Pickle Machine state.
Syntax: step-to <address>
────────────────────────────────────────────────────────────────────────────────────
export
Writes the disassembly of the pickle to a file. If no filename is specified, the
default is 'out.disasm'.
Syntax: export [filename]
────────────────────────────────────────────────────────────────────────────────────
show options
Shows the current options and their values.
────────────────────────────────────────────────────────────────────────────────────
set
Sets an option to a value.
Syntax: set <option> <value>
────────────────────────────────────────────────────────────────────────────────────
help
Shows this help menu. Type 'help options' for available options.
Aliases: ?
────────────────────────────────────────────────────────────────────────────────────
exit
Exits the debugger.
Aliases: quit
────────────────────────────────────────────────────────────────────────────────────
pickledbg>
(Example of what the debug interface looks like when running.)
Changelog
You can find the changelog here.
Contributing
If you are interesting in contributing to pickledbg, feel free to create an issue or make a pull request.
Related Resources
- https://docs.python.org/3/library/pickletools.html
- Official tool for developers to inspect and disassemble pickles
- https://github.com/Legoclones/pickledoc
- Unofficial pickle documentation
- https://github.com/trailofbits/fickling
- Pickle decompiler and static analyzer
- https://github.com/splitline/Pickora
- Python module to turn Python scripts into pickles
- https://github.com/gousaiyang/pickleassem
- Pickle assembler
Metadata
Release files for pickledbg 2.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pickledbg-2.2.0.tar.gz | 8.8 kB | Without provenance | Details for pickledbg-2.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pickledbg-2.2.0-py3-none-any.whl | Python 3 | none | any | Details for pickledbg-2.2.0-py3-none-any.whl |
Total release size: 18.9 kB
Release files / pickledbg-2.2.0.tar.gz
| Download URL | pickledbg-2.2.0.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d5a41d58f5ac437e7670f85666e2f3b319c9037b95eea5e42813a84b0786e32
|
|
BLAKE2b-256 checksum How to use checksums |
da813195338c8c2ad7f7b0aa726965e669eee12716187133f195128080aa3dee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / pickledbg-2.2.0-py3-none-any.whl
| Download URL | pickledbg-2.2.0-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dd4e5f49a8a57fc56372523062f083f500a2210b364ba7cdef18a5968aa3d623
|
|
BLAKE2b-256 checksum How to use checksums |
59fbb8acb4f67116938f0df3fe37ce820b7739e1c93d44f0374d13e4dcad0daf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for pickledbg 2.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.