pierre Posted June 21, 2018 Share Posted June 21, 2018 Hello, I was trying to make a 42.zip bomb which is a : " A file that is only 42,374 bytes (42KB). When unzipped it becomes 4,503,599,626,321,920 bytes (4.5 Peta Bytes)!!! " Me I can only achieve a 1Mb zip file that almost contain 1Gb txt file: $ zip bomb.zip bomb_1G.txt adding: bomb_1G.txt (deflated 100%) $ du -h bomb.zip 948K bomb.zip $ zipinfo bomb.zip Archive: bomb.zip Zip file size: 970656 bytes, number of entries: 1 -rw-r--r-- 3.0 unx 1000000000 tx defN 18-Jun-21 06:12 bomb_1G.txt 1 file, 1000000000 bytes uncompressed, 970484 bytes compressed: 99.9% Do you know how I could achieve a better "bomb" with less space ? Regards Quote Link to comment Share on other sites More sharing options...
digininja Posted June 21, 2018 Share Posted June 21, 2018 The easiest way would be to grab a copy of 42.zip and have a look how it is made: http://www.unforgettable.dk/ 1 Quote Link to comment Share on other sites More sharing options...
pierre Posted June 21, 2018 Author Share Posted June 21, 2018 $ zipinfo 42.zip Archive: 42.zip Zip file size: 42838 bytes, number of entries: 16 -rw-a-- 6.3 fat 34902 Bx u099 00-Mar-28 21:40 lib 0.zip -rw-a-- 6.3 fat 34902 Bx u099 00-Mar-28 21:40 lib 1.zip -rw-a-- 6.3 fat 34902 Bx u099 00-Mar-28 21:40 lib 2.zip -rw-a-- 6.3 fat 34902 Bx u099 00-Mar-28 21:40 lib 3.zip -rw-a-- 6.3 fat 34902 Bx u099 00-Mar-28 21:40 lib 4.zip -rw-a-- 6.3 fat 34902 Bx u099 00-Mar-28 21:40 lib 5.zip -rw-a-- 6.3 fat 34902 Bx u099 00-Mar-28 21:40 lib 6.zip -rw-a-- 6.3 fat 34902 Bx u099 00-Mar-28 21:40 lib 7.zip -rw-a-- 6.3 fat 34902 Bx u099 00-Mar-28 21:40 lib 8.zip -rw-a-- 6.3 fat 34902 Bx u099 00-Mar-28 21:40 lib 9.zip -rw-a-- 6.3 fat 34902 Bx u099 00-Mar-28 21:40 lib a.zip -rw-a-- 6.3 fat 34902 Bx u099 00-Mar-28 21:40 lib b.zip -rw-a-- 6.3 fat 34902 Bx u099 00-Mar-28 21:40 lib c.zip -rw-a-- 6.3 fat 34902 Bx u099 00-Mar-28 21:40 lib d.zip -rw-a-- 6.3 fat 34902 Bx u099 00-Mar-28 21:40 lib e.zip -rw-a-- 6.3 fat 34902 Bx u099 00-Mar-28 21:40 lib f.zip 16 files, 558432 bytes uncompressed, 40192 bytes compressed: 92.8% I don't think I can go deeper without any extraction.. Quote Link to comment Share on other sites More sharing options...
digininja Posted June 21, 2018 Share Posted June 21, 2018 extract a single file Quote Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted June 22, 2018 Share Posted June 22, 2018 (edited) 12 hours ago, pierre said: " A file that is only 42,374 bytes (42KB). When unzipped it becomes 4,503,599,626,321,920 bytes (4.5 Peta Bytes)!!! " FYI.. 1 PB = 1024 TB 1 TB = 1024 GB 1 GB = 1024 MB 1 MB = 1024 KB 1 KB = 1024 B Therefore 4.5 PB = 4.5 * 1024 TB = 4.5 * 1024 * 1024 GB = 4.5 * 1024 * 1024 * 1024 MB = 4.5 * 1024 * 1024 * 1024 * 1024 KB = 4.5 * 1024 * 1024 * 1024 * 1024 * 1024 B = 5,066,549,580,791,800 B = 5.0665496e+15 B Therefore, 4.5 PB =5,066,549,580,791,800 B. Qwik maf. Don't worry - you were only ~500 trillion Bytes out (I think). ? Edited June 22, 2018 by Dave-ee Jones Quote Link to comment Share on other sites More sharing options...
pierre Posted June 22, 2018 Author Share Posted June 22, 2018 (edited) Haha it will crash out my computer for sure if I do an extract ! Futhermore I might understand that there is 16 layers of zip files, each ones containing zip files and so on.. But still don't know how they manage to only have a 42 Kb zip file whereas me who nearly have a 1 Mb zip file that only contains 1 Gb..... Edited June 22, 2018 by pierre Quote Link to comment Share on other sites More sharing options...
digininja Posted June 22, 2018 Share Posted June 22, 2018 It is only a problem if you do a recursive decompress. Pick a single file and just pull that out, that will be a compressed file. Repeat the process. If you are worried about crashing the computer, create a fixed size drive and mount that so it can't escape beyond it and kill things. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.