{"id":27969826,"url":"https://github.com/cmliu/ip2asn","last_synced_at":"2025-05-07T21:54:48.985Z","repository":{"id":200464575,"uuid":"705568203","full_name":"cmliu/IP2ASN","owner":"cmliu","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-18T08:09:22.000Z","size":12,"stargazers_count":12,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-07T21:54:44.030Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmliu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-16T09:12:52.000Z","updated_at":"2024-12-11T02:29:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"95b39e2d-2608-4353-9a90-1b2bacd05d93","html_url":"https://github.com/cmliu/IP2ASN","commit_stats":null,"previous_names":["cmliu/ip2asn"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmliu%2FIP2ASN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmliu%2FIP2ASN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmliu%2FIP2ASN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmliu%2FIP2ASN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmliu","download_url":"https://codeload.github.com/cmliu/IP2ASN/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252961843,"owners_count":21832193,"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":[],"created_at":"2025-05-07T21:54:48.347Z","updated_at":"2025-05-07T21:54:48.967Z","avatar_url":"https://github.com/cmliu.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IP2ASN 脚本\n\n这个脚本用于将IP地址映射到其相应的自治系统号（ASN）。它使用了MaxMind的GeoLite2 ASN数据库。\n\n## 使用方法\n\n### 1. 下载脚本\n\n使用以下命令下载脚本：\n\n```bash\nwget -N https://ghproxy.com/https://raw.githubusercontent.com/cmliu/IP2ASN/main/IP2ASN.sh \u0026\u0026 chmod +x IP2ASN.sh\n\n```\n\n### 2. 运行脚本\n\n使用以下命令运行脚本，你可以选择提供一个包含IP地址的文本文件：\n\n```bash\n./IP2ASN.sh [file_ip.txt]\n```\n如果未提供文件名，默认使用 ip.txt。\n\n### 3. 查看结果\n脚本将生成一个CSV文件，其中包含每个IP地址及其对应的ASN。文件名类似于 ip.csv。\n\n## 依赖\n\n确保安装了 mmdb-bin，如果没有，脚本将尝试自动安装。\n\n```bash\nsudo apt update\nsudo apt install mmdb-bin -y\n```\n\n## 注意事项\n如果你在中国大陆，请确保使用了适当的代理地址以加速下载。\n## 鸣谢\n感谢 P3TERX 提供的GeoLite2 ASN数据库。\n\n## 许可\n此脚本遵循 MIT License。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmliu%2Fip2asn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmliu%2Fip2asn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmliu%2Fip2asn/lists"}