protoss

package module
v0.0.0-...-483173e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

README

Gophercraft/protoss

Go Reference Chat on discord

Protoss is a tool used to decompile Protobuf message and BGS service descriptors from an executable file.

Protoss is specifically created for the purpose of decompiling BGS service definitions for use in Gophercraft, and might not be useful for other applications.

Workflow

Protoss uses its own output to assist in subsequent decompilation.

BGS services have additional metadata tucked away in their service descriptors, which need to be extracted.

1. Extract definitions

protoss game.exe -o proto

2. Compile extensions

./script/compile_extensions

3. Rebuild Protoss

go install -v github.com/Gophercraft/protoss/cmd/protoss

4. Re-extract definitions now with proper extensions available

protoss game.exe -o proto

Thanks

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpBinary

func DumpBinary(binary_path string, options *DumpOptions) (err error)

Types

type DumpOptions

type DumpOptions struct {
	// The directory to output decompiled definitions to
	Output string
	// The Go package path to prepend to Protocol Buffers packages
	// when generating "go_package" attribute
	GoPrefix string
	// If true, output additional .json files to assist in ensuring accurate .proto decompilation
	JSON bool
	// If true, don't output descriptors that are in the google/ path
	IgnoreGoogle bool
}

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Read

func OpenBinary

func OpenBinary(path string) (reader *Reader, err error)

func (*Reader) Close

func (reader *Reader) Close() (err error)

func (*Reader) ReadDescriptor

func (reader *Reader) ReadDescriptor() (file_descriptor *descriptorpb.FileDescriptorProto, err error)

func (*Reader) ReadDescriptorBytes

func (reader *Reader) ReadDescriptorBytes() ([]byte, error)

Directories

Path Synopsis
cmd
extensions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL