Skip to content

Instantly share code, notes, and snippets.

@jobwat
Last active February 14, 2023 14:44
Show Gist options
  • Save jobwat/540911c0c6ed3083bebc917c56da9307 to your computer and use it in GitHub Desktop.
Save jobwat/540911c0c6ed3083bebc917c56da9307 to your computer and use it in GitHub Desktop.
Send a file to snappass with curl via command line
cat my-file | curl https://snappass.nurun.com.au -s --data "password=$(cat - | perl -p -e 's/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg')&ttl=1+day" | grep 'password-link.*readonly' | sed -E 's/.*"(http[^"]*)".*/\1/'
@Arnaud-Interactiv
Copy link

Work on snappass version 1.6.0
cat my-file | curl -X POST https://SNAPPASS-URL -s --data "password=$(cat - | perl -p -e 's/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg')&ttl=day" | grep 'password-link.*readonly' | sed -E 's/.*"(http[^"]*)".*/\1/'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment