From 9ff937d92d3d53675fe7f09a9ceee3e8bdbe2246 Mon Sep 17 00:00:00 2001 From: Remco Date: Sat, 25 Oct 2014 00:11:43 +0200 Subject: [PATCH] small fixes to examples and added some more examples --- transfersh-server/static/index.html | 38 +++++++++++++++++++++----- transfersh-web/index.html | 42 +++++++++++++++++++++++------ 2 files changed, 66 insertions(+), 14 deletions(-) diff --git a/transfersh-server/static/index.html b/transfersh-server/static/index.html index 07a6800..fb54072 100644 --- a/transfersh-server/static/index.html +++ b/transfersh-server/static/index.html @@ -160,14 +160,16 @@
-

Create an alias and add it to .bashrc

+

Create an alias and add it to .bashrc or .zshrc

- # Add this to .bashrc or it equivalent + # Add this to .bashrc or its equivalent
transfer() { # write to output to tmpfile because of progress bar tmpfile=$( mktemp -t transferXXX ) curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile; cat $tmpfile; rm -f $tmpfile; }
+
alias transfer=transfer +

# Now you can use transfer command
$ transfer hello.txt @@ -204,7 +206,7 @@
- # Encrypt files with password using gpk + # Encrypt files with password using gpg
$ cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt

@@ -223,21 +225,45 @@
# Scan for malware or viruses using Clamav -
wget http://www.eicar.org/download/eicar.com -
curl -X PUT --upload-file ./eicar.com https://transfer.sh/eicar.com/scan +
$ wget http://www.eicar.org/download/eicar.com +
$ curl -X PUT --upload-file ./eicar.com https://transfer.sh/eicar.com/scan

# Upload malware to VirusTotal, get a permalink in return -
curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/virustotal +
$ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/virustotal
+
+

Backup mysql database, encrypt and transfer

+
+
+
+ + # Backup, encrypt and transfer +
$ mysqldump --all-databases|gzip|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt
+
+
+
+
+
+

Send email with transfer link (uses alias)

+
+
+
+ + # Transfer and send email with link (uses alias) +
$ transfer /tmp/hello.txt | mail -s "Hello World" user@yourmaildomain.com +
+
+

Send us your awesome example

+ # Your awesome sample will be put here
diff --git a/transfersh-web/index.html b/transfersh-web/index.html index 5f91600..6449443 100644 --- a/transfersh-web/index.html +++ b/transfersh-web/index.html @@ -162,15 +162,17 @@
-

Create an alias and add it to .bashrc

+

Create an alias and add it to .bashrc or .zshrc

- # Add this to .bashrc or it equivalent + # Add this to .bashrc or its equivalent
transfer() { # write to output to tmpfile because of progress bar tmpfile=$( mktemp -t transferXXX ) curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile; cat $tmpfile; rm -f $tmpfile; } -
-
+
+
alias transfer=transfer +
+
# Now you can use transfer command
$ transfer hello.txt
@@ -206,7 +208,7 @@
- # Encrypt files with password using gpk + # Encrypt files with password using gpg
$ cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt

@@ -225,21 +227,45 @@
# Scan for malware or viruses using Clamav -
wget http://www.eicar.org/download/eicar.com -
curl -X PUT --upload-file ./eicar.com https://transfer.sh/eicar.com/scan +
$ wget http://www.eicar.org/download/eicar.com +
$ curl -X PUT --upload-file ./eicar.com https://transfer.sh/eicar.com/scan

# Upload malware to VirusTotal, get a permalink in return -
curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/virustotal +
$ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/virustotal
+
+

Backup mysql database, encrypt and transfer

+
+
+
+ + # Backup, encrypt and transfer +
$ mysqldump --all-databases|gzip|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt
+
+
+
+
+
+

Send email with transfer link (uses alias)

+
+
+
+ + # Transfer and send email with link (uses alias) +
$ transfer /tmp/hello.txt | mail -s "Hello World" user@yourmaildomain.com +
+
+

Send us your awesome example

+ # Your awesome sample will be put here