Encrypt your files or notes by your GPG key and save to MinIO or Amazon S3 easily!


Super Dollop

Super Dollop can encrypt your files and notes by your own GPG key and save them in S3 or minIO to keep them safe and portability, also you can use Super Dollop for encrypt your file quickly to print it. So with Super Dollop you'll solve your keep your notes with security problem easily with Gopher. By the way if you want to encrypt your file you can print it directly to your terminal with -p easily.

list-command print
dollop list

Requirements

  • Go `>= 1.16
  • MinIO
  • Core dependencies: gnugpg, gpgme>=1.7.0, libgpg-error

Installation

Install gnupg

sudo apt-get install gnupg

Set your environments to your terminal

.zshrc

# Environment variables for MinIO
export MINIO_ENDPOINT=127.0.0.1:9000
export MINIO_ACCESS_KEY=admin
export MINIO_SECRET_KEY=secretadmin
export MINIO_GPG_ID=GPG-ID
export MINIO_BUCKET_NAME=dollop-files

Get your MinIO container.

docker-compose.yml

version: "3"
services:
  s3:
    image: "minio/minio"
    hostname: "storage"
    restart: "no"
    volumes:
      - data:/data
    ports:
      - "9000:9000"
      - "9001:9001"
    entrypoint: ["minio", "server", "/data","--console-address",":9001"]
    networks:
      - local
volumes:
  data:

networks:
  local:
// Pull minio/mc
docker pull minio/mc

// Run pulled image with docker-compose.yml file
docker-compose up

Give first gas to Super Dollop

// clone the super-dollop repository
git clone https://github.com/jack5341/super-dollop && cd super-dollop

// try to run list command
go run . list

Usage

dollop [FLAGS] [OPTIONS]
COMMANDS:
    completion  generate the autocompletion script for the specified shell
    dec         List your all encrypted files and notes.
    enc         A brief description of your command
    help        Help about any command
    list        List your all encrypted files and notes.

Cli Schema

Commands Flags
dec -n --name
enc -f --file -n --note -p --print
list -d --delete

Feedback

If you have any feedback, please reach out to us at [email protected]

License

Apache-2.0

Owner
Nedim AKAR
Creator of Invoiceprinter.com, Super Dollop and Pathokun, Frontend Developer at uxactly GmbH
Nedim AKAR
Comments
  • Feedback on various issues

    Feedback on various issues

    You should guard against file names that look like options:

    cmd := exec.Command("gpg", "--decrypt", filePath)
    

    If filePath happened to be --sign then it would be accepted as an option and you'd get the wrong results, possibly silently. Put a -- before the file name to stop option processing:

    cmd := exec.Command("gpg", "--decrypt", "--", filePath)
    

    There's a bytes.NewReader so you don't need to make an unneeded, extra copy of the user's data in memory:

    var out []byte
    // ...
    r := strings.NewReader(string(out))
    

    However, even better would be to stream the output of GnuPG straight into the bucket. The minio interface already takes a reader, so you could just hook up its StdoutPipe(). Set the length to -1.

    Same goes for decryption: Connect minio to the GnuPG process like a pipe. This avoids the need for (badly and dangerously) creating temporary files.

    Strongly consider explicitly using GnuPG's "unattended" interface via --batch and maybe --status-fd and --with-colons. That's how GnuPG is intended to be run non-interactively by other programs.

    Silence is golden. Do you really need to print output when everything was successful? Consider how go build itself prints nothing on success.

    panic is not an appropriate way to deal with everyday errors. Outside of OOM, regular users should never see panic messages. If PutObject fails (e.g. network error), print a useful error message. (IMHO, also it would also be better style to pass this error up to the top level, or nearly so, and let it do the printing, rather than mingling UI with your business logic. Same goes for validating command line options.)

    Always exit the process with an error status when an error terminates processing. Also, check the error results! Currently there a number of ways the program may silently lose data.

    Never print errors on standard output, especially if the user is expecting their data on standard output. Combined with the lack of error exit status, this is a recipe for disaster. If something fails, the user will never see the error, nor have any way to know it failed. Instead they'll quietly have the wrong data. This is a programming cardinal sin.

    Get more comfortable with byte slices, []byte. There are lots of needless, and even incorrect, string conversions. For instance:

    fmt.Println(string(data))
    

    Just do this instead:

    os.Stdout.Write(data)
    

    Not only is it more efficient, it doesn't append a spurious newline to the user's data. Also check the error!

  • version/v2.0

    version/v2.0

    v2.0 Patch Notes

    • Save encrypted file to current path
    • Generated CHANGELOG.md by git-cliff
    • Added validation for checking is connected and is there already same name
    • Refacted all logs about errors
  • This flag is already taken

    This flag is already taken

    When I try to add a new flag to cli your project give me:

    panic: unable to redefine 'n' shorthand in "super-dollop" flagset: it's already used for "name" flag     │ 
                                                                                                             │ jack5341@jack5341  ~  
    goroutine 1 [running]:                                                                                   │ jack5341@jack5341  ~  clear
    github.com/spf13/pflag.(*FlagSet).AddFlag(0xc0000ba100, 0xc0001cd680)                                    │                                                                                                         
            /home/jack5341/Nedim-Akar/Workspace/super-dollop/vendor/github.com/spf13/pflag/flag.go:874 +0x6f0│ jack5341@jack5341  ~  ws                
    github.com/spf13/pflag.(*FlagSet).VarPF(0xc0000ba100, 0x8f4ce0, 0xc000073dd0, 0x85cffa, 0x4, 0x85c6bf, 0x│ jack5341@jack5341  ~/Nedim-Akar/Workspace  clear
    1, 0x864431, 0x16, 0xc000073dd0)                                                                         │                                                                                                         
            /home/jack5341/Nedim-Akar/Workspace/super-dollop/vendor/github.com/spf13/pflag/flag.go:831 +0x10b│ jack5341@jack5341  ~/Nedim-Akar/Workspace  ls   
    github.com/spf13/pflag.(*FlagSet).VarP(...)                                                              │playground  super-dollop
            /home/jack5341/Nedim-Akar/Workspace/super-dollop/vendor/github.com/spf13/pflag/flag.go:837       │ jack5341@jack5341  ~/Nedim-Akar/Workspace  cd playground 
    github.com/spf13/pflag.(*FlagSet).StringVarP(0xc0000ba100, 0xc000073dd0, 0x85cffa, 0x4, 0x85c6bf, 0x1, 0x│ jack5341@jack5341  ~/Nedim-Akar/Workspace/playground  clear        
    0, 0x0, 0x864431, 0x16)                                                                                  │                                                                                                         
            /home/jack5341/Nedim-Akar/Workspace/super-dollop/vendor/github.com/spf13/pflag/string.go:42 +0xad│ jack5341@jack5341  ~/Nedim-Akar/Workspace/playground  docker-compose up      
    github.com/spf13/pflag.(*FlagSet).StringP(...)                                                           │Starting playground_s3_1 ... done
            /home/jack5341/Nedim-Akar/Workspace/super-dollop/vendor/github.com/spf13/pflag/string.go:67      │Attaching to playground_s3_1
    github.com/super-dollop/cmd.init.1()                                                                     │s3_1  | 
            /home/jack5341/Nedim-Akar/Workspace/super-dollop/cmd/encrypt.go:45 +0x134                        │s3_1  |  You are running an older version of MinIO released 2 days ago 
    exit status 2                                                                                            │s3_1  |  Update: Run `mc admin update` 
    

    System Information;

    • Ubuntu 20.04.3 LTS x86_64
  • Feat/enc command

    Feat/enc command

    Encryption (enc) command notes;

    • note flag for save your note with encryption by gpg
    • file flag for save your files with encryption by gpg
    • p flag for print your encrypted file directly
  • `dec` command need to refactor

    `dec` command need to refactor

    I am working on branch version/3.0

    command dec should include 3 flag store ,filename and download. --store command is specify to target encrypted file is in minIO or on local machine. MinIO should be connected just while user using related flag. I use 2 encryption method at here GPG and AES256 you can take input for recognise is it GPG or AES256.

    To do List

    • --store flag initialised variable should be false [boolean]
    • --filename is for specify where is the target file. [string] (required)
    • while user want to download his decrypted file, should be possible to download file to current path with --download flag if user didn't use this flag just print it to terminal. [string]
  • Can't encrypt and print anything without minIO

    Can't encrypt and print anything without minIO

    When I want to direct encrypt and print it see this error.

    ~/Desktop/Personal Projects/super-dollop master ❯ go run . enc --note=hello-world -p                                                                           21:58:58
    panic: failed to connect to minio client
    
    goroutine 1 [running]:
    github.com/jack5341/super-dollop/pkg.Connect(0x1400007c058)
            /Users/nedim/Desktop/Personal Projects/super-dollop/pkg/minio.go:18 +0x208
    github.com/jack5341/super-dollop/cmd.Execute()
            /Users/nedim/Desktop/Personal Projects/super-dollop/cmd/root.go:21 +0x20
    main.main()
            /Users/nedim/Desktop/Personal Projects/super-dollop/main.go:13 +0x20
    exit status 2```
  • Windows build doesn't work

    Windows build doesn't work

    Hi there. As stated, here's what happens when you start the binary under Windows 10 x64:

    panic: Endpoint:  does not follow ip address or domain name standards.
    
    goroutine 1 [running]:
    github.com/jack5341/super-dollop/pkg.Connect()
            /home/runner/work/super-dollop/super-dollop/pkg/minio.go:18 +0xa7
    github.com/jack5341/super-dollop/cmd.Execute()
            /home/runner/work/super-dollop/super-dollop/cmd/root.go:21 +0x19
    main.main()
            /home/runner/work/super-dollop/super-dollop/main.go:8 +0x17
    
Encrypt embedded go files using age.

encembed Encrypt embedded resource in compiled binary using age. Meant for usage with go generate. This tool will generate a go source file that embed

Nov 20, 2022
erchive is a go program that compresses and encrypts files and entire directories into .zep files (encrypted zip files).

erchive/zep erchive is a go program that compresses and encrypts files and entire directories into .zep files (encrypted zip files). it compresses usi

May 16, 2022
Let's Encrypt client and ACME library written in Go
Let's Encrypt client and ACME library written in Go

Let's Encrypt client and ACME library written in Go. Features ACME v2 RFC 8555 Register with CA Obtain certificates, both from scratch or with an exis

Dec 27, 2022
Let's Encrypt client and ACME library written in Go
Let's Encrypt client and ACME library written in Go

Let's Encrypt client and ACME library written in Go. Features ACME v2 RFC 8555 Register with CA Obtain certificates, both from scratch or with an exis

Dec 30, 2022
Driftwood is a tool that can enable you to lookup whether a private key is used for things like TLS or as a GitHub SSH key for a user.
Driftwood is a tool that can enable you to lookup whether a private key is used for things like TLS or as a GitHub SSH key for a user.

Driftwood is a tool that can enable you to lookup whether a private key is used for things like TLS or as a GitHub SSH key for a user. Drift

Dec 29, 2022
:lock: acmetool, an automatic certificate acquisition tool for ACME (Let's Encrypt)
:lock: acmetool, an automatic certificate acquisition tool for ACME (Let's Encrypt)

acmetool is an easy-to-use command line tool for automatically acquiring certificates from ACME servers (such as Let's Encrypt). Designed to flexibly

Dec 29, 2022
🌰 encrypt/decrypt using ssh keys

ssh-vault ?? encrypt/decrypt using ssh private keys Documentation https://ssh-vault.com Usage $ ssh-vault -h Example: $ echo "secret" | ssh-vault -u

Dec 30, 2022
CS http Dynamic Encrypt Bridge.
CS http Dynamic Encrypt Bridge.

CS http Dynamic Encrypt Bridge.

Nov 25, 2022
Barebones Go program to issue DDNS updates to Amazon Route 53 service.

Route53 DDNS Very simple DDNS using AWS Route 53 #/bin/bash # AWS_ACCESS_KEY_ID example (fake) export AWS_ACCESS_KEY_ID=KkRbWpoyqLHo69dvoskn # AWS_

May 17, 2021
EarlyBird is a sensitive data detection tool capable of scanning source code repositories for clear text password violations, PII, outdated cryptography methods, key files and more.
EarlyBird is a sensitive data detection tool capable of scanning source code repositories for clear text password violations, PII, outdated cryptography methods, key files and more.

EarlyBird is a sensitive data detection tool capable of scanning source code repositories for clear text password violations, PII, outdated cryptograp

Dec 10, 2022
An easy-to-use XChaCha20-encryption wrapper for io.ReadWriteCloser (even lossy UDP) using ECDH key exchange algorithm, ED25519 signatures and Blake3+Poly1305 checksums/message-authentication for Go (golang). Also a multiplexer.

Quick start Prepare keys (on both sides): [ -f ~/.ssh/id_ed25519 ] && [ -f ~/.ssh/id_ed25519.pub ] || ssh-keygen -t ed25519 scp ~/.ssh/id_ed25519.pub

Dec 30, 2022
:key: Idiotproof golang password validation library inspired by Python's passlib

passlib for go Python's passlib is quite an amazing library. I'm not sure there's a password library in existence with more thought put into it, or wi

Dec 30, 2022
🔑 A decentralized key derivation protocol for simple passphrase.

Throttled Identity Protocol (TIP) is a decentralized key derivation protocol, which allows people to obtain a strong secret key through a very simple passphrase, e.g. a six-digit PIN.

Dec 25, 2022
Program brute forcing the passphrase of a private key

Description This project provide a program brute forcing the passphrase of a private key (EC/RSA). ℹ️ This project was created to allow me to learn th

Oct 12, 2022
Extract endpoints marked as disallow in robots files to generate wordlists.
Extract endpoints marked as disallow in robots files to generate wordlists.

roboXtractor This tool has been developed to extract endpoints marked as disallow in robots.txt file. It crawls the file directly on the web and has a

Dec 21, 2022
2FA (Two-Factor Authentication) application for CLI terminal with support to import/export andOTP files.
2FA (Two-Factor Authentication) application for CLI terminal with support to import/export andOTP files.

zauth zauth is a 2FA (Two-Factor Authentication) application for terminal written in Go. Features Supports both TOTP and HOTP codes. Add new entries d

Nov 27, 2022
A Go-based program to find links from the list of Js files.
A Go-based program to find links from the list of Js files.

linkinjs - A Go based program to find links from list of Js files quickly Installation go get -u github.com/rc4ne/linkinjs Efficient Usage with other

Sep 30, 2022
Scans files for .jars potentially vulnerable to Log4Shell (CVE-2021-44228) by inspecting the class paths inside the .jar.

log4shelldetect Scans a file or folder recursively for jar files that may be vulnerable to Log4Shell (CVE-2021-44228) by inspecting the class paths in

Dec 15, 2022
Nov 9, 2022