1st
This commit is contained in:
commit
50b26c270f
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
# up: to upload files on 0x0.st.
|
||||
|
||||
upload()
|
||||
{
|
||||
if echo "$1" | grep -q 'http\(s\?\)://'; then
|
||||
curl -F "url=$1" https://0x0.st
|
||||
echo "bye boss"
|
||||
else
|
||||
curl -F "file=@$1" https://0x0.st
|
||||
echo "bye boss"
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ $# == 0 ]]; then
|
||||
read -p "url/file: " targ
|
||||
upload $targ
|
||||
else
|
||||
for file in $@; do
|
||||
upload "$file"
|
||||
done
|
||||
fi
|
Loading…
Reference in New Issue