選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

40 行
1.3 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 echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi
  25. 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; }; alias transfer=transfer
  26. }
  27. alias transfer=transfer
  28. ===
  29. $ transfer test.txt