mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-11-27 06:30:19 +01:00
updated text alias sample, changed sed regex to ._- from .-_ to prevent
range.
This commit is contained in:
parent
8b56d3bc15
commit
896579efee
4 changed files with 17 additions and 10 deletions
|
@ -173,7 +173,9 @@
|
|||
<span class="code-title"># Add this to .bashrc or its equivalent</span>
|
||||
<br/>transfer() {
|
||||
<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/>alias transfer=transfer
|
||||
|
|
|
@ -18,10 +18,10 @@ Add alias to .bashrc or .zshrc:
|
|||
===
|
||||
transfer() {
|
||||
# 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
|
||||
|
|
|
@ -147,7 +147,9 @@ include "includes/head.html"
|
|||
<span class="code-title"># Add this to .bashrc or its equivalent</span>
|
||||
<br/>transfer() {
|
||||
<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/>alias transfer=transfer
|
||||
|
|
|
@ -14,14 +14,17 @@ $ curl https://transfer.sh/1lDau/test.txt|gpg -o- > /tmp/hello.txt
|
|||
Upload to 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:
|
||||
===
|
||||
transfer() {
|
||||
# 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
|
||||
|
|
Loading…
Reference in a new issue