-
-
Save tonidy/3637a41946346653b01408a489fcc445 to your computer and use it in GitHub Desktop.
Simple cli tool to use https://0x0.st for ephemeral file uploads. Install: curl https://gist.githubusercontent.com/gingerbeardman/5398a5feee9fa1e157b827d245678ae3/raw/9ea5c714b41bdef77a8984bc91ff5d248c48d048/0x0.sh | sudo tee /usr/local/bin/0x0.sh && sudo chmod +x /usr/local/bin/0x0.sh
This file contains hidden or 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
#!/bin/sh | |
URL="https://0x0.st" | |
if [ $# -eq 0 ]; then | |
echo "Usage: 0x0.st FILE\n" | |
exit 1 | |
fi | |
FILE=$1 | |
if [ ! -f "$FILE" ]; then | |
echo "File ${FILE} not found" | |
exit 1 | |
fi | |
RESPONSE=$(curl -# -F "file=@${FILE}" "${URL}") | |
echo "${RESPONSE}" | pbcopy # to clipboard | |
echo "${RESPONSE}" # to terminal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment