{ "info": { "author": "Bert JW Regeer", "author_email": "bertjw@regeer.org", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "requests-safe\n-------------\n\nThis project provides an ``HTTPAdapter`` for the Requests_ library that will\ndisallow connections to networks that are considered unsafe to connect to.\n\nThe primary use case is to safely be able to retrieve items from a user\nprovided URL without potentially requesting internal or secret resources within\nones own network.\n\nUsage\n~~~~~\n\nIt's very simple to use this library, install it as part of your project and\nthen the following code will protect all requests against accidentally\nretrieving something from an IP address in the ranges listed below!\n\n.. code:: python\n\n import requests_safe\n from requests import Session\n\n with Session() as s:\n requests_safe.apply(s)\n\n s.get(\"https://google.com/\")\n\nThere is unfortunately no global way to apply this, so using ``requests.get()``\nand friends directly will not be protected by default.\n\nIPv4 unsafe networks\n~~~~~~~~~~~~~~~~~~~~\n\nThese are the IPv4 networks that are blocked from being conneted to:\n\n========================= ==================\n Name Network (CIDR)\n------------------------- ------------------\nRFC1918 (private network) 10.0.0.0/8\nRFC1918 172.16.0.0/12\nRFC1918 192.168.0.0/16\nLink-Local 169.254.0.0/16\nCG-NAT address space 100.64.0.0/10\nLocalhost/loopback 127.0.0.0/8\nWildcard IP 0.0.0.0/32\nIETF Protocol Assignments 192.0.0.0/24\nTEST-NET-1 192.0.2.0/24\nRESERVED 192.88.99.0/24\nBenchmark testing 198.18.0.0/15\nTEST-NET-2 198.51.100.0/24\nTEST-NET-3 203.0.113.0/24\nIP Multicast 224.0.0.0/4\nRESERVED 240.0.0.0/4\nLimited broadcast 255.255.255.255/32\n========================= ==================\n\nIPv6 unsafe networks\n~~~~~~~~~~~~~~~~~~~~\n\nThese are the IPv6 networks that are blocked from being connected to:\n\n============================= ==================\n Name Network (CIDR)\n----------------------------- ------------------\nLocalhost/unspecified address ::/128\nLoopback ::1/128\nIPv4 mapped address ::ffff:0:0/96\nIPv4 translated addresses ::ffff:0:0:0/96\nIPv4/IPv6 translation 64:ff9b::/96\nDiscard prefix 100::/64\nTeredo tunneling 2001::/32\nOrchid v2 (abondoned) 2001:20::/28\nDocumentation 2001:db8::/32\n6to4 addressing scheme 2002::/16\nULA address space fc00::/7\nLink-local address space fe80::/10\nGlobal multicast ff00::/8\n============================= ==================\n\n.. _Requests: http://docs.python-requests.org/en/master/\n\n0.2 (2019-04-24)\n----------------\n\nProject is open sourced!\n\n- No further changes from 0.1\n\n0.1 (2019-04-23)\n----------------\n\nInternal Crunch.io only version.\n\n- New HTTP Adapter for the Requests library.\n\n\nCopyright (c) 2019 Crunch\n\nPermission to use, copy, modify, and distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/crunch-io/requests-safe", "keywords": "requests,urllib3", "license": "ISC License", "maintainer": "", "maintainer_email": "", "name": "requests-safe", "package_url": "https://pypi.org/project/requests-safe/", "platform": "", "project_url": "https://pypi.org/project/requests-safe/", "project_urls": { "Homepage": "https://github.com/crunch-io/requests-safe" }, "release_url": "https://pypi.org/project/requests-safe/0.2/", "requires_dist": [ "requests", "urllib3", "ipaddress ; python_version == \"2.7\"", "pytest ; extra == 'testing'", "pytest-cov ; extra == 'testing'", "coverage ; extra == 'testing'", "mocket ; extra == 'testing'" ], "requires_python": "", "summary": "Provides an adapter for requests that won't allow connections to \"unsafe\" networks.", "version": "0.2" }, "last_serial": 5189138, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "8b2b488e823dcf08b92c97f430dc8483", "sha256": "4c7deeaaf6731653fa5bd046f7cd3bf5f2fc66b5d55921a64c8b94584a58f4d6" }, "downloads": -1, "filename": "requests_safe-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8b2b488e823dcf08b92c97f430dc8483", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6424, "upload_time": "2019-04-24T20:55:02", "url": "https://files.pythonhosted.org/packages/39/11/bf8df578b7cc5f3639e242123492578ee7083c34e2b64e80e43e2b9b9eee/requests_safe-0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "78ba94d39c91e8737c068bb5b1bcf45c", "sha256": "e01d9ab79fbaab88427979a03242fac1e3235bac66926933b1004d0dacf82873" }, "downloads": -1, "filename": "requests-safe-0.2.tar.gz", "has_sig": false, "md5_digest": "78ba94d39c91e8737c068bb5b1bcf45c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9326, "upload_time": "2019-04-24T20:55:09", "url": "https://files.pythonhosted.org/packages/35/3b/d1abc4483b331616b18464fa9c8fd37d2da9852eb4baa5d43dfec5681e7e/requests-safe-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8b2b488e823dcf08b92c97f430dc8483", "sha256": "4c7deeaaf6731653fa5bd046f7cd3bf5f2fc66b5d55921a64c8b94584a58f4d6" }, "downloads": -1, "filename": "requests_safe-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8b2b488e823dcf08b92c97f430dc8483", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6424, "upload_time": "2019-04-24T20:55:02", "url": "https://files.pythonhosted.org/packages/39/11/bf8df578b7cc5f3639e242123492578ee7083c34e2b64e80e43e2b9b9eee/requests_safe-0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "78ba94d39c91e8737c068bb5b1bcf45c", "sha256": "e01d9ab79fbaab88427979a03242fac1e3235bac66926933b1004d0dacf82873" }, "downloads": -1, "filename": "requests-safe-0.2.tar.gz", "has_sig": false, "md5_digest": "78ba94d39c91e8737c068bb5b1bcf45c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9326, "upload_time": "2019-04-24T20:55:09", "url": "https://files.pythonhosted.org/packages/35/3b/d1abc4483b331616b18464fa9c8fd37d2da9852eb4baa5d43dfec5681e7e/requests-safe-0.2.tar.gz" } ] }