0x0.st.sh 605 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. #===============================================================
  3. # File URLs are valid for at least 30 days and up to a year (see below).
  4. # Shortened URLs do not expire.
  5. # Maximum file size: 512.0 MiB
  6. # Blocked file types: application/x-dosexec, application/x-executable
  7. #===============================================================
  8. URL="https://0x0.st"
  9. if [ $# -eq 0 ]; then
  10. echo "Usage: 0x0.st FILE\n"
  11. exit 1
  12. fi
  13. FILE=$1
  14. if [ ! -f "$FILE" ]; then
  15. echo "File ${FILE} not found"
  16. exit 1
  17. fi
  18. RESPONSE=$(curl -# -F "file=@${FILE}" "${URL}")
  19. echo "${RESPONSE}" # to terminal