diff --git a/.gitignore b/.gitignore index 51d4373..e203f42 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,4 @@ __pycache__/ .idea/ storage/ fhost.db - +templates/index.html diff --git a/clients/0xff.sh b/clients/acetone.sh similarity index 100% rename from clients/0xff.sh rename to clients/acetone.sh diff --git a/clients/xeha.bin b/clients/xeha.bin new file mode 100755 index 0000000..7609b2e --- /dev/null +++ b/clients/xeha.bin @@ -0,0 +1,22 @@ +#!/bin/bash +# Xeha + +usage() { + echo "0xff [] - 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