{"id":13929919,"url":"https://github.com/JackSlateur/perl-ip2as","last_synced_at":"2025-07-19T12:31:01.405Z","repository":{"id":77760946,"uuid":"84560790","full_name":"JackSlateur/perl-ip2as","owner":"JackSlateur","description":"IP to ASN mapping","archived":false,"fork":false,"pushed_at":"2024-04-26T10:29:29.000Z","size":15338,"stargazers_count":10,"open_issues_count":3,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-26T19:36:39.625Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JackSlateur.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":"2017-03-10T13:06:13.000Z","updated_at":"2022-08-05T15:41:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"f59a4854-1120-46ed-9d4f-76284691d6ca","html_url":"https://github.com/JackSlateur/perl-ip2as","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JackSlateur/perl-ip2as","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackSlateur%2Fperl-ip2as","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackSlateur%2Fperl-ip2as/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackSlateur%2Fperl-ip2as/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackSlateur%2Fperl-ip2as/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JackSlateur","download_url":"https://codeload.github.com/JackSlateur/perl-ip2as/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackSlateur%2Fperl-ip2as/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265934185,"owners_count":23852086,"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":"2024-08-07T18:02:37.228Z","updated_at":"2025-07-19T12:30:59.259Z","avatar_url":"https://github.com/JackSlateur.png","language":"Perl","funding_links":[],"categories":["others"],"sub_categories":[],"readme":"What is ip2as\n===\n\nip2as is a small perl module to help map IP adresses to ASN. Both IP version are supported transparently.\n\nPrerequisites\n---\n\n - Perl (5.14 required)\n - libnet-patricia-perl\n - libjson-xs-perl (optional, you should use it)\n\nHow to use\n---\n\n - First, create a json with a list of prefix -\u003e ASN. tools/ip2asn.json is provided full a snapshot of the current internet view.\n - Load the json:\n```perl\nip2as::init('path/to/mapping.json');\n```\n - Do some queries:\n```perl\nprint ip2as::getas4ip('8.8.8.8'); #prints 15169\nprint ip2as::getas4ip('2001:4f8:1:10:0:1991:8:25'); #prints 1280\n```\n - When nothing is found, getas4ip returns undef.\n\nKnown bugs\n---\n\nThis is not really a code-bug, but the default file contains stupid data due to misinformation from the RIPE (and some bad folks):\n```perl\nprint ip2as::getas4ip('::') . \"\\n\"; #prints 29049\nprint ip2as::getas4ip('10.0.0.1') . \"\\n\"; #prints 15576\n```\n\nThat specific issue is now fixed (by static exclusion), it remains sensitive to bad data.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJackSlateur%2Fperl-ip2as","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJackSlateur%2Fperl-ip2as","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJackSlateur%2Fperl-ip2as/lists"}