some_guy@lemmy.sdf.org to Technology@lemmy.world · 4 个月前I use Zip Bombs to Protect my Serveridiallo.comexternal-linkmessage-square104fedilinkarrow-up1579arrow-down115file-textcross-posted to: hackernews@lemmy.bestiver.se
arrow-up1564arrow-down1external-linkI use Zip Bombs to Protect my Serveridiallo.comsome_guy@lemmy.sdf.org to Technology@lemmy.world · 4 个月前message-square104fedilinkfile-textcross-posted to: hackernews@lemmy.bestiver.se
minus-squaremelroy@kbin.melroy.orglinkfedilinkarrow-up12arrow-down2·4 个月前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; }
minus-squarembirth@lemmy.mllinkfedilinkEnglisharrow-up8arrow-down1·4 个月前Might need some if (ob_get_level()) ob_end_clean(); before the readfile. 😉
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; }
Might need some
if (ob_get_level()) ob_end_clean();
before the
readfile
. 😉