{"id":21959311,"url":"https://github.com/sbarbett/udns_zexport","last_synced_at":"2025-03-22T20:11:51.224Z","repository":{"id":199287677,"uuid":"702555278","full_name":"sbarbett/udns_zexport","owner":"sbarbett","description":"Tool to export UltraDNS zone files in BIND or JSON format, with Docker support for local BIND server testing.","archived":false,"fork":false,"pushed_at":"2024-09-30T14:47:02.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-27T23:47:37.418Z","etag":null,"topics":["dns","sysadmin-tool","ultradns","vercara"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sbarbett.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-10-09T14:36:06.000Z","updated_at":"2024-09-30T14:47:05.000Z","dependencies_parsed_at":"2024-11-29T09:40:07.360Z","dependency_job_id":null,"html_url":"https://github.com/sbarbett/udns_zexport","commit_stats":null,"previous_names":["sbarbett/udns_zexport"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbarbett%2Fudns_zexport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbarbett%2Fudns_zexport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbarbett%2Fudns_zexport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbarbett%2Fudns_zexport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbarbett","download_url":"https://codeload.github.com/sbarbett/udns_zexport/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245013996,"owners_count":20547181,"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":["dns","sysadmin-tool","ultradns","vercara"],"created_at":"2024-11-29T09:27:36.644Z","updated_at":"2025-03-22T20:11:51.206Z","avatar_url":"https://github.com/sbarbett.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# udns_zexport\n\nThis tool provides a programmatic way to export _all_ zone files from your UltraDNS account, either in BIND text format or JSON. For those who wish to locally test DNS resolutions, it offers a Docker build to spin up a BIND server with your zone files.\n\n## Features\n\n1. Export zones in BIND text format.\n2. Export zones in JSON format.\n3. Convert JSON formatted zones into CSV.\n4. Docker integration to spin up a local BIND server using the exported zone files.\n\n## Quick Start\n\n### Zone Export\n\nTo export your zone files:\n\n```bash\n./src/zexport.py -u $UDNS_UNAME -p $UDNS_PW\n```\n\n#### Debug Mode\n\nBy default, this script will request zone files in batches of 250. If there's an issue with a single zone in the whole of the batch request, however, the entire export will fail. To work around this, use the `-d` or `--debug` switch. Debug mode will, instead, download each zone individually and display warnings for any that fail. Obviously, this takes much longer.\n\n#### Custom Input File\n\nOptionally, you may specify a text file containing a list of zones to export. The file is expected to be in your working directory. Each zone should be separated by line breaks. I included zoneslist.txt as a basic formatting example. The switch is `-z` or `--zones-file`.\n\n### Docker BIND Server\n\nTo quickly start a BIND server with the exported zone files:\n\n```bash\ncp -R zones docker\ncd docker\n./build.sh\n```\n\nYou can then query your local BIND server:\n\n```bash\ndig @localhost testingsomethingout.biz\n```\n\n### JSON and CSV Conversion\n\nTo export zones in JSON format:\n\n```bash\n./src/zexport.py -u $UDNS_UNAME -p $UDNS_PW -j\n```\n\nConvert the exported JSON to CSV:\n\n```bash\n./utils/csvgen.py zones_data.json\n```\n\n### Audit Report\n\nThe `audit.py` utility provides an analysis of your DNS.\n\n#### Features:\n- **General Information**: Overview of the number of zones, total records, and the timestamp of the report generation.\n- **Record Types Distribution**: Breakdown of the distribution of different types of DNS records (e.g., `NS`, `SOA`, `MX`).\n- **Domain Analysis**:\n  - **Subdomain Count**: Enumerates the number of subdomains per domain.\n  - **Deepest Subdomain**: Identifies the subdomain with the highest level of depth.\n- **MX Records Analysis**:\n  - **MX Distribution**: Provides details on mail exchange servers being used.\n  - **Priority Distribution**: Assesses the priority levels set for mail servers.\n- **CNAME Records Analysis**:\n  - **Longest CNAME Chain**: Reveals the longest `CNAME` redirection chain, which can be useful for debugging potential DNS issues.\n- **TXT Records Analysis**: Analysis of `TXT` records including:\n  - Breakdown of `SPF`, `DKIM`, and `DMARC` record counts, crucial for mail delivery and security.\n- **Security Checks**:\n  - **DNSSEC Enabled Zones**: Counts the number of zones with DNSSEC enabled, indicating a secure DNS configuration.\n- **Miscellaneous Checks**:\n  - **IPv6 Adoption**: Quantifies the number of zones adopting IPv6.\n\n#### Usage:\nThe input file is the JSON export produced by `zexport.py`. By default, it reads from `zones_data.json`, but this can be customized using the file switch. The report can be outputted either to the terminal or as an HTML file.\n\nExample:\n```bash\n$ ./utils/audit.py\n```\n\nFor HTML output:\n```bash\n$ ./utils/audit.py --html\n```\n\n## Prerequisites\n\nThis project uses the [ultra_rest_client](https://github.com/ultradns/python_rest_api_client) module.\n\n- Python dependencies: \n    * ultra_rest_client\n    * tqdm\n    * requests\n    * termcolor\n\nInstall the required Python packages with:\n\n```bash\npip install -r requirements.txt\n```\n\n## License\n\nThis project is licensed under the terms of the [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbarbett%2Fudns_zexport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbarbett%2Fudns_zexport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbarbett%2Fudns_zexport/lists"}