Files
Catboxuploader/README.md
2026-06-07 11:56:38 +01:00

1.4 KiB

Basic script to upload to litterbox.catbox.moe

Description

Litterbox.catbox.moe is a publicly accessible temporary file host

This script provides a minimalistic and simplified way to interact with its API and upload a file for a specified amount of time

Setup

Place the script somewhere within your path, you can find this by running:

echo "$PATH"

After this make the script executable:

chmod u+x

Usage

Type catboxuploader. then the name of the file after, for example:

catboxuploader 123.png

After this you will be prompted to 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 will be returned in the terminal

#!/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