{"id":23889543,"url":"https://github.com/superstes/python3_resolver","last_synced_at":"2025-07-26T20:33:07.063Z","repository":{"id":65167552,"uuid":"585179672","full_name":"superstes/python3_resolver","owner":"superstes","description":"Script to resolve A/AAAA DNS records","archived":false,"fork":false,"pushed_at":"2023-05-29T18:28:54.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-01T20:15:30.528Z","etag":null,"topics":["dns","dns-resolution","helper-functions","script","utility"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/superstes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-01-04T14:18:58.000Z","updated_at":"2023-05-29T18:33:24.000Z","dependencies_parsed_at":"2023-07-26T13:06:16.152Z","dependency_job_id":null,"html_url":"https://github.com/superstes/python3_resolver","commit_stats":null,"previous_names":["superstes/python3-resolver"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/superstes/python3_resolver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superstes%2Fpython3_resolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superstes%2Fpython3_resolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superstes%2Fpython3_resolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superstes%2Fpython3_resolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superstes","download_url":"https://codeload.github.com/superstes/python3_resolver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superstes%2Fpython3_resolver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267227737,"owners_count":24056355,"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","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["dns","dns-resolution","helper-functions","script","utility"],"created_at":"2025-01-04T10:09:45.944Z","updated_at":"2025-07-26T20:33:07.043Z","avatar_url":"https://github.com/superstes.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python3 - DNS Resolver\n\nThis is a simple script to resolve DNS A/AAAA records.\n\nIt only uses builtin modules.\n\n## Install\n\n```bash\npython3 -m pip install python3-resolver\n```\n\nSee: [PyPI](https://pypi.org/project/python3-resolver/)\n\n## Usage\n\n### Shell\n\nIf ran from the shell - use the following parameters:\n\n* **-n/--hostname** =\u003e The hostname/DNS-record to resolve\n* **-p/--protocol** =\u003e IP-Protocol to return (_optional; one of '4/6/46'_)\n\n```bash\npython3 dns_resolver.py -h\n\u003e usage: DNS Resolver [-h] -n HOSTNAME [-p {4,6,46}]\n\u003e \n\u003e Script to resolve A/AAAA DNS records\n\u003e \n\u003e options:\n\u003e   -h, --help            show this help message and exit\n\u003e   -n HOSTNAME, --hostname HOSTNAME\n\u003e                         The hostname/DNS-record to resolve\n\u003e   -p {4,6,46}, --protocol {4,6,46}\n\u003e                         IP-Protocol to return\n\npython3 dns_resolver.py -n superstes.eu\n\u003e ['89.43.33.99', '2a05:8280:f:42ea::3']\n\npython3 dns_resolver.py -n superstes.eu -p 4\n\u003e ['89.43.33.99']\n\npython3 dns_resolver.py -n unsetdomain.com\n\u003e []\n```\n\n### Programmatically\n\nYou can import the resolver from other python modules/scripts.\n\n#### Installed via PIP\n\n```python3\nfrom dns_resolver import resolve, resolve_ipv4, resolve_ipv6\n\nresolve('superstes.eu')\n# list(['89.43.33.99', '2a05:8280:f:42ea::3'])\n\nresolve_ipv4('superstes.eu')\n# list(['89.43.33.99'])\n\nresolve_ipv6('superstes.eu')\n# list(['2a05:8280:f:42ea::3'])\n```\n\n#### Copied\n\nPer example if the scripts are saved in the same directory.\n\n```bash\nls .\n\u003e dns_resolver.py\n\u003e program.py\n```\n\n```python3\nfrom dns_resolver import resolve, resolve_ipv4, resolve_ipv6\n\nresolve('superstes.eu')\n# list(['89.43.33.99', '2a05:8280:f:42ea::3'])\n\nresolve_ipv4('superstes.eu')\n# list(['89.43.33.99'])\n\nresolve_ipv6('superstes.eu')\n# list(['2a05:8280:f:42ea::3'])\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperstes%2Fpython3_resolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperstes%2Fpython3_resolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperstes%2Fpython3_resolver/lists"}