The one-liner:

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

This is brilliant.

  • melroy@kbin.melroy.org
    link
    fedilink
    arrow-up
    12
    arrow-down
    2
    ·
    11 hours ago

    ow… now the idea is to unzip it right?

    nice idea:

    if (ipIsBlackListed() || isMalicious()) {
        header("Content-Encoding: deflate, gzip");
        header("Content-Length: "+ filesize(ZIP_BOMB_FILE_10G)); // 10 MB
        readfile(ZIP_BOMB_FILE_10G);
        exit;
    }
    
    • mbirth@lemmy.ml
      link
      fedilink
      English
      arrow-up
      7
      ·
      10 hours ago

      Might need some

      if (ob_get_level()) ob_end_clean();
      

      before the readfile. 😉