All Projects → sj14 → multicode

sj14 / multicode

Licence: MIT license
💱 Decode bits, bytes, hex, base64 and protobuf recursively with a single command

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to multicode

Gametracking
🛢 Dumping things, so you don't have to
Stars: ✭ 204 (+1175%)
Mutual labels:  protobuf
Protoman
Postman for protobuf APIs
Stars: ✭ 241 (+1406.25%)
Mutual labels:  protobuf
flyteidl
Specification of the IR for Flyte workflows and tasks. Also Interfaces for all backend services. https://docs.flyte.org/projects/flyteidl/en/stable/
Stars: ✭ 27 (+68.75%)
Mutual labels:  protobuf
Clay
Proto-first minimal server platform for gRPС+REST+Swagger APIs
Stars: ✭ 212 (+1225%)
Mutual labels:  protobuf
Go Space Chat
【孤单Lonely】基于Golang/WebSocket/Canvas/Protobuf 的聊天室
Stars: ✭ 228 (+1325%)
Mutual labels:  protobuf
Quick Protobuf
A rust implementation of protobuf parser
Stars: ✭ 244 (+1425%)
Mutual labels:  protobuf
Istio Micro
istio 微服务示例代码 grpc+protobuf+echo+websocket+mysql+redis+kafka+docker-compose
Stars: ✭ 194 (+1112.5%)
Mutual labels:  protobuf
rmarsh
Ruby Marshal 4.8 encoder/decoder in Golang. Why? Who knows.
Stars: ✭ 15 (-6.25%)
Mutual labels:  encoder
Gordon cnn
A small convolution neural network deep learning framework implemented in c++.
Stars: ✭ 241 (+1406.25%)
Mutual labels:  protobuf
JavaSteam
Java library that provides an interface to directly interact with Valve's Steam servers.
Stars: ✭ 70 (+337.5%)
Mutual labels:  protobuf
Protoc Gen Lint
A plug-in for Google's Protocol Buffers (protobufs) compiler to lint .proto files for style violations.
Stars: ✭ 221 (+1281.25%)
Mutual labels:  protobuf
Protobuf Jetbrains Plugin
Protobuf Support for JetBrains IDEs
Stars: ✭ 226 (+1312.5%)
Mutual labels:  protobuf
Play Store Api
Google Play Store protobuf API wrapper in java
Stars: ✭ 249 (+1456.25%)
Mutual labels:  protobuf
Rules protobuf
Bazel rules for building protocol buffers and gRPC services (java, c++, go, ...)
Stars: ✭ 206 (+1187.5%)
Mutual labels:  protobuf
golang-example-app
Example application
Stars: ✭ 138 (+762.5%)
Mutual labels:  protobuf
Him Netty
开源的H5即时聊天系统 spring-boot + netty + protobuf + vue ~
Stars: ✭ 194 (+1112.5%)
Mutual labels:  protobuf
Unitysocketprotobuf3demo
主要实现了用Unity对接了Leaf服务器。其次带了些小工具。
Stars: ✭ 244 (+1425%)
Mutual labels:  protobuf
go-chat
go-chat.使用Go基于WebSocket开发的web聊天应用。单聊,群聊。文字,图片,语音,视频消息,屏幕共享,剪切板图片,基于WebRTC的P2P语音通话,视频聊天。
Stars: ✭ 516 (+3125%)
Mutual labels:  protobuf
raster
A micro server framework, support coroutine, and parallel-computing, used for building flatbuffers/thrift/protobuf/http protocol service.
Stars: ✭ 19 (+18.75%)
Mutual labels:  protobuf
BatchEncoder
BatchEncoder is an audio files conversion software.
Stars: ✭ 145 (+806.25%)
Mutual labels:  encoder

multicode

Build Status Go Report Card GoDoc

multicode allows to input a (nested) bits, bytes, hex, base64 or proto (protocol buffers) encoded sequence and will recursively try to decode it. This is helpful when you get encoded data but don't exactly know how it was encoded or decoding might lead to cumbersome command concatenation.

Installation

CLI

Precompiled Binaries

Binaries are available for all major platforms. See the releases page.

Homebrew

Using the Homebrew package manager for macOS:

brew install sj14/tap/multicode

Manually

It's also possible to install the current development snapshot with go get:

go get -u github.com/sj14/multicode/cmd/decode

Web Interface

Demo

go get -u github.com/sj14/multicode/cmd/decode-web

CLI Usage

  -base64
        use base64 decoding (default true)
  -bit
        use bit decoding (default true)
  -byte
        use byte decoding (default true)
  -hex
        use hex decoding (default true)
  -proto
        use proto decoding (default true)
  -verbose
        verbose output mode
  -version
        print version information

CLI Examples

Decode byte input

$ decode "72 101 108 108 111 32 87 111 114 108 100"
Hello World

Decode nested decodings

First, let's encode a string with hex and base64 encoding:

$ echo hello there | xxd -p | base64
Njg2NTZjNmM2ZjIwNzQ2ODY1NzI2NTBhCg==

Decode:

$ decode Njg2NTZjNmM2ZjIwNzQ2ODY1NzI2NTBhCg==
hello there

Decode using the pipe:

$ echo Njg2NTZjNmM2ZjIwNzQ2ODY1NzI2NTBhCg== | decode
hello there

Decode in verbose mode:

$ decode -v Njg2NTZjNmM2ZjIwNzQ2ODY1NzI2NTBhCg==
- applied decoding 'base64':
68656C6C6F207468657265

- applied decoding 'hex':
hello there

- result:
hello there

Disable hex decoding:

$ decode -v -hex=false Njg2NTZjNmM2ZjIwNzQ2ODY1NzI2NTBhCg==
- applied decoding 'base64':
68656C6C6F207468657265

- result:
68656C6C6F207468657265

Protobuf

We can decode protocol buffer encodings without specifying a proto file. Based on the missing definition file, it's unfortunately not possible, to output the field names. Field names will be replaced by the field id.

Let's assume the following proto message:

message Message {
  string query = 1;
  int32 page_number = 2;
  int32 result_per_page = 3;
  enum Corpus {
      UNIVERSAL = 0;
      WEB = 1;
  }
  Corpus corpus = 4;
}

And we initialize the message like this:

Message{
  Query:      "my query",
  PageNumber: 42,
  Corpus:     ComplexMessage_NEWS,
}

The hex decoded proto message (0a086d79207175657279102a2006) will be decoded as:

$ decode 0a086d79207175657279102a2004
1:"my query" 2:42 4:6

Using with Docker

CLI Version

docker build -f Dockerfile.decode -t decode .
docker run --rm -it decode

Web Version

docker build -f Dockerfile.decode-web -t decode-web .
docker run --rm -it -p 8080:8080 decode-web
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].