Babel-USB: USB drive with every file

(github.com)

23 points | by LorenDB a day ago ago

11 comments

  • OkGoDoIt 20 hours ago ago

    The readme explains how to set this up, but it doesn’t really explain what it does. What does this do? I’m guessing it pretends to be a flash drive containing infinite books and then somehow fetches them on the fly from the Internet when the operating system attempts to access them?

    • naikrovek 20 hours ago ago

      There's an associated video on youtube somewhere, but no it doesn't do that. you're close, though.

      if you drill down into the right folders, it contains every possible text file up to a certain size. He uses a weird 70 character encoding scheme in order to optimize folder depth and width (he didn't want more than 5k objects in any folder) and to stay within maximum path length limitations.

      it generates the text files on demand based on the path you're following and in each folder (along with other folders) is the text file represented by that path so far.

      • extraduder_ire 19 hours ago ago

        Here's the video: https://www.youtube.com/watch?v=w6rkhvdAqHU - This Flash Drive has Literally Every File

        The contents of the file are based on the path used to access it, correct. It uses MTP rather than emulating a normal flash drive though, which makes this kind of project much easier.

        They also suggest that you can do other things using the same technique, like hiding a folder unless you know its exact name, only showing files if you navigate to certain other folders first, or because the esp32 stick being used contains a screen it could run a copy of doom controlled by navigating through folders.

        • freitasm 18 hours ago ago

          So in theory you could have War and Peace somewhere.

          Each folder represents the file content so far. So how to find a specific file without knowing its contents - by its title for example?

          • naikrovek 18 hours ago ago

            plain .txt files don't have titles, so these files don't have titles, either. unless it's in the text of the file.

            you get to any file by following the filesystem path whose bytes match the content you are looking for. There's no searching for the content you want.

            if you're crawling the filesystem it will probably take you until the heat death of the universe to complete that crawl.

            • freitasm 18 hours ago ago

              So you get a file. Any file. Not necessarily the file you want, unless you already know its contents and how to traverse the folder hierarchy to get to that specific point.

              • vitally3643 17 hours ago ago

                Yes. Have you read The Library of Babel? This is sort of the whole point.

  • 20 hours ago ago
    [deleted]
  • pixel_popping 16 hours ago ago

    It's not really clear to be honest, you might really want to improve the explanation of what it IS.

  • naikrovek 20 hours ago ago

    I like this. Some binary running on a computer serving these up to a FUSE mount would stop a corporate disk scanner in its tracks (at least whatever thread happens upon the location this is mounted.)

    I might have a go writing something like this for my Mac.

  • llamasquared 19 hours ago ago

    [dead]