The one-liner:

dd if=/dev/zero bs=1G count=10 | gzip -c > 10GB.gz

This is brilliant.

  • just_another_person@lemmy.world
    link
    fedilink
    English
    arrow-up
    93
    arrow-down
    3
    ·
    edit-2
    2 days ago

    I believe he’s returning a gzip HTTP response stream, not just a file payload that the requester then downloads and decompresses.

    Bzip isn’t used in HTTP compression.

    • bss03@infosec.pub
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 hour ago

      For scrapers that not just implementing HTTP, but are trying to extract zip files, you can possibly drive them insane with zip quines: https://github.com/ruvmello/zip-quine-generator or otherwise compressed files that contain themselves at some level of nesting, possibly with other data so that they recursively expand to an unbounded (“infinite”) size.

    • sugar_in_your_tea@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      29
      ·
      edit-2
      2 days ago

      Brotli is an option, and it’s comparable to Bzip. Brotli works in most browsers, so hopefully these bots would support it.

      I just tested it, and a 10G file full of zeroes is only 8.3K compressed. That’s pretty good, though a little bigger than BZip.