Skip to content

anbuhckr/ipscoop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ipscoop

GitHub issues GitHub forks GitHub stars GitHub license PyPI - Python Version

Fast IP Scoop

Table of Contents

Installation

To install ipscoop, simply:

$ python3 -m pip install -U git+https://github.com/anbuhckr/ipscoop.git

or from source:

$ python3 setup.py install

CLI

Download mmdb:

$ python3 -m ipscoop --download

Usage:

$ python3 -m ipscoop -ip 8.8.8.8

Getting Started

#! /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}')

Ref