Catbox.moe, An Underappreciated Heavy Lifter

Apr. 23, 2023 [libre] [technology] [guides]

File hosts that accept uploads with minimal friction come and go. So it is a positive find that Catbox.moe, unofficially Voat’s “Imgur”, has maintained some longevity. “But Catbox uses proprietary javascript!”, I can hear you say. But it doesn’t. An upload page has been built specifically for js blocking Chads. Although this introduces a limitation, only one file may be uploaded at a time.

However, we don’t need to hand control over to some javascript to recover this functionality. We take things a step further and ditch the web interface for the much more utilitarian terminal program! MineBartekSA’s CatBox bash script leverages the Catbox API to upload and optionally manage content.

Usage: catbox <command> [arguments]

Commands:
   user [userhash]            - Gets or sets current userhash. If you pass 'off' then it will make you anonymous
   file <filename(s)>         - Uploads files to catbox.moe
   url <url(s)>               - Uploads files from URLs to catbox.moe
   delete <filenames(s)>      - Deletes files from catbox.moe. Requires userhash
   album                      - Album Managment
   usage, --usage, -h, --help - Prints this message
   version, -v, --version     - Prints version

Setting a user hash allows you to later delete files that you no longer require hosted. Although if you’re looking to temporarily share a file, it may be best to use their litterbox.catbox.moe option which allows files to be deleted automatically anywhere between one hour to three days after posting.

Let’s say you have a folder with several items you want to share. This can be done in a single command:

catbox file SecretDocuments/*

The wildcard will grab all of the files in the directory, in order. It is also possible to pass multiple files individually. The resulting link URLs are supplied in the output.

Uploading anonymously...
letter-to-meemaw.txt:
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   445    0    35  100   410      8     93  0:00:02  0:00:02 --:--:--   101

Uploaded to: https://files.catbox.moe/bj9k3z.txt
proof-that-aliens-are-real.txt:
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   401    0    35  100   366      9    100  0:00:01  0:00:01 --:--:--   109

Uploaded to: https://files.catbox.moe/mbhj46.txt
stalker-notes.txt:
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   379    0    35  100   344      7     73  0:00:02  0:00:02 --:--:--    91

Uploaded to: https://files.catbox.moe/3n1hwo.txt

Play fair
It is with only a bit of hesitation that I write about Catbox, as the service is provided on the goodwill of an anonymous do-gooder who thanklessly keeps things running with over 200TB of bandwidth used monthly. So please be respectful of the filesizes that you upload. I know that automated uploads can be tempting to start dumping tons of content. Even a simple 3.5MB video file viewed by just two thousand people easily translates into ~7GB of content that their servers need to deliver.