--- id: bbpb version: "1.4.2" license: MIT license_treatment: permissive maintenance: active --- # bbpb — Library for working with protobuf messages without a protobuf type definition. License: permissive · Maintenance: active · Downloads: 188.2K/mo ## What it is and what it does bbpb is a Python library for working with Protocol Buffer messages when you don't have the original .proto schema file. It decodes binary protobuf data by inferring field types from wire-type metadata and field content, then returns both the decoded message as a Python dictionary and a generated type definition. You can modify the decoded message and re-encode it back to binary using the type definition. The library is designed for penetration testing and security research scenarios where protobuf messages need to be inspected and modified without access to the schema. It provides both a Python API and a command-line tool. The type inference is best-effort—most common fields parse correctly, but you can also supply custom type definitions to override guesses or name fields for readability. It includes convenience functions for JSON encoding/decoding and .proto file import/export, though the latter has known limitations with certain proto syntax. Use it for: - Penetration testing: intercept and modify protobuf messages in transit when schema is unavailable - Reverse engineering: decode and understand protobuf message structure from binary samples alone - Security research: analyze and fuzz protobuf-based protocols without access to source definitions - Message inspection: examine and transform protobuf payloads in debugging or forensic workflows - Protocol analysis: extract and manipulate protobuf fields for API testing or integration work ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Decode and re-encode Protocol Buffer messages without access to the source .proto descriptor file, making educated guesses about field types based on wire-type metadata. Yes. The package is actively maintained, has no known vulnerabilities, installs with minimal friction, and fills a genuine gap in protobuf tooling for scenarios where the schema is unavailable. MIT licensing removes legal friction. Install it if you work with protobuf-based systems in security, testing, or reverse-engineering contexts. ## Install pip install bbpb uv add bbpb poetry add bbpb ## Installing bbpb Before you install: Low friction: pure Python wheel with a single dependency (six). Actively maintained with recent commits and no known vulnerabilities. License in practice: MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install bbpb import base64 data = base64.b64decode('KglNb2RpZnkgTWU=') message, typedef = bbpb.decode_message(data) message[5] = 'Modified Me' encoded = bbpb.encode_message(message, typedef) Verify before relying: - Accuracy of type inference for complex or ambiguous wire-type scenarios - Performance characteristics when handling large or deeply nested messages - Completeness of .proto file round-trip conversion (documentation notes limitations) ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 188.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags protobuf decode without schema, reverse engineer protobuf messages, protobuf manipulation without descriptor, blackbox protobuf parsing, modify protobuf messages blind, protobuf type inference, protobuf security testing, protobuf, reverse-engineering, security-testing [View on SkillFed](https://skillfed.io/packages/bbpb) · [View on PyPI](https://pypi.org/project/bbpb/)