Fast IP Scoop
To install ipscoop, simply:
$ python3 -m pip install -U git+https://github.com/anbuhckr/ipscoop.git
or from source:
$ python3 setup.py install
Download mmdb:
$ python3 -m ipscoop --download
Usage:
$ python3 -m ipscoop -ip 8.8.8.8
#! /usr/bin/env python3
import ipscoop, os
from ipscoop import IpScoop
ipscoop_path = os.path.dirname(ipscoop.__file__)
db_path = os.path.join(ipscoop_path, 'ipscoop.mmdb')
#load ip
ip_scoop = IpScoop(db_path)
#all data
data = ip_scoop.data('8.8.8.8')
if data:
print(f'data: {data}')
else:
print('Data not found!')
#cidr
print(f'cidr: {data.cidr}')