Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fancellu/ip2country
Reads in each IP, lookup for country, print out iso_code and country name, plus ip count per country
https://github.com/fancellu/ip2country
maxmind-geoip2-api python
Last synced: about 1 month ago
JSON representation
Reads in each IP, lookup for country, print out iso_code and country name, plus ip count per country
- Host: GitHub
- URL: https://github.com/fancellu/ip2country
- Owner: fancellu
- Created: 2023-07-09T10:08:48.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-07-09T10:16:50.000Z (over 1 year ago)
- Last Synced: 2023-08-01T22:57:26.752Z (over 1 year ago)
- Topics: maxmind-geoip2-api, python
- Homepage:
- Size: 1.95 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ip2Country
Uses MaxMind GeoLite2 Country free database to do bulk IP address country lookups
## To run
Download ```GeoLite2-Country.mmdb``` to the local directory
```pip install -r requirements.txt```
```python main.py ipfile.txt```
## Outputs
line_number, IP, iso_code, country_name
Then the count of IP addresses for each country, ordered by most common