Skip to content

Instantly share code, notes, and snippets.

@ysangkok
Last active January 3, 2016 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ysangkok/8411890 to your computer and use it in GitHub Desktop.
Save ysangkok/8411890 to your computer and use it in GitHub Desktop.
hushfile encrypted upload
#!/usr/bin/env bash
cat INPUTFILE | \
openssl enc -aes-256-cbc -pass pass:BOSS123 | \
base64 | \
tr -d '\n' | \
curl --data-urlencode cryptofile@- --data-urlencode metadata=$(\
echo '{"filename":"lol","mimetype":"text/lol","filesize":"very big","deletepassword":"ITSWRONG"}' | \
openssl enc -aes-256-cbc -pass pass:BOSS123 | \
base64 | \
tr -d '\n'\
) --data-urlencode deletepassword=THATSRIGHT "https://hushfile.it/api/upload"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment