{"id":13537799,"url":"https://github.com/secynic/ipwhois","last_synced_at":"2025-04-27T04:53:43.474Z","repository":{"id":37706254,"uuid":"12668735","full_name":"secynic/ipwhois","owner":"secynic","description":"Retrieve and parse whois data for IPv4 and IPv6 addresses","archived":false,"fork":false,"pushed_at":"2024-10-15T07:59:32.000Z","size":1041,"stargazers_count":575,"open_issues_count":29,"forks_count":124,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-04-27T04:53:39.231Z","etag":null,"topics":["asn","bsd-license","ietf","ip-address","ipv4","ipv6","nic","python","rdap","rir","rwhois","whois"],"latest_commit_sha":null,"homepage":"https://ipwhois.readthedocs.io/en/latest","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/secynic.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.old.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-09-07T17:35:10.000Z","updated_at":"2025-04-22T16:21:03.000Z","dependencies_parsed_at":"2024-06-18T12:27:16.300Z","dependency_job_id":"944fee4a-23ee-4ee8-87cb-083a0f245e85","html_url":"https://github.com/secynic/ipwhois","commit_stats":{"total_commits":443,"total_committers":12,"mean_commits":"36.916666666666664","dds":0.04740406320541757,"last_synced_commit":"a5d5b65ce3b1d4b2c20bba2e981968f54e1b5e9e"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secynic%2Fipwhois","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secynic%2Fipwhois/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secynic%2Fipwhois/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secynic%2Fipwhois/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/secynic","download_url":"https://codeload.github.com/secynic/ipwhois/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251089605,"owners_count":21534518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asn","bsd-license","ietf","ip-address","ipv4","ipv6","nic","python","rdap","rir","rwhois","whois"],"created_at":"2024-08-01T09:01:03.803Z","updated_at":"2025-04-27T04:53:43.458Z","avatar_url":"https://github.com/secynic.png","language":"Python","funding_links":[],"categories":["\u003ca id=\"9eee96404f868f372a6cbc6769ccb7f8\"\u003e\u003c/a\u003e新添加的","\u003ca id=\"9eee96404f868f372a6cbc6769ccb7f8\"\u003e\u003c/a\u003e工具","Python"],"sub_categories":["\u003ca id=\"31185b925d5152c7469b963809ceb22d\"\u003e\u003c/a\u003e新添加的"],"readme":"=======\nipwhois\n=======\n\n.. image:: https://coveralls.io/repos/github/secynic/ipwhois/badge.svg?branch=\n    master\n    :target: https://coveralls.io/github/secynic/ipwhois?branch=master\n.. image:: https://img.shields.io/github/issues-raw/secynic/ipwhois\n    :target: https://github.com/secynic/ipwhois/issues\n.. image:: https://codeclimate.com/github/secynic/ipwhois/badges/issue_count.svg\n    :target: https://codeclimate.com/github/secynic/ipwhois\n.. image:: https://img.shields.io/badge/license-BSD%202--Clause-blue.svg\n    :target: https://github.com/secynic/ipwhois/tree/master/LICENSE.txt\n.. image:: https://img.shields.io/badge/python-2.7%2C%203.4+-blue.svg\n    :target: https://docs.python.org\n.. image:: https://img.shields.io/badge/docs-latest-green.svg?style=flat\n    :target: https://ipwhois.readthedocs.io/en/latest\n.. image:: https://img.shields.io/badge/docs-dev-yellow.svg?style=flat\n    :target: https://ipwhois.readthedocs.io/en/dev\n\nSummary\n=======\n\nipwhois is a Python package focused on retrieving and parsing whois data\nfor IPv4 and IPv6 addresses.\n\n.. note::\n\n    If you are experiencing latency issues, it is likely related to rate\n    limiting. Rate limiting is based on your source IP, which may be a problem\n    with multiple users behind the same proxy. Additionally, LACNIC implements\n    aggressive rate limiting. Experimental bulk query support is new as of\n    v1.0.0.\n\nFeatures\n========\n\n* Parses a majority of whois fields in to a standard dictionary\n* IPv4 and IPv6 support\n* Supports RDAP queries (recommended method, see:\n  https://tools.ietf.org/html/rfc7483)\n* Proxy support for RDAP queries\n* Supports legacy whois protocol queries\n* Referral whois support for legacy whois protocol\n* Recursive network parsing for IPs with parent/children networks listed\n* National Internet Registry support for JPNIC and KRNIC\n* Supports IP to ASN and ASN origin queries\n* Python 2.7 and 3.4+ supported\n* Useful set of utilities\n* Experimental bulk query support\n* BSD license\n* Human readable field translations\n* Full CLI for IPWhois with optional ANSI colored console output.\n\nLinks\n=====\n\nDocumentation\n-------------\n\nGitHub latest\n^^^^^^^^^^^^^\n\nhttps://ipwhois.readthedocs.io/en/latest\n\nGitHub dev\n^^^^^^^^^^\n\nhttps://ipwhois.readthedocs.io/en/dev\n\nExamples\n--------\n\nhttps://github.com/secynic/ipwhois/tree/master/ipwhois/examples\n\nGithub\n------\n\nhttps://github.com/secynic/ipwhois\n\nPypi\n----\n\nhttps://pypi.org/project/ipwhois\n\nChanges\n-------\n\nhttps://ipwhois.readthedocs.io/en/latest/CHANGES.html\n\nUpgrade Notes\n-------------\n\nhttps://ipwhois.readthedocs.io/en/latest/UPGRADING.html\n\nDependencies\n============\n\nPython 2.7::\n\n    dnspython\n    ipaddr\n    defusedxml\n\nPython 3.4+::\n\n    dnspython\n    defusedxml\n\nInstalling\n==========\n\nLatest release from PyPi::\n\n    pip install --upgrade ipwhois\n\nGitHub - Stable::\n\n    pip install -e git+https://github.com/secynic/ipwhois@master#egg=ipwhois\n\nGitHub - Dev::\n\n    pip install -e git+https://github.com/secynic/ipwhois@dev#egg=ipwhois\n\nFirewall Ports\n==============\n\nipwhois needs some outbound firewall ports opened from your host/server.\n\n:ASN (DNS): 53/tcp\n:ASN (Whois): 43/tcp\n:ASN (HTTP):\n    80/tcp\n\n    443/tcp (Pending)\n:RDAP (HTTP):\n    80/tcp\n\n    443/tcp (Pending)\n:NIR (HTTP):\n    80/tcp\n\n    443/tcp (KRNIC)\n:Legacy Whois: 43/tcp\n:Get Host: 43/tcp\n\nAPI\n===\n\nIPWhois (main class)\n--------------------\n\nipwhois.IPWhois is the base class for wrapping RDAP and Legacy Whois lookups.\nInstantiate this object, then call one of the lookup functions:\n\n`RDAP (HTTP) - IPWhois.lookup_rdap() \u003c#rdap-http\u003e`_\nOR\n`Legacy Whois - IPWhois.lookup_whois() \u003c#legacy-whois\u003e`_\n\nInput\n^^^^^\n\n+--------------------+--------+-----------------------------------------------+\n| **Key**            |**Type**| **Description**                               |\n+--------------------+--------+-----------------------------------------------+\n| address            | str    | An IPv4 or IPv6 address as a string, integer, |\n|                    |        | IPv4Address, or IPv6Address.                  |\n+--------------------+--------+-----------------------------------------------+\n| timeout            | int    | The default timeout for socket connections    |\n|                    |        | in seconds. Defaults to 5.                    |\n+--------------------+--------+-----------------------------------------------+\n| proxy_opener       | object | The urllib.request.OpenerDirector request for |\n|                    |        | proxy support or None.                        |\n+--------------------+--------+-----------------------------------------------+\n\nRDAP (HTTP)\n-----------\n\nIPWhois.lookup_rdap() is the recommended lookup method. RDAP provides a\nfar better data structure than legacy whois and REST lookups (previous\nimplementation). RDAP queries allow for parsing of contact information and\ndetails for users, organizations, and groups. RDAP also provides more detailed\nnetwork information.\n\nRDAP documentation:\n\nhttps://ipwhois.readthedocs.io/en/latest/RDAP.html\n\nLegacy Whois\n------------\n\n.. note::\n\n    Legacy Whois output is different from RDAP. See the below JSON outputs for\n    a comparison:\n\n    Legacy Whois:\n    https://ipwhois.readthedocs.io/en/latest/WHOIS.html#basic-usage\n\n    RDAP:\n    https://ipwhois.readthedocs.io/en/latest/RDAP.html#basic-usage\n\nLegacy Whois documentation:\n\nhttps://ipwhois.readthedocs.io/en/latest/WHOIS.html\n\nNational Internet Registries\n----------------------------\n\nThis library now supports NIR lookups for JPNIC and KRNIC. Previously, Whois\nand RDAP data for Japan and South Korea was restricted. NIR lookups scrape\nthese national registries directly for the data restricted from regional\ninternet registries. NIR queries are enabled by default via the inc_nir\nargument in the IPWhois.lookup_*() functions.\n\nhttps://ipwhois.readthedocs.io/en/latest/NIR.html\n\nAutonomous System Numbers\n-------------------------\n\nThis library now supports ASN origin lookups via Whois and HTTP.\n\nIP ASN functionality was moved to its own parser API (IPASN).\n\nThere is no CLI for these yet.\n\nhttps://ipwhois.readthedocs.io/en/latest/ASN.html\n\nUtilities\n---------\n\nUtilities documentation:\n\nhttps://ipwhois.readthedocs.io/en/latest/UTILS.html\n\nScripts\n-------\n\nCLI documentation:\n\nhttps://ipwhois.readthedocs.io/en/latest/CLI.html\n\nExperimental Functions\n----------------------\n\n.. caution::\n\n    Functions in experimental.py contain new functionality that has not yet\n    been widely tested. Bulk lookup support contained here can result in\n    significant system/network resource utilization. Additionally, abuse of\n    this functionality may get you banned by the various services queried by\n    this library. Use at your own discretion.\n\nExperimental functions documentation:\n\nhttps://ipwhois.readthedocs.io/en/latest/EXPERIMENTAL.html\n\nContributing\n============\n\nhttps://ipwhois.readthedocs.io/en/latest/CONTRIBUTING.html\n\nIP Reputation Support\n=====================\n\nThis feature is under consideration. Take a look at TekDefense's Automater:\n\n`TekDefense-Automater \u003chttps://github.com/1aN0rmus/TekDefense-Automater\u003e`_\n\nDomain Support\n==============\n\nThere are no plans for domain whois support in this project.\n\nLook at Sven Slootweg's\n`python-whois \u003chttps://github.com/joepie91/python-whois\u003e`_ for a library with\ndomain support.\n\nSpecial Thanks\n==============\n\nThank you JetBrains for the `PyCharm \u003chttps://www.jetbrains.com/pycharm/\u003e`_\nopen source support!\n\nThank you Chris Wells (`@cdubz \u003chttps://github.com/cdubz\u003e`_) for your\nextensive testing on the experimental functions!\n\nLast but not least, thank you to all the issue submitters and contributors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecynic%2Fipwhois","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecynic%2Fipwhois","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecynic%2Fipwhois/lists"}