range.tags/v1.0.0
@@ -173,7 +173,9 @@ | |||||
<span class="code-title"># Add this to .bashrc or its equivalent</span> | <span class="code-title"># Add this to .bashrc or its equivalent</span> | ||||
<br/>transfer() { | <br/>transfer() { | ||||
<br># write to output to tmpfile because of progress bar | <br># write to output to tmpfile because of progress bar | ||||
<br>tmpfile=$( mktemp -t transferXXX ); basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9.-_]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; cat $tmpfile; rm -f $tmpfile; | |||||
<br>tmpfile=$( mktemp -t transferXXX ); basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g') | |||||
<br/>curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile | |||||
<br/>cat $tmpfile; rm -f $tmpfile; | |||||
<br/>} | <br/>} | ||||
<br/> | <br/> | ||||
<br/>alias transfer=transfer | <br/>alias transfer=transfer | ||||
@@ -18,10 +18,10 @@ Add alias to .bashrc or .zshrc: | |||||
=== | === | ||||
transfer() { | transfer() { | ||||
# write to output to tmpfile because of progress bar | # write to output to tmpfile because of progress bar | ||||
tmpfile=$( mktemp -t transfer ) | |||||
curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile; | |||||
cat $tmpfile; | |||||
rm -f $tmpfile; | |||||
tmpfile=$( mktemp -t transferXXX ); | |||||
basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); | |||||
curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; | |||||
cat $tmpfile; rm -f $tmpfile; | |||||
} | } | ||||
alias transfer=transfer | alias transfer=transfer | ||||
@@ -147,7 +147,9 @@ include "includes/head.html" | |||||
<span class="code-title"># Add this to .bashrc or its equivalent</span> | <span class="code-title"># Add this to .bashrc or its equivalent</span> | ||||
<br/>transfer() { | <br/>transfer() { | ||||
<br># write to output to tmpfile because of progress bar | <br># write to output to tmpfile because of progress bar | ||||
<br>tmpfile=$( mktemp -t transferXXX ); basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9.-_]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; cat $tmpfile; rm -f $tmpfile; | |||||
<br>tmpfile=$( mktemp -t transferXXX ); basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g') | |||||
<br/>curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile | |||||
<br/>cat $tmpfile; rm -f $tmpfile; | |||||
<br/>} | <br/>} | ||||
<br/> | <br/> | ||||
<br/>alias transfer=transfer | <br/>alias transfer=transfer | ||||
@@ -14,14 +14,17 @@ $ curl https://transfer.sh/1lDau/test.txt|gpg -o- > /tmp/hello.txt | |||||
Upload to virustotal: | Upload to virustotal: | ||||
$ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/virustotal | $ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/virustotal | ||||
Virusscan: | |||||
$ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/scan | |||||
Add alias to .bashrc or .zshrc: | Add alias to .bashrc or .zshrc: | ||||
=== | === | ||||
transfer() { | transfer() { | ||||
# write to output to tmpfile because of progress bar | # write to output to tmpfile because of progress bar | ||||
tmpfile=$( mktemp -t transfer ) | |||||
curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile; | |||||
cat $tmpfile; | |||||
rm -f $tmpfile; | |||||
tmpfile=$( mktemp -t transferXXX ); | |||||
basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); | |||||
curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; | |||||
cat $tmpfile; rm -f $tmpfile; | |||||
} | } | ||||
alias transfer=transfer | alias transfer=transfer | ||||