tinyfetch

tinyurl file storage

Intro

Tinyfetch is a tool to store and retrieve files within tinyurl. It consists of two parts, tinyfetch and tinymake.

Implementation

tinymake splits a file into chunks (400 bytes by default), and creates a tinyurl for each one. If the file requires more than one chunk, tinymake joins together the hashes from the tinyurls just made and creates another. By this method, any input file is "reduced" to a small hash.

To retrieve a file, tinyfetch will repeat the process in reverse, looking up the target of a given hash, and concatenating the targets of nested hashes if required.

This is, of course, probably a violation of tinyurl's TOS (not to mention Not Very Nice(tm)), and shouldn't actually be used.

Usage

tinymake accepts a filename on the command line and outputs the resulting tinyurl hash to stdout; tinyfetch accepts a hash and outputs the contents of the file.
$ md5sum ls                                     
5f1ca52bc5a6451b55efddfa2dd740b0  ls
$ ./tinymake.py ls
28kosm
$ rm ls
$ ./tinyfetch.py 28kosm > ls
$ md5sum ls 
5f1ca52bc5a6451b55efddfa2dd740b0  ls
$ /lib/ld-linux.so.2 ./ls
ls  README  tinyfetch.py  tinymake.py

Download

tinyfetch-20070225.tgz