Skip to main content

A GDB+GEF-style debugger, where pickles are unpacked instruction by instruction

Project description

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

┌──(usercomputer)-[~/pickledbg]
└─$ pickledbg
Usage: pickledbg.py <picklefile>

┌──(usercomputer)-[~/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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pickledbg-2.2.0.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pickledbg-2.2.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file pickledbg-2.2.0.tar.gz.

File metadata

  • Download URL: pickledbg-2.2.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for pickledbg-2.2.0.tar.gz
Algorithm Hash digest
SHA256 1d5a41d58f5ac437e7670f85666e2f3b319c9037b95eea5e42813a84b0786e32
MD5 5c194f79b46c7a0f28ff522e5e8f9708
BLAKE2b-256 da813195338c8c2ad7f7b0aa726965e669eee12716187133f195128080aa3dee

See more details on using hashes here.

File details

Details for the file pickledbg-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: pickledbg-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for pickledbg-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dd4e5f49a8a57fc56372523062f083f500a2210b364ba7cdef18a5968aa3d623
MD5 4896834ce79320819568a23ec9c2d287
BLAKE2b-256 59fbb8acb4f67116938f0df3fe37ce820b7739e1c93d44f0374d13e4dcad0daf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page