Categorygithub.com/dennwc/protod
modulepackage
1.0.1
Repository: https://github.com/dennwc/protod.git
Documentation: pkg.go.dev

# README

protod

Sometimes it is necessary to recover .proto files from binaries or memory dumps.

protod does exactly this - it finds protobuf descriptors in any binary files and writes them back as .proto text files.

Supports:

  • proto2 and proto3
  • messages, enums, services
  • Extraction from uncompressed file descriptors (used in C/C++, maybe others)

Not supported yet:

  • Field or file options
  • Oneof fields
  • Extensions
  • Compressed file descriptors (used in Go)
  • Recovery without file descriptors

Installation

Go 1.12+ is required.

go get -u github.com/dennwc/protod
go install github.com/dennwc/protod/cmd/protod 

Usage

protod --out=./out some_binary

The tool will emit recovered .proto files to ./out directory.

License

MIT (based on protod Python script by Sysdream)

# Packages

No description provided by the author

# Functions

Extract reads data from r and calls a function for each occurrence of protobuf file descriptors.
ExtractBytes calls a function for each occurrence of protobuf file descriptors in a bytes slice.
Render writes a .proto file based on a FileDescriptorProto.

# Type aliases

ExtractFunc is a callback for Extract functions.
FileDescriptorProto is an alias for protobuf's FileDescriptorProto.