You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

41 lines
1.4 KiB

  1. transfer.sh: Easy file sharing from the command line
  2. ===
  3. made with <3 by DutchCoders
  4. Upload:
  5. $ curl --upload-file ./hello.txt https://transfer.sh/hello.txt
  6. Encrypt & upload:
  7. $ cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt
  8. Download & decrypt:
  9. $ curl https://transfer.sh/1lDau/test.txt|gpg -o- > /tmp/hello.txt
  10. Grep pound from syslog and transfer
  11. cat /var/log/syslog|grep pound|curl --upload-file - https://transfer.sh/pound.log
  12. Using Keybase:
  13. # import keys from keybase
  14. $ keybase track [them]
  15. # encrypt for recipients
  16. $ cat somebackupfile.tar.gz | keybase encrypt [them] | curl --upload-file '-' https://transfer.sh/test.txt
  17. # decrypt
  18. $ curl https://transfer.sh/sqUFi/test.md |keybase decrypt
  19. Upload to Virustotal:
  20. $ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/virustotal
  21. Virusscan:
  22. $ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/scan
  23. Add alias to .bashrc or .zshrc:
  24. ===
  25. transfer() {
  26. if [ $# -eq 0 ]; then echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi
  27. tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1"; fi; cat $tmpfile; rm -f $tmpfile; }
  28. }
  29. ===
  30. $ transfer test.txt