ZipBomb | A simple implementation of ZipBomb in Python | Compression library

 by   abdulfatir Python Version: Current License: No License

kandi X-RAY | ZipBomb Summary

kandi X-RAY | ZipBomb Summary

ZipBomb is a Python library typically used in Utilities, Compression applications. ZipBomb has no bugs, it has no vulnerabilities and it has low support. However ZipBomb build file is not available. You can download it from GitHub.

This is for the people who watch Silicon Valley. In Season 3 Episode 7, Gilfoyle sends a sort of recursive program to Gavin Belson’s laptop and cellphone which forces him to shut down the power at Hooli. Watch here. Such a program is called a zip bomb. What it is basically is a huge file with dummy data compressed to many levels to generate a very small compressed file. For example in a test run, this script of mine generates a compressed file of size 30.58 KB which when decompressed is actually 10000000000 GB. This is done to drain out a computer’s memory until it shuts down. Read More on Wikipedia. This is a small script written in Python which generates such a zip bomb.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              ZipBomb has a low active ecosystem.
              It has 305 star(s) with 75 fork(s). There are 9 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 3 open issues and 0 have been closed. On average issues are closed in 1557 days. There are 5 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of ZipBomb is current.

            kandi-Quality Quality

              ZipBomb has 0 bugs and 0 code smells.

            kandi-Security Security

              ZipBomb has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              ZipBomb code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              ZipBomb does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              ZipBomb releases are not available. You will need to build from source code and install.
              ZipBomb has no build file. You will be need to create the build yourself to build the component from source.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed ZipBomb and discovered the below as its top functions. This is intended to give you an instant insight into ZipBomb implemented functionality, and help decide if they suit your requirements.
            • Creates a zip file with n_copies .
            • Generate a dummy file .
            • Compress infile to outfile .
            • Returns the size of the file
            • Get filename without extension .
            • Get the extension from a name .
            Get all kandi verified functions for this library.

            ZipBomb Key Features

            No Key Features are available at this moment for ZipBomb.

            ZipBomb Examples and Code Snippets

            No Code Snippets are available at this moment for ZipBomb.

            Community Discussions

            QUESTION

            Understanding ZipSecureFile.setMinInflateRatio(double ratio)
            Asked 2018-Dec-03 at 11:46

            I am using this function call, because when I read a trusted file, It results in zipbomb error.

            ZipSecureFile.setMinInflateRatio(double ratio)

            ...

            ANSWER

            Answered 2017-Oct-19 at 08:59

            A zip bomb detection works the following way:

            While uncompressing it checks the ratio compressedBytes/uncompressedBytes and if this falls below a special amount (MinInflateRatio), then a bomb was detected.

            So if the ratio compressedBytes/uncompressedBytes is 0.01d for example, then that means that the compressed file is 100 times smaller than the uncompressed one whithout information lost. In other words, the compressed file stores the same information in only 1% of the file size, the uncompressed one needs. This is really unlikely using real life data.

            To show how unlikely it is we could take a look (in a popular scientific manner) on how compression works:

            Let's have the string

            "This is a test for compressing having long count of characters which always occurs the same sequence."

            This needs 101 bytes. Let's say this string occurs 100,000 times in the file. Then uncompressed it would need 10,100,000 bytes. A compression algorithm would give that string a ID and would storing the string only once mapping it to that ID and would storing 100,000 times the ID where the string occurs in the file. That would need 101 bytes + 1 byte (ID) + 100,000 bytes (IDs) = 100,102 bytes. And this would have a ratio compressedBytes/uncompressedBytes of 0.009911089d for example.

            So if we set the MinInflateRatio to lower than 0.01d, then we accept such unlikely data compression rates.

            Also we can see, that the ratio compressedBytes/uncompressedBytes can only be 0 if compressedBytes is 0. But this would mean that there are no bytes to uncompress. So a MinInflateRatio of 0.0d can never be reached nor be undershot. So with a MinInflateRatio of 0.0d all possible ratios will be accepted.

            Of course a MinInflateRatio of -1.0d also can never be reached nor be undershot. So using this also all possible ratios will be accepted.

            Source https://stackoverflow.com/questions/46814489

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install ZipBomb

            You can download it from GitHub.
            You can use ZipBomb like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/abdulfatir/ZipBomb.git

          • CLI

            gh repo clone abdulfatir/ZipBomb

          • sshUrl

            git@github.com:abdulfatir/ZipBomb.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Compression Libraries

            zstd

            by facebook

            Luban

            by Curzibn

            brotli

            by google

            upx

            by upx

            jszip

            by Stuk

            Try Top Libraries by abdulfatir

            twitter-sentiment-analysis

            by abdulfatirPython

            normalizing-flows

            by abdulfatirJupyter Notebook

            prototypical-networks-tensorflow

            by abdulfatirJupyter Notebook

            pyANPD

            by abdulfatirPython

            sampling-methods-numpy

            by abdulfatirJupyter Notebook