# Upload using cURL
$ curl --upload-file ./hello.txt http://transfersh.wolke.img.univie.ac.at/hello.txt http://transfersh.wolke.img.univie.ac.at/9Sfs2E/hello.txt
# Using userservices (Available only on IMGW servers)
$ userservices transfersh hello.txt
[TRANSFERSH] hello.txt file or directory found [ OK]
[TRANSFERSH] transfered [ OK]
Max-Downloads: 1, Max-Days: 1
Link: https://http://transfersh.wolke.img.univie.ac.at/9Sfs2E/hello.txt
Deletion Token: IcONb1BlBa7S
# Using the shell function
$ transfer hello.txt
##################################################### 100.0% http://transfersh.wolke.img.univie.ac.at/lsUjwJ/hello.txt
# Uploading is easy using curl
$ curl --upload-file ./hello.txt http://transfersh.wolke.img.univie.ac.at/hello.txt
http://transfersh.wolke.img.univie.ac.at/9Sfs2E/hello.txt
$ curl -H "Max-Downloads: 1" -H "Max-Days: 5" --upload-file ./hello.txt http://transfersh.wolke.img.univie.ac.at/hello.txt
http://transfersh.wolke.img.univie.ac.at/9Sfs2E/hello.txt
# Download the file
$ curl http://transfersh.wolke.img.univie.ac.at/9Sfs2E/hello.txt -o hello.txt
# userservices transfersh -h
$ userservices transfersh -h
User Services - Transfer files/directories (IMGW subnet)
transfersh -h -e -m [email] -d [link] -t [days] -x [num] -k [key] -s [email]
Options:
-h Help
-e Encrypt upload
-m [email] Send Mail with URL to email.
-d [link] Download and decrypt
-t [days] Days before deletion. Default: 1
-x [num] Number of downloads. Default: 1
-k [key] Manual Encryption/Decryption key
-s [email] Sender of Mail. Default: user@server
...
# You can use ther user service to transfer
$ userservices transfersh hello.txt
# Add this to .bashrc or .zshrc or its equivalent
transfer(){ if [ $# -eq 0 ];then echo "No arguments specified.\nUsage:\n transfer <file|directory>\n ... | transfer <file_name>">&2;return 1;fi;if tty -s;then file="$1";file_name=$(basename "$file");if [ ! -e "$file" ];then echo "$file: No such file or directory">&2;return 1;fi;if [ -d "$file" ];then file_name="$file_name.zip" ,;(cd "$file"&&zip -r -q - .)|curl --progress-bar --upload-file "-" "http://transfersh.wolke.img.univie.ac.at/$file_name"|tee /dev/null,;else cat "$file"|curl --progress-bar --upload-file "-" "http://transfersh.wolke.img.univie.ac.at/$file_name"|tee /dev/null;fi;else file_name=$1;curl --progress-bar --upload-file "-" "http://transfersh.wolke.img.univie.ac.at/$file_name"|tee /dev/null;fi;}
# Now you can use transfer function
$ transfer hello.txt
$ curl -i -F filedata=@/tmp/hello.txt -F filedata=@/tmp/hello2.txt http://transfersh.wolke.img.univie.ac.at/
# Combining downloads as zip or tar archive
$ curl http://transfersh.wolke.img.univie.ac.at/(9Sfs2E/hello.txt,lsUjwJ/world.txt).tar.gz
$ curl http://transfersh.wolke.img.univie.ac.at/(9Sfs2E/hello.txt,lsUjwJ/world.txt).zip
# Encrypt files with password using gpg
$ cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" http://transfersh.wolke.img.univie.ac.at/test.txt
# Download and decrypt
$ curl http://transfersh.wolke.img.univie.ac.at/9Sfs2E/test.txt|gpg -o- > /tmp/hello.txt
# Scan for malware or viruses using Clamav
$ wget http://www.eicar.org/download/eicar.com
$ curl -X PUT --upload-file ./eicar.com http://transfersh.wolke.img.univie.ac.at/eicar.com/scan
# Upload malware to VirusTotal, get a permalink in return
$ curl -X PUT --upload-file nhgbhhj http://transfersh.wolke.img.univie.ac.at/test.txt/virustotal
# Backup, encrypt and transfer
$ mysqldump --all-databases|gzip|gpg -ac -o-|curl -X PUT --upload-file "-" http://transfersh.wolke.img.univie.ac.at/test.txt
# Transfer and send email with link (uses shell function)
$ transfer /tmp/hello.txt | mail -s "Hello World" user@yourmaildomain.com
# Import keys from keybase
$ keybase track [them]
# Encrypt for recipient(s)
$ cat somebackupfile.tar.gz | keybase encrypt [them] | curl --upload-file '-' http://transfersh.wolke.img.univie.ac.at/test.txt
# Decrypt
$ curl http://transfersh.wolke.img.univie.ac.at/9Sfs2E/test.md |keybase decrypt
# wget
$ wget --method PUT --body-file=/tmp/file.tar http://transfersh.wolke.img.univie.ac.at/file.tar -O - -nv
# grep syslog for pound and transfer
$ cat /var/log/syslog|grep pound|curl --upload-file - http://transfersh.wolke.img.univie.ac.at/pound.log
# Upload using Powershell
PS H:\> invoke-webrequest -method put -infile .\file.txt http://transfersh.wolke.img.univie.ac.at/file.txt
# HTTPie
$ http http://transfersh.wolke.img.univie.ac.at/ -vv < /tmp/test.log
# Encrypt files with password using openssl
$ cat /tmp/hello.txt|openssl aes-256-cbc -pbkdf2 -e|curl -X PUT --upload-file "-" http://transfersh.wolke.img.univie.ac.at/test.txt
# Download and decrypt
$ curl http://transfersh.wolke.img.univie.ac.at/9Sfs2E/test.txt|openssl aes-256-cbc -pbkdf2 -d > /tmp/hello.txt
#Save this as transfer.cmd in Windows 10 (which has curl.exe)
@echo off
setlocal EnableDelayedExpansion EnableExtensions
goto main
:usage
echo No arguments specified. >&2
echo Usage: >&2
echo transfer ^<file^|directory^> >&2
echo ... ^| transfer ^<file_name^> >&2
exit /b 1
:main
if "%~1" == "" goto usage
timeout.exe /t 0 >nul 2>nul || goto not_tty
set "file=%~1"
for %%A in ("%file%") do set "file_name=%%~nxA"
if exist "%file_name%" goto file_exists
echo %file%: No such file or directory >&2
exit /b 1
:file_exists
if not exist "%file%\" goto not_a_directory
set "file_name=%file_name%.zip"
pushd "%file%" || exit /b 1
set "full_name=%temp%\%file_name%"
powershell.exe -Command "Get-ChildItem -Path . -Recurse | Compress-Archive -DestinationPath ""%full_name%"""
curl.exe --progress-bar --upload-file "%full_name%" "http://transfersh.wolke.img.univie.ac.at/%file_name%"
popd
goto :eof
:not_a_directory
curl.exe --progress-bar --upload-file "%file%" "http://transfersh.wolke.img.univie.ac.at/%file_name%"
goto :eof
:not_tty
set "file_name=%~1"
curl.exe --progress-bar --upload-file - "http://transfersh.wolke.img.univie.ac.at/%file_name%"
goto :eof
# Your awesome sample will be put here