Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@ip-location-db/geolite2-city
Advanced tools
This project provides ip to location database in csv format. If you need MMDB format, please use mmdbmeld.
ip_range_start, ip_range_end, as_number, as_organization
ip_range_start, ip_range_end, country_code
ip_range_start, ip_range_end, country_code, state1, state2, city, postcode, latitude, longitude, timezone
as_number
is a unique number assigned to an Autonomous System (AS) by the IANA. wiki.
country_code
is the two-letter code defined in ISO 3166-1 alpha-2.
You can get the country name, capital, continent, currency, languages, etc.
from the country_code
by Countries Database in JSON, CSV, SQL format.
ip_range_start
and ip_range_end
is ip address.
ipv4
: The csv line 1.0.0.0,1.0.0.255,AU
means that ip addresses between 1.0.0.0
and 1.0.0.255
inclusive are AU
country_code.ipv4-num
: The csv line 16777216,16777471,AU
means that ip addresses between 1.0.0.0
and 1.0.0.255
inclusive are AU
country_code. (16777216
is the number format of the ip address 1.0.0.0
)ipv6
: The csv line 2001:200::,2001:200:ffff:ffff:ffff:ffff:ffff:ffff,JP
means that ip addresses between 2001:200::
and 2001:200:ffff:ffff:ffff:ffff:ffff:ffff
inclusive are JP
country_code.ipv6-num
: The csv line 42540528726795050063891204319802818560,42540528806023212578155541913346768895,JP
means that ip addresses between 2001:200::
and 2001:200:ffff:ffff:ffff:ffff:ffff:ffff
inclusive are JP
country_code. (42540528726795050063891204319802818560
is the number format of the ip address 2001:200::
)Please be careful when using ipv6
and ipv6-num
in your program. The numerical value exceeds 32bit unsigned integer, you would need to use a 128bit unsigned integer.
When merging multiple database, set the front database above back one. (ex. geo-whois-asn-...csv is created by merging 3 database with GeoFeed > Whois > ASN.)
Created by merging 5 RIP (afrinic, apnic, arin, lacnic, ripe ncc) IP-ASN-Country database. ASN (Autonomous System Number) is a unique number assigned to an Autonomous System (AS) by the IANA.
Created by merging GeoFeed database from OpenGeoFeed.
Created by merging 5 RIP provided WHOIS database. There are some inconsistencies between 5 RIP.
We are using this database to get AS number from ipv4 address for asn. This is licensed under a CC BY 4.0, so, you must create attribution to RouteViews for using asn database.
You can download hourly updated database in tsv format from original site.
This is licensed under a Public Domain Dedication and Licence v1.0.
There are some differences from above ASN
database.
You could download and read the license from ip-to-asn-lite or ip-to-country-lite or ip-to-city-lite. Most of the AS Organization name used in asn uses ip-to-asn-lite database. We also use ip-to-asn-lite to get AS Number from ip address as a supplemental.
These database are licensed under a CC BY 4.0, so, you must create attribution to DB-IP.com for using DB-IP database.
In the case of a web application, you must include a link back to DB-IP.com on pages that display or use results from the database. You may do it by pasting the HTML code snippet into your code: <a href='https://db-ip.com/'>IP Geolocation by DB-IP</a>
.
If you need better accuracy or no attribution or daily updates, please use the Commercial Version of db-ip.
GeoLite2 is created by MaxMind. The license of GeoLite2 is written in GEOLITE2_LICENSE and End User License Agreement (EULA) is written in GEOLITE2_EULA. Please carefully read the GEOLITE2_LICENSE and GEOLITE2_EULA files, if you use these database. This package comes with certain restrictions and obligations, most notably:
You can read the latest version of GeoLite2 EULA. GeoLite2 databse is provided under CC BY-SA 4.0 by MaxMind, so, you must create attribution to MaxMind for using GeoLite2 database. If you need better accuracy, please use the commercial version GeoIp2.
Of course, it depends on your use case. But the above list is too long, thus, we write down the recommendation.
geolite2-city
is the one.dbip-city
is the one.geo-whois-asn-country
database.asn
database.We can use libraries in many languages by using mmdb
format.
Some of them are distributed in HostByBelle/IP-Geolocation-DB
and we can convert csv to mmdb by safing/mmdbmeld
.
For example, we can use maxmind developed libraries which are written in python, PHP, perl, ruby, .net, C, java, .net, and so on.
Here is a list of tools and applications that can work with these databases:
safing/mmdbmeld
: Create and customize MMDB file from this database.realchandan/Ip-geo-API
: Go written HTTP server for IPv4 and IPv6 lookups.EP-u-NW/ip_location_server
: A GRPC and HTTP server mapping IP addresses to locations. Supports IPv4 and IPv6 and automatic dataset updates.IPInfoOffline
: Allows you to view information about IP addresses, without connecting any external server.If you know some more, feel free to append it to the list and open a pull request.
License depends on the database which you use. Please read carefully each database license. You can use PDDL (ODC Public Domain Dedication and Licence) or CC0 (Creative Commons Zero) licensed database without attribution for any purpose.
We are glad if you make a link to sapics/ip-location-db, or give us a star to the github repository.
FAQs
Ip to location database
The npm package @ip-location-db/geolite2-city receives a total of 2,813 weekly downloads. As such, @ip-location-db/geolite2-city popularity was classified as popular.
We found that @ip-location-db/geolite2-city demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.