23 lines
393 B
Bash
Executable File
23 lines
393 B
Bash
Executable File
#!/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
|