Git Product home page Git Product logo

shodanidb's Introduction

shodanIDB

A command-line tool to fetch data (open ports, CVEs, CPEs, ...) from Shodan internetDB API. Free to use and no API key required.

Installation

go install -v github.com/s4hm4d/shodanidb@latest

Usage

echo <ip> | shodanidb [options]


Options:
  -nc           Hide CPEs
  -nh           Hide hostnames
  -nt           Hide tags
  -nv           Hide vulnerabilities
  -nocolor      Disable color in output
  -json         Save output to JSON format
  -compare      Compare new results with a JSON file
  -url          Show only IP and Port
  -v            Verbose mode
  -c            Concurrency (default 5)
  -nmap         Run Nmap Service Detection
  -script       Run Nmap Scripts


# Simple Usage:
echo 149.202.182.140 | shodanidb

# CIDR Input:
echo 149.202.182.140/24 | shodanidb

# Use Filters (Hide CPEs, Hostnames and Tags):
echo 149.202.182.140 | shodanidb -nc -nh -nt

# Show Only IP and Ports:
echo 149.202.182.140/24 | shodanidb -url

# Save Output to a JSON File:
cat ips.txt | shodanidb -json output.json

# Show New Results by Comparing With The Old JSON File:
cat ips.txt | shodanidb -compare output.json

Compare

Before using this switch, you need save the output to a JSON file first:

echo 149.202.182.140 | shodanidb -json output.json

Then you can get the new resutls by comparing with the JSON file:

echo 149.202.182.140 | shodanidb -compare output.json

It can be used with the other switches:

echo 149.202.182.140 | shodanidb -nmap -compare output.json
echo 149.202.182.140 | shodanidb -url -compare output.json
echo 149.202.182.140 | shodanidb -url -nmap -compare output.json
echo 149.202.182.140 | shodanidb -url -nmap -script -compare output.json

Nmap

To run this switch you need to have nmap installed.

It uses the nmap service detection with this command for every IP address:

nmap -sV -Pn IP -p Ports

It can be used with the other switches:

echo 149.202.182.140 | shodanidb -nmap
echo 149.202.182.140 | shodanidb -url -nmap
echo 149.202.182.140 | shodanidb -nmap -compare output.json

Also it can be used with -script switch. It's equals to -sC in the nmap and run the nmap scripts.

echo 149.202.182.140 | shodanidb -nmap -script

url

This switch show the results as the ip:port format.

echo 149.202.182.140 | shodanidb -url
echo 149.202.182.140 | shodanidb -url -compare output.json

Credit

The original tool is nrich. I wanted to learn Go and write this tool with Go for practice.

Also the idea for -url switch was gotten from sdlookup.

shodanidb's People

Contributors

s4hm4d 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.