{"id":18894098,"url":"https://github.com/trailofbits/protofuzz","last_synced_at":"2025-04-13T00:41:50.160Z","repository":{"id":47667317,"uuid":"58768651","full_name":"trailofbits/protofuzz","owner":"trailofbits","description":"Google Protocol Buffers message generator","archived":false,"fork":false,"pushed_at":"2023-06-12T05:09:03.000Z","size":59,"stargazers_count":276,"open_issues_count":13,"forks_count":35,"subscribers_count":44,"default_branch":"master","last_synced_at":"2025-04-04T03:10:05.802Z","etag":null,"topics":["fuzzer","protobuf","protocol-buffers"],"latest_commit_sha":null,"homepage":"https://blog.trailofbits.com/2016/05/18/protofuzz-a-protobuf-fuzzer/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trailofbits.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-13T19:55:40.000Z","updated_at":"2025-02-21T08:25:15.000Z","dependencies_parsed_at":"2024-06-19T05:32:08.437Z","dependency_job_id":"3d3d48d8-a4d4-4150-9085-884e13b85a4b","html_url":"https://github.com/trailofbits/protofuzz","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailofbits%2Fprotofuzz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailofbits%2Fprotofuzz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailofbits%2Fprotofuzz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailofbits%2Fprotofuzz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trailofbits","download_url":"https://codeload.github.com/trailofbits/protofuzz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650416,"owners_count":21139672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fuzzer","protobuf","protocol-buffers"],"created_at":"2024-11-08T08:17:49.526Z","updated_at":"2025-04-13T00:41:50.141Z","avatar_url":"https://github.com/trailofbits.png","language":"Python","readme":"# ProtoFuzz\n\n[![CI](https://github.com/trailofbits/protofuzz/workflows/CI/badge.svg)](https://github.com/trailofbits/protofuzz/actions/workflows/ci.yml)\n[![PyPI version](https://badge.fury.io/py/protofuzz.svg)](https://badge.fury.io/py/protofuzz)\n\nProtoFuzz is a generic fuzzer for Google’s Protocol Buffers format. Instead of defining a new fuzzer generator for custom binary formats, protofuzz automatically creates a fuzzer based on the same format definition that programs use. ProtoFuzz is implemented as a stand-alone Python3 program.\n\n## Installation\n\nMake sure you have protobuf package installed and `protoc` is accessible from $PATH, and that `protoc` can generate Python3-compatible code.\n\n```console\n$ git clone --recursive git@github.com:trailofbits/protofuzz.git\n$ cd protofuzz\n$ python3 setup.py install\n```\n\n## Usage\n\n```python\n\u003e\u003e\u003e from protofuzz import protofuzz\n\u003e\u003e\u003e message_fuzzers = protofuzz.from_description_string(\"\"\"\n...     message Address {\n...      required int32 house = 1;\n...      required string street = 2;\n...     }\n... \"\"\")\n\u003e\u003e\u003e for obj in message_fuzzers['Address'].permute():\n...     print(\"Generated object: {}\".format(obj))\n...\nGenerated object: house: -1\nstreet: \"!\"\n\nGenerated object: house: 0\nstreet: \"!\"\n\nGenerated object: house: 256\nstreet: \"!\"\n...\n```\n\nYou can also create dependencies between arbitrary fields that are resolved with\nany callable object:\n\n```python\n\u003e\u003e\u003e message_fuzzers = protofuzz.from_description_string(\"\"\"\n...     message Address {\n...      required int32 house = 1;\n...      required string street = 2;\n...     }\n...     message Other {\n...       required Address addr = 1;\n...       required uint32 foo = 2;\n...     }\n... \"\"\")\n\u003e\u003e\u003e fuzzer = message_fuzzers['Other']\n\u003e\u003e\u003e # The following creates a dependency that ensures Other.foo is always set\n\u003e\u003e\u003e # to 1 greater than Other.addr.house\n\u003e\u003e\u003e fuzzer.add_dependency('foo', 'addr.house', lambda x: x+1)\n\u003e\u003e\u003e for obj in fuzzer.permute():\n...     print(\"Generated object: {}\".format(obj))\n```\n\nNote however, the values your lambda creates must be conformant to the destination\ntype.\n\n## Caveats\n\nCurrently, we use [fuzzdb](https://github.com/fuzzdb-project/fuzzdb) for values. This might not be complete or appropriate for your use. Consider swapping it for your own values.\n\nIf you have your own separate instance of fuzzdb, you can export `FUZZDB_DIR`\nin your environment with the absolute path to your instance.\n\n```console\nexport FUZZDB_DIR=/path/to/your/fuzzdb\n```\n","funding_links":[],"categories":["Pentesting"],"sub_categories":["Payloads"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrailofbits%2Fprotofuzz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrailofbits%2Fprotofuzz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrailofbits%2Fprotofuzz/lists"}