New client by Xeha

master
HidUser0 2022-02-25 11:15:22 +03:00
parent 6c8b2c946c
commit c4b81be8d5
Signed by: HidUser0
GPG Key ID: 7E3251A2FA52F006
3 changed files with 23 additions and 1 deletions

2
.gitignore vendored
View File

@ -3,4 +3,4 @@ __pycache__/
.idea/
storage/
fhost.db
templates/index.html

22
clients/xeha.bin 100755
View File

@ -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