{ "info": { "author": "Piotr Kuszaj", "author_email": "peterkuszaj@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Gzip Bomb responses for Flask.\n\nThis package provides an extension to flask.Response class,\n**GzipBombResponse**, which can be used as a defensive measure for various\nvuln scans, dictionary attacks etc. It creates a response containing a gzipped\ndata block filled with null characters with varying number of rounds (to\nachieve minimal size of response's content).\n\nExample:\n\n >>> from flask import Flask\n >>> from flask_gzipbomb import GzipBombResponse\n >>>\n >>> app = Flask(__name__)\n >>>\n >>> @app.route('/tiny-bomb')\n ... def gzipped():\n ... return GzipBombResponse(size='1M')\n >>>\n >>> app.run()\n\n >>> import gzip\n >>> import requests\n >>>\n >>> r = requests.get('http://localhost:5000/tiny-bomb')\n >>> r.headers['content-encoding']\n 'gzip,gzip'\n >>> len(r.content) # gzipped content length in bytes\n 64\n >>> data = gzip.decompress(r.content)\n >>> data = gzip.decompress(data)\n >>> len(data) # decompressed content length in bytes\n 1048576\n\nGzipBombResponse accepts all arguments accepted by Response class with\nadditional *size* parameter, describing response content length in bytes\nafter decompression. Possible values:\n\n '1k', '10k', '100k', '1M', '10M', '100M', '1G', '10G'\n\nwith k, M and G denoting kilobyte, megabyte and gigabyte. Any other value\nwill result raise a KeyError. By default *size* is set to '10M', however\nit is recommended to use '10G' for achieving desired effect.\n\n**This package is for protection and educational purposes only. Using it\nfor any malicious purpose is strictly prohibited.**\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/kuszaj/Flask-GzipBomb/archive/v0.1.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kuszaj/Flask-GzipBomb", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "Flask-GzipBomb", "package_url": "https://pypi.org/project/Flask-GzipBomb/", "platform": "any", "project_url": "https://pypi.org/project/Flask-GzipBomb/", "project_urls": { "Download": "https://github.com/kuszaj/Flask-GzipBomb/archive/v0.1.0.tar.gz", "Homepage": "https://github.com/kuszaj/Flask-GzipBomb" }, "release_url": "https://pypi.org/project/Flask-GzipBomb/0.1.0/", "requires_dist": [ "Flask" ], "requires_python": "", "summary": "Gzip Bomb responses for Flask", "version": "0.1.0" }, "last_serial": 3012947, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f29e8ce7f3d5a86f87cdb42935fd501f", "sha256": "5d5e06a1929b49dc821369d8bf99760d2390adfe2ebcf8719c8a0b5d685ed05d" }, "downloads": -1, "filename": "Flask_GzipBomb-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f29e8ce7f3d5a86f87cdb42935fd501f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9261, "upload_time": "2017-07-10T20:19:38", "url": "https://files.pythonhosted.org/packages/8b/a6/03634098faeef465b867d453a00152cfa7b67f09bb2489c0ad55214326aa/Flask_GzipBomb-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0d7333ad7778f8020b49acddffea71fe", "sha256": "6da1d0895bab4dd4e1e1cc404bc9ede17d98a2ed51655a5ad3d87394b422af50" }, "downloads": -1, "filename": "Flask-GzipBomb-0.1.0.tar.gz", "has_sig": false, "md5_digest": "0d7333ad7778f8020b49acddffea71fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6687, "upload_time": "2017-07-10T20:19:40", "url": "https://files.pythonhosted.org/packages/04/5c/675bf06149f8d47a625431c8b2947580936c45de0021452e636882c70fe3/Flask-GzipBomb-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f29e8ce7f3d5a86f87cdb42935fd501f", "sha256": "5d5e06a1929b49dc821369d8bf99760d2390adfe2ebcf8719c8a0b5d685ed05d" }, "downloads": -1, "filename": "Flask_GzipBomb-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f29e8ce7f3d5a86f87cdb42935fd501f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9261, "upload_time": "2017-07-10T20:19:38", "url": "https://files.pythonhosted.org/packages/8b/a6/03634098faeef465b867d453a00152cfa7b67f09bb2489c0ad55214326aa/Flask_GzipBomb-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0d7333ad7778f8020b49acddffea71fe", "sha256": "6da1d0895bab4dd4e1e1cc404bc9ede17d98a2ed51655a5ad3d87394b422af50" }, "downloads": -1, "filename": "Flask-GzipBomb-0.1.0.tar.gz", "has_sig": false, "md5_digest": "0d7333ad7778f8020b49acddffea71fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6687, "upload_time": "2017-07-10T20:19:40", "url": "https://files.pythonhosted.org/packages/04/5c/675bf06149f8d47a625431c8b2947580936c45de0021452e636882c70fe3/Flask-GzipBomb-0.1.0.tar.gz" } ] }