protodec is a tool to decompile protobuf parser/serializer classes compiled by protoc, from dotnet assemblies back into .proto definitions
Go to file
Xpl0itR 3fe8077e7f
Implement the things
2023-04-24 05:10:40 +01:00
.gitignore Initial commit 2023-04-20 23:01:53 +01:00
AssemblyInspector.cs Implement the things 2023-04-24 05:10:40 +01:00
IWriteable.cs Implement the things 2023-04-24 05:10:40 +01:00
LICENSE Initial commit 2023-04-20 23:01:53 +01:00
Program.cs Implement the things 2023-04-24 05:10:40 +01:00
ProtobufEnum.cs Implement the things 2023-04-24 05:10:40 +01:00
ProtobufMessage.cs Implement the things 2023-04-24 05:10:40 +01:00
Protodec.cs Implement the things 2023-04-24 05:10:40 +01:00
README.md Implement the things 2023-04-24 05:10:40 +01:00
StringExtensions.cs Implement the things 2023-04-24 05:10:40 +01:00
protodec.csproj Implement the things 2023-04-24 05:10:40 +01:00
protodec.sln Initial commit 2023-04-20 23:01:53 +01:00

README.md

protodec

A tool to decompile protobuf parser/serializer classes compiled by protoc, from dotnet assemblies back into .proto definitions.

Usage

Usage: protodec(.exe) [options] <target_assembly_path> <out_path>
Options:
  --skip_enums                  Skip parsing enums and replace references to then with int32.
  --include_runtime_assemblies  Add the assemblies of the current runtime to the search path.
Arguments:
  target_assembly_path  Either a single assembly or a directory of assemblies to be parsed.
  out_path              An existing directory to output into individual files, otherwise output to a single file.

Limitations

  • Integers are assumed to be (u)int32/64 as C# doesn't differentiate between them and sint32/64 and (s)fixed32/64. This could be solved by parsing the writer methods, however this wouldn't work on hollow assemblies such as DummyDlls produced by Il2CppDumper

Il2CppDumper

  • The Name parameter of OriginalNameAttribute is not dumped. In this case the C# names are used after conforming them to protobuf conventions
  • Dumped assemblies depend on strong-named core libs, however the ones dumped are not strong-named. This interferes with loading and can be bypassed by loading the strong-named libs from your runtime by passing the --include_runtime_assemblies flag

License

This project is subject to the terms of the Mozilla Public License, v. 2.0.