Skip to content

Instantly share code, notes, and snippets.

@gingerbeardman
Last active October 28, 2022 00:37
Show Gist options
  • Star 17 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save gingerbeardman/5398a5feee9fa1e157b827d245678ae3 to your computer and use it in GitHub Desktop.
Save gingerbeardman/5398a5feee9fa1e157b827d245678ae3 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
#!/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
@kairusds
Copy link

kairusds commented Jun 27, 2020

curl https://gist.githubusercontent.com/gingerbeardman/5398a5feee9fa1e157b827d245678ae3/raw/9ea5c714b41bdef77a8984bc91ff5d248c48d048/0x0 | sudo tee /usr/local/bin/0x0 && sudo chmod +x /usr/local/bin/0x0

0x0 file.txt

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