GithubHelp home page GithubHelp logo

stanfrbd / check_ip Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 13 KB

A CLI OSINT tool to check IP address using ipinfo official API and spur.us unofficial API (free tier bypassing web view - 5000 queries a month).

Python 100.00%

check_ip's Introduction

check_ip

This is a simple python script that checks IPinfo and spur.us for information about an IP address. It helps to identify the location of the IP address, the organization that owns the IP address, the IP address's ASN and if it is associated with a known threat or commercial VPN.

Getting Started

  • To get started, clone the repository and install the requirements.

You might want to create a venv before installing the dependencies.

pip install -r requirements.txt

Edit the config file

cp secrets-sample.json secrets.json
  • Fill the optionnal values (including proxy if needed) in the secrets.json file. This values will be useful for spur_us_api.py script. It is optional to fill the ipinfo_token value, but it is recommended to fill it to avoid rate limit.
{
    "spur_email": "[email protected]",
    "spur_password": "yourpassword",
    "ipinfo_token": "token",
    "proxy_url": ""
}

Note: if you don't have any account or token to use, try out the check_ip_free.py script, that doesn't require any token or account, only proxy if needed. It may have a lot of limitations in terms of requests and information (e.g. IP blocked or rate limit).

Usage

python3 check_ip.py -h
usage: check_ip.py [-h] [-a IP] [-i INPUT_FILE]

Get IP information

options:
  -h, --help            show this help message and exit
  -a IP, --ip-address IP
                        IP address to check
  -i INPUT_FILE, --input-file INPUT_FILE
                        File containing IP addresses to check

Tests

python3 check_ip.py -i tests/tests.txt
  • Output
+-------------------+--------------------------+
|        Key        |          Value           |
+-------------------+--------------------------+
|         IP        |         1.1.1.1          |
|        City       |        The Rocks         |
|       Region      |     New South Wales      |
|      Country      |            AU            |
|      Location     |    -33.8592,151.2081     |
|        ISP        | AS13335 Cloudflare, Inc. |
|       Postal      |           2000           |
|      Timezone     |     Australia/Sydney     |
| VPN Vendor (Spur) |      Not Anonymous       |
+-------------------+--------------------------+

+-------------------+----------------------------+
|        Key        |           Value            |
+-------------------+----------------------------+
|         IP        |       45.154.138.91        |
|        City       |         Marseille          |
|       Region      | Provence-Alpes-Côte d'Azur |
|      Country      |             FR             |
|      Location     |       43.2970,5.3811       |
|        ISP        |   AS206092 IPXO LIMITED    |
|       Postal      |           13000            |
|      Timezone     |        Europe/Paris        |
| VPN Vendor (Spur) |        Express VPN         |
+-------------------+----------------------------+

check_ip's People

Contributors

stanfrbd avatar stantest13 avatar

Stargazers

gr00t avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.