Crear una bomba zip y comprobar el ratio de compresión

$ git clone https://github.com/abdulfatir/ZipBomb
$ cd ZipBomb/
$ python zipbomb.py 10 test.zip

Para crear la bomba zip así por ejemplo:

$ python zipbomb.py 10 test.zip

El tamaño comprimido, descomprimido y el ratio de compresión:

Nivel 1 – 19.47 KB – 10 GB – 100%
Nivel 2 – 6.93 KB – 100 GB – 97%
Nivel 3 – 9.01 KB – 1000 GB – 88%
Nivel 4 – 11.60 KB – 10000 GB – 88%
Nivel 5 – 14.53 KB – 100000 GB – 88%
Nivel 6 – 17.24 KB – 1000000 GB – 89%
Nivel 7 – 20.68 KB – 10000000 GB – 89%
Nivel 8 – 24.23 KB – 100000000 GB – 89%
Nivel 9 – 26.96 KB – 1000000000 GB – 89%
Nivel 10 – 29.93 KB – 10000000000 GB – 89%

Para ver el ratio:

$ unzip -lv test.zip 

Ejemplos:

$ python zipbomb.py 1 test.zip
Compressed File Size: 19.47 KB
Size After Decompression: 10 GB
Generation Time: 22.87s
$ unzip -lv test.zip 
Archive:  test.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
 1043756  Defl:N     1902 100% 2018-08-01 16:56 fb106707  1-0.zip
 1043756  Defl:N     1902 100% 2018-08-01 16:56 fb106707  1-1.zip
 1043756  Defl:N     1902 100% 2018-08-01 16:56 fb106707  1-2.zip
 1043756  Defl:N     1902 100% 2018-08-01 16:56 fb106707  1-3.zip
 1043756  Defl:N     1902 100% 2018-08-01 16:56 fb106707  1-4.zip
 1043756  Defl:N     1902 100% 2018-08-01 16:56 fb106707  1-5.zip
 1043756  Defl:N     1902 100% 2018-08-01 16:56 fb106707  1-6.zip
 1043756  Defl:N     1902 100% 2018-08-01 16:56 fb106707  1-7.zip
 1043756  Defl:N     1902 100% 2018-08-01 16:56 fb106707  1-8.zip
 1043756  Defl:N     1902 100% 2018-08-01 16:56 fb106707  1-9.zip
--------          -------  ---                            -------
10437560            19020 100%                            10 files
$ python zipbomb.py 2 test.zip
Compressed File Size: 6.93 KB
Size After Decompression: 100 GB
Generation Time: 22.46s
$ unzip -lv test.zip 
Archive:  test.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
   19952  Defl:N      617  97% 2018-08-01 17:00 8430a824  2-0.zip
   19952  Defl:N      617  97% 2018-08-01 17:00 8430a824  2-1.zip
   19952  Defl:N      617  97% 2018-08-01 17:00 8430a824  2-2.zip
   19952  Defl:N      617  97% 2018-08-01 17:00 8430a824  2-3.zip
   19952  Defl:N      617  97% 2018-08-01 17:00 8430a824  2-4.zip
   19952  Defl:N      617  97% 2018-08-01 17:00 8430a824  2-5.zip
   19952  Defl:N      617  97% 2018-08-01 17:00 8430a824  2-6.zip
   19952  Defl:N      617  97% 2018-08-01 17:00 8430a824  2-7.zip
   19952  Defl:N      617  97% 2018-08-01 17:00 8430a824  2-8.zip
   19952  Defl:N      617  97% 2018-08-01 17:00 8430a824  2-9.zip
--------          -------  ---                            -------
  199520             6170  97%                            10 files
$ python zipbomb.py 3 test.zip
Compressed File Size: 9.01 KB
Size After Decompression: 1000 GB
Generation Time: 23.48s
$ unzip -lv test.zip 
Archive:  test.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
    6962  Defl:N      830  88% 2018-08-01 17:00 6483b738  3-0.zip
    6962  Defl:N      830  88% 2018-08-01 17:00 6483b738  3-1.zip
    6962  Defl:N      830  88% 2018-08-01 17:00 6483b738  3-2.zip
    6962  Defl:N      830  88% 2018-08-01 17:00 6483b738  3-3.zip
    6962  Defl:N      830  88% 2018-08-01 17:00 6483b738  3-4.zip
    6962  Defl:N      830  88% 2018-08-01 17:00 6483b738  3-5.zip
    6962  Defl:N      830  88% 2018-08-01 17:00 6483b738  3-6.zip
    6962  Defl:N      830  88% 2018-08-01 17:00 6483b738  3-7.zip
    6962  Defl:N      830  88% 2018-08-01 17:00 6483b738  3-8.zip
    6962  Defl:N      830  88% 2018-08-01 17:00 6483b738  3-9.zip
--------          -------  ---                            -------
   69620             8300  88%                            10 files
$ python zipbomb.py 4 test.zip
Compressed File Size: 11.60 KB
Size After Decompression: 10000 GB
Generation Time: 22.58s
$ unzip -lv test.zip 
Archive:  test.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
    9352  Defl:N     1096  88% 2018-08-01 17:02 28199555  4-0.zip
    9352  Defl:N     1096  88% 2018-08-01 17:02 28199555  4-1.zip
    9352  Defl:N     1096  88% 2018-08-01 17:02 28199555  4-2.zip
    9352  Defl:N     1096  88% 2018-08-01 17:02 28199555  4-3.zip
    9352  Defl:N     1096  88% 2018-08-01 17:02 28199555  4-4.zip
    9352  Defl:N     1096  88% 2018-08-01 17:02 28199555  4-5.zip
    9352  Defl:N     1096  88% 2018-08-01 17:02 28199555  4-6.zip
    9352  Defl:N     1096  88% 2018-08-01 17:02 28199555  4-7.zip
    9352  Defl:N     1096  88% 2018-08-01 17:02 28199555  4-8.zip
    9352  Defl:N     1096  88% 2018-08-01 17:02 28199555  4-9.zip
--------          -------  ---                            -------
   93520            10960  88%                            10 files
$ python zipbomb.py 5 test.zip
Compressed File Size: 14.53 KB
Size After Decompression: 100000 GB
Generation Time: 22.18s
$ unzip -lv test.zip 
Archive:  test.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
   11852  Defl:N     1396  88% 2018-08-01 17:03 52db6d04  5-0.zip
   11852  Defl:N     1396  88% 2018-08-01 17:03 52db6d04  5-1.zip
   11852  Defl:N     1396  88% 2018-08-01 17:03 52db6d04  5-2.zip
   11852  Defl:N     1396  88% 2018-08-01 17:03 52db6d04  5-3.zip
   11852  Defl:N     1396  88% 2018-08-01 17:03 52db6d04  5-4.zip
   11852  Defl:N     1396  88% 2018-08-01 17:03 52db6d04  5-5.zip
   11852  Defl:N     1396  88% 2018-08-01 17:03 52db6d04  5-6.zip
   11852  Defl:N     1396  88% 2018-08-01 17:03 52db6d04  5-7.zip
   11852  Defl:N     1396  88% 2018-08-01 17:03 52db6d04  5-8.zip
   11852  Defl:N     1396  88% 2018-08-01 17:03 52db6d04  5-9.zip
--------          -------  ---                            -------
  118520            13960  88%                            10 files
$ python zipbomb.py 6 test.zip
Compressed File Size: 17.24 KB
Size After Decompression: 1000000 GB
Generation Time: 21.97s
$ unzip -lv test.zip 
Archive:  test.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
   14492  Defl:N     1673  89% 2018-08-01 17:04 1474ff32  6-0.zip
   14492  Defl:N     1673  89% 2018-08-01 17:04 1474ff32  6-1.zip
   14492  Defl:N     1673  89% 2018-08-01 17:04 1474ff32  6-2.zip
   14492  Defl:N     1673  89% 2018-08-01 17:04 1474ff32  6-3.zip
   14492  Defl:N     1673  89% 2018-08-01 17:04 1474ff32  6-4.zip
   14492  Defl:N     1673  89% 2018-08-01 17:04 1474ff32  6-5.zip
   14492  Defl:N     1673  89% 2018-08-01 17:04 1474ff32  6-6.zip
   14492  Defl:N     1673  89% 2018-08-01 17:04 1474ff32  6-7.zip
   14492  Defl:N     1673  89% 2018-08-01 17:04 1474ff32  6-8.zip
   14492  Defl:N     1673  89% 2018-08-01 17:04 1474ff32  6-9.zip
--------          -------  ---                            -------
  144920            16730  89%                            10 files
$ python zipbomb.py 7 test.zip
Compressed File Size: 20.68 KB
Size After Decompression: 10000000 GB
Generation Time: 22.52s
$ unzip -lv test.zip 
Archive:  test.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
   17932  Defl:N     2025  89% 2018-08-01 17:06 31cd8aac  7-0.zip
   17932  Defl:N     2025  89% 2018-08-01 17:06 31cd8aac  7-1.zip
   17932  Defl:N     2025  89% 2018-08-01 17:06 31cd8aac  7-2.zip
   17932  Defl:N     2025  89% 2018-08-01 17:06 31cd8aac  7-3.zip
   17932  Defl:N     2025  89% 2018-08-01 17:06 31cd8aac  7-4.zip
   17932  Defl:N     2025  89% 2018-08-01 17:06 31cd8aac  7-5.zip
   17932  Defl:N     2025  89% 2018-08-01 17:06 31cd8aac  7-6.zip
   17932  Defl:N     2025  89% 2018-08-01 17:06 31cd8aac  7-7.zip
   17932  Defl:N     2025  89% 2018-08-01 17:06 31cd8aac  7-8.zip
   17932  Defl:N     2025  89% 2018-08-01 17:06 31cd8aac  7-9.zip
--------          -------  ---                            -------
  179320            20250  89%                            10 files

$ python zipbomb.py 8 test.zip
Compressed File Size: 24.23 KB
Size After Decompression: 100000000 GB
Generation Time: 22.56s
$ unzip -lv test.zip 
Archive:  test.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
   21352  Defl:N     2389  89% 2018-08-01 17:07 ffeb6e9b  8-0.zip
   21352  Defl:N     2389  89% 2018-08-01 17:07 ffeb6e9b  8-1.zip
   21352  Defl:N     2389  89% 2018-08-01 17:07 ffeb6e9b  8-2.zip
   21352  Defl:N     2389  89% 2018-08-01 17:07 ffeb6e9b  8-3.zip
   21352  Defl:N     2389  89% 2018-08-01 17:07 ffeb6e9b  8-4.zip
   21352  Defl:N     2389  89% 2018-08-01 17:07 ffeb6e9b  8-5.zip
   21352  Defl:N     2389  89% 2018-08-01 17:07 ffeb6e9b  8-6.zip
   21352  Defl:N     2389  89% 2018-08-01 17:07 ffeb6e9b  8-7.zip
   21352  Defl:N     2389  89% 2018-08-01 17:07 ffeb6e9b  8-8.zip
   21352  Defl:N     2389  89% 2018-08-01 17:07 ffeb6e9b  8-9.zip
--------          -------  ---                            -------
  213520            23890  89%                            10 files
$ python zipbomb.py 9 test.zip
Compressed File Size: 26.96 KB
Size After Decompression: 1000000000 GB
Generation Time: 22.78s
$ unzip -lv test.zip 
Archive:  test.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
   24452  Defl:N     2668  89% 2018-08-01 17:08 24d8b14c  9-0.zip
   24452  Defl:N     2668  89% 2018-08-01 17:08 24d8b14c  9-1.zip
   24452  Defl:N     2668  89% 2018-08-01 17:08 24d8b14c  9-2.zip
   24452  Defl:N     2668  89% 2018-08-01 17:08 24d8b14c  9-3.zip
   24452  Defl:N     2668  89% 2018-08-01 17:08 24d8b14c  9-4.zip
   24452  Defl:N     2668  89% 2018-08-01 17:08 24d8b14c  9-5.zip
   24452  Defl:N     2668  89% 2018-08-01 17:08 24d8b14c  9-6.zip
   24452  Defl:N     2668  89% 2018-08-01 17:08 24d8b14c  9-7.zip
   24452  Defl:N     2668  89% 2018-08-01 17:08 24d8b14c  9-8.zip
   24452  Defl:N     2668  89% 2018-08-01 17:08 24d8b14c  9-9.zip
--------          -------  ---                            -------
  244520            26680  89%                            10 files
$ python zipbomb.py 10 test.zip
Compressed File Size: 29.93 KB
Size After Decompression: 10000000000 GB
Generation Time: 22.18s
$ unzip -lv test.zip 
Archive:  test.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
   27402  Defl:N     2971  89% 2018-08-01 17:09 6a9dec7d  10-0.zip
   27402  Defl:N     2971  89% 2018-08-01 17:09 6a9dec7d  10-1.zip
   27402  Defl:N     2971  89% 2018-08-01 17:09 6a9dec7d  10-2.zip
   27402  Defl:N     2971  89% 2018-08-01 17:09 6a9dec7d  10-3.zip
   27402  Defl:N     2971  89% 2018-08-01 17:09 6a9dec7d  10-4.zip
   27402  Defl:N     2971  89% 2018-08-01 17:09 6a9dec7d  10-5.zip
   27402  Defl:N     2971  89% 2018-08-01 17:09 6a9dec7d  10-6.zip
   27402  Defl:N     2971  89% 2018-08-01 17:09 6a9dec7d  10-7.zip
   27402  Defl:N     2971  89% 2018-08-01 17:09 6a9dec7d  10-8.zip
   27402  Defl:N     2971  89% 2018-08-01 17:09 6a9dec7d  10-9.zip
--------          -------  ---                            -------
  274020            29710  89%                            10 files

próximo Publicación

Atrás Publicación

Dejar una contestacion

© 2018 [ MIERDA TV ]

Tema de Anders Norén