Babble will use a provided key file to create a simple substitution cipher in order to decrypt/encrypt files.
Open a terminal and run the following:
$ go get --ldflags "-s -w" --trimpath -u github.com/mjwhitta/babble
$ go install --ldflags "-s -w" --trimpath \
github.com/mjwhitta/babble/cmd/babble@latest
Or compile from source:
$ git clone https://github.com/mjwhitta/babble.git
$ cd babble
$ git submodule update --init
$ make
$ babble -k /path/to/key.txt /path/to/payload >payload.bab
$ babble -d -k /path/to/key.txt payload.bab >/path/to/payload
or create main.go
similar to:
package main
import (
_ "embed"
"fmt"
"github.com/mjwhitta/babble"
)
//go:embed payload.bab
var payload []byte
func main() {
var b []byte
var e error
if b, e = babbleDecrypt(payload); e != nil {
panic(e)
}
fmt.Printf("%s", b)
}
Then run the following commands:
$ babble -k /path/to/key.txt /path/to/payload >payload.bab
$ babble -k /path/to/key.txt >>main.go # This creates babbleDecrypt()
$ go run ./main.go