Skip to main content

An IP to vulnerability utility

Project description

ip2vulns

An IP to vulnerabilities utility. This tool is able to retrieve information related to given IP(s). This tool takes advantage of Shodan InternetDB API.

For CVE information, this tool retrieve CVE information from a github repo nvd-json-data-feed

Disclaimer

By using this, you also agree to the term of use of the APIs used.

Installation

Install with pip

Using the following pip command to install: pip install ip2vulns

Usage

usage: ip2vulns [-h] [-i INPUT [INPUT ...]] [-s CVSS] [-o OUT] [--disable-stdout] [-v]

IP 2 vulnerability tools

options:
  -h, --help            show this help message and exit
  -i INPUT [INPUT ...], --input INPUT [INPUT ...]
                        Query information from https://internetdb.shodan.io/
                        support multiple ip and cidr, separate using space, e.g. -i 8.8.8.8 51.83.59.99 192.168.0.0/24
  -s CVSS, --cvss CVSS  Enable cvss score filter, required a number
                        If 0 is given, targets found with no CVE information will be filtered out. And all CVEs will be checked.
                        When 0 is given, the process can be slow if huge amount of CVEs are founded. Not Recommend to pass 0 in.
  -o OUT, --out OUT     Define output file, default print to stdout
                        Available option: stdout (default), csv, json
                        For csv: please specify filename
                        For json: a directory out_json will be created
  --disable-stdout      Disable stdout
  -v, --version         Print current version

Output to file

When output to csv file, please specify the filename. For example, ip2vulns -i 1.1.1.1 -o 1.1.1.1.csv, the output file will be 1.1.1.1.csv.

When output to json file, a directory out_json will be created. Results will be stored using <ip>.json. For example, ip2vulns -i 1.1.1.1 -o json, then a directory out_json will be created. And the output filename will be 1.1.1.1.json.

To disable print to stdout, apply --disable-stdout in command line argument

Example

  • ip2vulns -i <ip address> <cidr>
  • ip2vulns -i <ip address> <cidr> -s 7
  • echo "<ip address>" | ip2vulns
  • echo "<ip address>" | ip2vulns -s 7
  • ip2vulns -i <input file>
  • cat <input file> | ip2vulns

When input is file, only the first element will be considered
TODO: add support for multiple files and with valid IPs or CIDR

Use ip2vulns in Python script

from ip2vulns import ip2vulns_scan

# s => success list
# f => failure list
s, f = ip2vulns_scan("[<ip address>]")  # ip address need to be passed in as a LIST

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ip2vulns-1.0.6.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

ip2vulns-1.0.6-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file ip2vulns-1.0.6.tar.gz.

File metadata

  • Download URL: ip2vulns-1.0.6.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.9

File hashes

Hashes for ip2vulns-1.0.6.tar.gz
Algorithm Hash digest
SHA256 f184fd770e507a4ac0a7791347b90d19beb609caee4816e0f7990a7bc7aa337e
MD5 66a2f1261866bcbb6f03ab34f8951789
BLAKE2b-256 a369a50a4f983cd383f04de83cad483d029d56014e93efbb55d9150fd5e1bacf

See more details on using hashes here.

File details

Details for the file ip2vulns-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: ip2vulns-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.9

File hashes

Hashes for ip2vulns-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 db7d68f563bd7c4c68cc50dca5eaf4a41b15a47db6b15c3df1f03ca354b2bb30
MD5 f8f0f76eacdcb307b560aecd09eb723b
BLAKE2b-256 65e7ac320d0ba2c5906970af1bd9aa837cf8a2802a1301163a806b614d6b0ce1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page