New client by Xeha
parent
6c8b2c946c
commit
c4b81be8d5
|
@ -3,4 +3,4 @@ __pycache__/
|
|||
.idea/
|
||||
storage/
|
||||
fhost.db
|
||||
|
||||
templates/index.html
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
# Xeha <Xeha@i2pmail.org>
|
||||
|
||||
usage() {
|
||||
echo "0xff [<file>] - A script to post stdin or a file to 0xff.i2p"
|
||||
echo "If no file is specified (maximum of one), STDIN will be used."
|
||||
echo
|
||||
}
|
||||
|
||||
if [ "$#" -gt "1" ]; then
|
||||
usage
|
||||
echo "ERROR: too many args" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$#" -eq "1" ]; then
|
||||
# file upload mode
|
||||
curl --proxy 127.0.0.1:4444 -T "$1" http://0xff.i2p | cat
|
||||
else
|
||||
# STDIN mode
|
||||
curl --proxy 127.0.0.1:4444 -T - http://0xff.i2p <&0 | cat
|
||||
fi
|
Loading…
Reference in New Issue