From 3cc4f2ba242a8d922dc70d212779b87bb413e663 Mon Sep 17 00:00:00 2001 From: Tobias Date: Wed, 11 Mar 2026 19:02:20 +0000 Subject: [PATCH] Add README.md --- README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..921aa6b --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +# Basic script to upload to litterbox.catbox.moe + +## Description + +Litterbox.catbox.moe is a publicaly accessbile temporary file host + +This script interacts with the API to upload a specified file for a specified amount of time + +## Usage + +Place the script in your path, make it executable and type catboxuploader then the name of the file after + +After this input the amount of hours you want the file to be uploaded for (1, 12, 24 or 72) + +Finally once the file has uploaded a shareable link to your file will be returned + +``` +#!/bin/bash + +filename="$1" + +uploadtime() { + +echo -e "\nbe in the directory of the file you want to upload\ninput how long you want the file to be uploaded for" +read -p "valid options (hours) 1, 12, 24, 72: " time + +case "$time" in + 1|12|24|72 ) + time+="h" + ;; + * ) echo "invalid upload time" + uploadtime + ;; +esac + +} + +main(){ + +uploadtime + +echo "uploading..." +curl -F "reqtype=fileupload" -F "time=$time" -F "fileToUpload=@$filename" https://litterbox.catbox.moe/resources/internals/api.php + +} + +[ -z "$1" ] && echo -e "no file provided\nusage is catboxuploader yourfilehere\nsuch as: catboxuploader 123.txt" || main +``` \ No newline at end of file