Advertisement
metalx1000

File Sharing and Virus scanning from the shell

Mar 20th, 2016
704
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. upload files/file sharing with curl or wget
  2. Service can also scan for viruses.
  3. https://transfer.sh/
  4.  
  5. Upload:
  6. $ curl --upload-file ./hello.txt https://transfer.sh/hello.txt
  7.  
  8. Encrypt & upload:
  9. $ cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt
  10.  
  11. Download & decrypt:
  12. $ curl https://transfer.sh/1lDau/test.txt|gpg -o- > /tmp/hello.txt
  13.  
  14. Upload to virustotal:
  15. $ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/virustotal
  16.  
  17. Add alias to .bashrc or .zshrc:
  18. ===
  19. transfer() {
  20. # write to output to tmpfile because of progress bar
  21. tmpfile=$( mktemp -t transferXXX )
  22. curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile;
  23. cat $tmpfile;
  24. rm -f $tmpfile;
  25. }
  26.  
  27. alias transfer=transfer
  28. ===
  29. $ transfer test.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement