# Smap | A Drop-In Replacement For Nmap Powered By Shodan.Io

**URL:** <https://onehack.st/t/smap-a-drop-in-replacement-for-nmap-powered-by-shodan-io/219335>\
**Category:** Tools & Scripts\
**Tags:** tools, programming, documents\
**Created:** [April 20, 2022, 11:39am UTC](https://onehack.st/t/smap-a-drop-in-replacement-for-nmap-powered-by-shodan-io/219335 "2022-04-20T11:39:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prometheus](https://onehack.st/user_avatar/onehack.st/prometheus/32/34950_2.png) [@Prometheus](https://onehack.st/u/Prometheus)\
**Post date:** [April 20, 2022, 11:39am UTC](https://onehack.st/t/smap-a-drop-in-replacement-for-nmap-powered-by-shodan-io/219335/1 "2022-04-20T11:39:10Z")

</div>

![image](https://onehack.st/uploads/default/original/3X/6/a/6afde7fdf4fe6e41006595ab3aed6a7812d4d6ec.png)

# 

[![Smap logo](https://github.com/s0md3v/Smap/raw/main/static/smap-logo.png)](https://github.com/s0md3v/smap)

#### passive Nmap like scanner built with [shodan.io](http://shodan.io)

[![](https://camo.githubusercontent.com/9139b7480f899237e65369887819f58617d03fdd57ae44d0b48f93df15d83738/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f73306d6433762f536d61702e7376673f6c6162656c3d76657273696f6e) ](https://github.com/s0md3v/Smap/releases)[![](https://camo.githubusercontent.com/b34c1ae1469f7e38e52c32624b03dd49066e5cbba960997825712e0660b9442f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f73306d6433762f536d61702f746f74616c) ](https://github.com/s0md3v/Smap/releases)[![](https://camo.githubusercontent.com/f84ab3b6a1fbb9cfa4b60eb18255daaa6c7f98a478a1b064351dbb752a5dbdc0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d636c6f7365642d7261772f73306d6433762f536d61703f636f6c6f723d6461726b2d677265656e266c6162656c3d6973737565732532306669786564) ](https://github.com/s0md3v/SMap/issues?q=is%3Aissue+is%3Aclosed)[![](https://camo.githubusercontent.com/a8acdcbf618a954a8d451403a630bbce16a37238543cf9a00d63197016def24f/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f73306d6433762f536d61702e7376673f636f6c6f723d6461726b2d677265656e266c6162656c3d7465737473)](https://travis-ci.com/s0md3v/Smap)

[![Smap demo](https://github.com/s0md3v/Smap/raw/main/static/smap-demo.png)](https://github.com/s0md3v/Smap/blob/main/static/smap-demo.png)

Smap is a replica of Nmap which uses [shodan.io](http://shodan.io)’s free API for port scanning. It takes same command line arguments as Nmap and produces the same output which makes it a drop-in replacament for Nmap.

## Features

- Scans 200 hosts per second
- Doesn’t require any account/api key
- Vulnerability detection
- Supports all nmap’s output formats
- Service and version fingerprinting
- Makes no contact to the targets

## Installation

### Binaries

You can download a pre-built binary from [here](https://github.com/s0md3v/Smap/releases) and use it right away.

### Manual

`go install -v github.com/s0md3v/smap/cmd/smap@latest`

Confused or something not working? For more detailed instructions, [click here](https://github.com/s0md3v/Smap/wiki/FAQ#how-do-i-install-smap)

### AUR pacakge

Smap is available on AUR as [smap-git](https://aur.archlinux.org/packages/smap-git) (builds from source) and [smap-bin](https://aur.archlinux.org/packages/smap-bin) (pre-built binary).

## Usage

Smap takes the same arguments as Nmap but options other than `-p`, `-h`, `-o*`, `-iL` are ignored. If you are unfamiliar with Nmap, here’s how to use Smap.

### Specifying targets

```auto
smap 127.0.0.1 127.0.0.2

```

You can also use a list of targets, seperated by newlines.

```auto
smap -iL targets.txt

```

**Supported formats**

```auto
1.1.1.1 // IPv4 address
example.com // hostname
178.23.56.0/8 // CIDR

```

### Output

Smap supports 6 output formats which can be used with the `-o* `as follows

```auto
smap example.com -oX output.xml

```

If you want to print the output to terminal, use hyphen (`-`) as filename.

**Supported formats**

```auto
oX // nmap's xml format
oG // nmap's greppable format
oN // nmap's default format
oA // output in all 3 formats above at once
oP // IP:PORT pairs seperated by newlines
oS // custom smap format
oJ // json

```

> Note: Since Nmap doesn’t scan/display vulnerabilities and tags, that data is not available in nmap’s formats. Use `-oS` to view that info.

### Specifying ports

Smap scans these [1237 ports](https://gist.githubusercontent.com/s0md3v/3e953e8e15afebc1879a2245e74fc90f/raw/1e20288e9bef43b60f7306b6f7e23044dabd9b8c/shodan_ports.txt) by default. If you want to display results for certain ports, use the `-p` option.

```auto
smap -p21-30,80,443 -iL targets.txt

```

## Considerations

Since Smap simply fetches existent port data from [shodan.io](http://shodan.io), it is super fast but there’s more to it. You should use Smap if:

#### You want

- vulnerability detection
- a super fast port scanner
- results for most common ports (top 1237)
- no connections to be made to the targets

#### You are okay with

- not being able to scan IPv6 addresses
- results being up to 7 days old
- a few false negatives

## GitHub:

> **[GitHub - s0md3v/Smap: a drop-in replacement for Nmap powered by...](https://github.com/s0md3v/Smap)**
>
> a drop-in replacement for Nmap powered by shodan.io
