libdestruct

Inflate binary memory into Pythonic C-like structures for inspection and mutation.

9|Updated Jul 7, 2024
One-click install
npx skills add https://github.com/libdebug/libdestruct --skill libdestruct
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: libdestruct
Source: https://github.com/libdebug/libdestruct/tree/main
Command: npx skills add https://github.com/libdebug/libdestruct --skill libdestruct

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Map raw memory into Pythonic C-like data structures for safe inspection and mutation.

Core Features & Use Cases

  • Define structs with Python type annotations and optional C parser support
  • Inflate, read, and write values from raw memory buffers
  • Follow pointers, arrays, enums, bitfields, and unions
  • Serialize to bytes, generate dictionaries, and produce hex dumps
  • Support memory inspection workflows including diff/reset/freeze

Quick Start

Create an inflater from a memory buffer and inflate your first struct at offset 0.

Frequently Asked Questions about libdestruct

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I map raw memory into C structs for reverse engineering?

You can map raw binary memory into C structs by using a memory resolver to inflate buffers into Pythonic objects. This allows direct inspection and mutation of complex binary formats during reverse engineering workflows.

Can I parse C pointers, arrays, and unions directly from memory buffers?

Yes, parsing C pointers, arrays, enums, and unions directly from memory buffers is fully supported. The inflation mechanism follows memory-backed references to accurately map complex binary formats into Pythonic structures.

Do I need a memory resolver to inflate binary structures?

Yes, an underlying memory resolver is required to map raw bytes to structured objects. You must also define your structs using typing-based definitions for the inflater to correctly interpret the binary data.

How do I track memory mutations during binary debugging workflows?

You can track memory mutations during binary debugging using built-in snapshot features like freeze, diff, and reset. These allow you to capture memory states, compare structural changes, and restore previous conditions.

What is the best way to serialize inflated C structs back to bytes?

The best way to serialize inflated C structs back to bytes is using the built-in serialization features. This enables you to write mutated values directly into raw memory buffers or export structured data representations.