Skip to content

ThalesGroup/prototools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

309 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

prototools

A collection of protobuf utilities for working with binary descriptors and wire-format messages.

Tutorial: from first decode to schema inference

Tools

prototext

prototext logo

Lossless, bidirectional converter between binary protobuf wire format and human-readable text. Decodes with or without a schema; encodes annotated prototext back to byte-exact binary. Supports schema inference: given a descriptor DB it ranks all candidate types and picks the best match.

→ See prototext/README.md

reproto

reproto logo

Reconstructs compilable .proto source files from binary or text-format FileDescriptorSet / FileDescriptorProto blobs. Supports proto2, proto3, and editions. Output recompiles to a descriptor equivalent to the input.

→ See reproto/README.md

reproto-instantiate-schema

Generates pseudo-random binary protobuf instances from a .desc FileDescriptorSet. Used to populate schema-DB test corpora and as a quick sanity-check that a descriptor is well-formed.

reproto-instantiate-schema --descriptor-set my.desc --seed 42 -O out/ \
    google.type.PostalAddress google.protobuf.Timestamp

protoscan

Scans binary files (shared libraries, executables, firmware images) for embedded FileDescriptorProto blobs and extracts them as individual .pb files, one per proto file descriptor found. The extracted blobs can be fed directly to reproto to recover .proto source.

protoscan --proto_out extracted/ some_binary
reproto --use-variant descriptor -O src/ -I extracted/ extracted/*.pb

License

MIT — see LICENSES/MIT.txt.

About

A collection of protobuf utilities written in Rust

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors