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. In addition, clear, extensive, and unified documentation is included for the Pickle Machine and each opcode. This documentation comes from the official source code, complete with added notes from the maintainer (me!).

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.)

Pickle Documentation

work in progress

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.1.0.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

pickledbg-2.1.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pickledbg-2.1.0.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for pickledbg-2.1.0.tar.gz
Algorithm Hash digest
SHA256 6bcd76e49476f395b93c7170ab145cc884e291928b450c286c4126dce73571fa
MD5 7a1253327034ed182a5b5ed231edb16c
BLAKE2b-256 9848e9d395b502bb8e4f2e5195584f620943fff91dcf37e1b50ba294140cf12b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pickledbg-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for pickledbg-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb95cbe018e99a33a542db784dacc85577ef68ef81687700c724994e884353e4
MD5 f5459a7176ce5527ed183e36f959edfd
BLAKE2b-256 bfb7a2c60bdfff2e7b040a79b7f1158747267ffc1eb41822f196fb435ab3d2ac

See more details on using hashes here.

Supported by

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