Last active
February 14, 2023 14:44
-
-
Save jobwat/540911c0c6ed3083bebc917c56da9307 to your computer and use it in GitHub Desktop.
Send a file to snappass with curl via command line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/'