Skip to content

Instantly share code, notes, and snippets.

@schmich
Last active April 19, 2024 04:47
Show Gist options
  • Save schmich/f2ef5c85030863d630a97ec91c1b8eff to your computer and use it in GitHub Desktop.
Save schmich/f2ef5c85030863d630a97ec91c1b8eff to your computer and use it in GitHub Desktop.
Sharing encrypted data via termbin.com with only netcat and OpenSSL

Single file

Source

  • cat /foo/bar/file.txt | openssl enc -aes-256-cbc -base64 | nc termbin.com 9999
  • Enter password twice (quickly), note termbin.com URL

Destination

  • curl -s http://termbin.com/{id} | openssl enc -aes-256-cbc -base64 -d > file.txt

Entire directory

Source

  • tar -cz /foo/bar/project | openssl enc -aes-256-cbc -base64 | nc termbin.com 9999
  • Enter password twice (quickly), note termbin.com URL

Destination

  • curl -s http://termbin.com/{id} | openssl enc -aes-256-cbc -base64 -d | tar -xz
  • Payload will be extracted to project directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment