25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

56 satır
1.5 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. Using Keybase:
  11. # import keys from keybase
  12. $ keybase track [them]
  13. # encrypt for recipients
  14. $ cat somebackupfile.tar.gz | keybase encrypt [them] | curl --upload-file '-' https://transfer.sh/test.txt
  15. # decrypt
  16. $ curl https://transfer.sh/sqUFi/test.md |keybase decrypt
  17. Upload to Virustotal:
  18. $ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/virustotal
  19. Virusscan:
  20. $ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/scan
  21. Add alias to .bashrc or .zshrc:
  22. ===
  23. transfer() {
  24. if [ $# -eq 0 ]; then
  25. echo "No arguments specified. Usage:"
  26. echo "$ transfer /tmp/test.md"
  27. echo "$ cat /tmp/test.md | transfer test.md"
  28. return 1
  29. fi
  30. # write to output to tmpfile because of progress bar
  31. tmpfile=$( mktemp -t transferXXX );
  32. if tty -s; then
  33. basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g');
  34. curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile;
  35. else
  36. curl --progress-bar --upload-file "-" "https://transfer.sh/$1"
  37. fi
  38. cat $tmpfile; rm -f $tmpfile;
  39. }
  40. alias transfer=transfer
  41. ===
  42. $ transfer test.txt