{"id":18015616,"url":"https://github.com/m8sec/ipparser","last_synced_at":"2025-10-12T02:14:04.853Z","repository":{"id":62571534,"uuid":"179345945","full_name":"m8sec/ipparser","owner":"m8sec","description":"Python support package to parse IP and host inputs from network based tooling","archived":false,"fork":false,"pushed_at":"2023-10-21T00:32:53.000Z","size":15,"stargazers_count":12,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-25T16:07:54.509Z","etag":null,"topics":["argument-parser","enumeration","ipv4","iteration","python-module","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m8sec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-04-03T18:19:00.000Z","updated_at":"2025-06-15T19:56:56.000Z","dependencies_parsed_at":"2024-06-21T05:55:59.624Z","dependency_job_id":null,"html_url":"https://github.com/m8sec/ipparser","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"990c77c5a1d50d8df374a595ef68eade32cdacb0"},"previous_names":["m8r0wn/ipparser"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/m8sec/ipparser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m8sec%2Fipparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m8sec%2Fipparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m8sec%2Fipparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m8sec%2Fipparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m8sec","download_url":"https://codeload.github.com/m8sec/ipparser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m8sec%2Fipparser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279009930,"owners_count":26084668,"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-10-12T02:00:06.719Z","response_time":53,"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":["argument-parser","enumeration","ipv4","iteration","python-module","python3"],"created_at":"2024-10-30T04:14:34.523Z","updated_at":"2025-10-12T02:14:04.811Z","avatar_url":"https://github.com/m8sec.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IPParser\n\nThe IPParser Python library was created to simplify accepting IP addresses, DNS names, and target / host information in security or network based tooling.\n\nUser inputs are parsed to provide an iterable list for further action. If called with ```resolve=True```, ipparser will attempt to perform an \"A\" record lookup and return the first resolved address associated with the host.\n\n#### Inputs:\nIPParser currently accepts the following user inputs:\n* Single IP (192.168.1.10)\n* IP ranges (192.168.1.1-55)\n* Multiple IP's (192.168.1.3,192.168.1.7,m8sec.dev)\n* CIDR Ranges /8-/32 (192.168.1.0/24)\n* URL's (https://m8sec.dev)\n* IP:Port (192.168.1.1:8080)\n* DNS Names (m8sec.dev)\n* TXT files (Containing any of the items listed)\n* Nmap XML Reports\n* Read from STDIN\n\n## Install\n```bash\npip3 install ipparser\n```\nOR \n```bash\ngit clone https://github.com/m8sec/ipparser\ncd ipparser\npython3 setup.py install\n```\n\n## (Primary) Usage:\nThe IPParser function can be called with the following arguments (shown with their default values):\n* ```open_ports=False``` - Return IP:Port notation for all open ports found (Nmap XML only)\n* ```exit_on_error=True``` - Exit on error while parsing user input.\n* ```resolve=False``` - Resolve any DNS names identified, to IPv4 addresses, and append to output.\n* ```ns=[]``` - Define name servers for DNS lookups.\n\n## Examples\n#### Standard Usage\n```python\n\u003e\u003e\u003e from ipparser import ipparser\n\u003e\u003e\u003e ipparser('192.168.1.3-5')\n['192.168.1.3', '192.168.1.4', '192.168.1.5']\n\n\u003e\u003e\u003e ipparser('yahoo.com',resolve=True)\n['74.6.143.26']\n\n\n\u003e\u003e\u003e ipparser('192.168.1.1,yahoo.com')\n['192.168.1.1', 'yahoo.com']\n```\n\n#### Argparse Integration - Required Positional Argument:\n```python\nfrom ipparser import ipparser\nfrom argparse import ArgumentParser\n\nargs = ArgumentParser(description='ipparser integration with argparse')\nargs.add_argument(dest='positional_host', nargs='+', type=lambda x: ipparser(x, resolve=False), help='Host Input')\nargs = args.parse_args()\n```\n```\nNamespace(positional_host=[['192.168.1.1']])\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm8sec%2Fipparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm8sec%2Fipparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm8sec%2Fipparser/lists"}