Giter Club home page Giter Club logo

shodan-hq-nse's Introduction

Introduction

This is an nmap nse script to query the Shodan API and passively get information about hosts.

Installation

Simple place the shodan-hq.nse script into your nmap scripts folder. e.g:

cp shodan-hq.nse /usr/local/share/nmap/scripts/

Usage

Invoke the script like so:

nmap --script shodan-hq.nse <target> --script-args 'apikey=<yourShodanAPIKey'

You can set your Shodan API key in the shodan-hq.nse file itself to save you having to type it in every time:

-- Set your Shodan API key here to avoid typing it in every time:
local apiKey = ""

Warning:

nmap will still scan the target host normally. If you only want to look up the target in Shodan you need to include the -sn -Pn -n flags. e.g:

nmap --script shodan-hq.nse -sn -Pn -n <target>

You could instead specify a single target with the target script argument. e.g:

nmap --script shodan-hq.nse --script-args 'apikey=<yourShodanAPIKey>,target=<hackme>'

Saving to file

The results can be written to file with the outfile script argument. e.g:

nmap --script shodan-hq.nse -sn -Pn -n <target> -sn -Pn -n --script-args 'outfile=potato.csv'

Example output

Here we do a passive scan of a whole /24 range, giving -sV type output in under 20 seconds:

asciicast

Help

nmap --script-help shodan-hq.nse

Contact

Say Hi via Twitter: @glennzw or email: [email protected]

shodan-hq-nse's People

Watchers

James Cloos avatar Hesh Fernando 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.