CLI tool
s0md3v/Smap avatar
s0md3v/Smap

Smap answers Nmap commands from Shodan's stored data, so results can be seven days old

a drop-in replacement for Nmap powered by shodan.io

3,312 stars323 forksGoAGPL-3.0

At a glance

What is it?
s0md3v/Smap is a Go command-line port scanner that reads Shodan's free API instead of probing targets. It accepts Nmap's arguments and output formats, which makes it fast and quiet, and also IPv4-only and only as fresh as Shodan's last crawl.
Who is it for?
Use Smap for a first look at an IPv4 address range when you want ports, versions and vulnerability tags without sending a packet to the targets, and when data up to seven days old is acceptable. Do not use it for IPv6, for fresh results or as the last word on what is open.
Can I use it commercially?
Yes, with strict conditions. AGPL-3.0 is a network copyleft licence: if people use a modified version over a network, for example as a hosted service, you must offer them its source code under the same licence.
Is it still maintained?
Yes. The repository last received commits 86 days ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 9, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • s0md3v/Smap3,312 ★ · +10
Star history
Repository2026-10-082026-11-09
s0md3v/Smap3.3k3.3k

10 Stars in the last 32 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Smap never touches the target because it asks Shodan what it already knows

Smap is described as a passive port scanner built with shodan.io's free API. It takes the same command line arguments as Nmap and produces the same output, which is why the README calls it a drop-in replacement. In passive mode it makes no contact with the targets. Every answer is data Shodan already collected.

The feature list claims 200 hosts scanned per second, no requirement for an account or API key, vulnerability detection, support for Nmap's output formats, service and version fingerprinting, and optional Nmap acceleration using the ports Shodan reports. The 200 hosts per second figure is the README's own claim, and it follows from the design: a lookup is much quicker than a connection attempt.

The code is Go under the AGPL-3.0 license, and go.mod asks for Go 1.25.0 with one direct dependency, publicsuffix-go v0.50.3. The repository has cmd/ and internal/ directories and a .goreleaser.yml for releases. Because it only reads existing records, a host Shodan has never seen returns nothing, and that result does not mean the host has no open ports.

Four install routes: binaries, go install, AUR and Homebrew

A pre-built binary comes from the releases page and works right away. For a manual install the README gives one command:

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

It links a wiki FAQ entry for anyone confused or stuck. Arch users have two AUR packages: smap-git builds from source and smap-bin installs a pre-built binary. On macOS, Homebrew carries a formula:

code
brew update
brew install smap

The go install route needs a Go toolchain recent enough for go.mod, which declares 1.25.0, so an older Go install fails to build it. The release history shows where the project is. v1.0.0-beta was published on 2026-08-15, 0.2.0-rc on 2026-04-13, and 0.1.12 on 2022-11-13. The newest tag is a beta, and the last full-looking release before the recent ones is from 2022. The last push was on 2026-08-15.

In passive mode only seven options do anything, and the rest are silently ignored

Smap takes Nmap's arguments, but in passive mode every option other than -p, -h, -V, the -o options, -iL, --concurrency and --append-output is ignored. A scan type flag such as -sV or a timing template you type out of Nmap habit changes nothing, and the README does not say Smap warns about it.

Targets are given directly, for example `smap 127.0.0.1 127.0.0.2`, or from a newline-separated file with `smap -iL targets.txt`. Four target formats are supported: an IPv4 address such as 1.1.1.1, a hostname such as example.com, a CIDR such as 178.23.56.0/8, and an IPv4 range such as 1.1.1.1-20.

Ports default to roughly 4000, the list at api.shodan.io/shodan/ports. To display only certain ports use -p, as in `smap -p21-30,80,443 -iL targets.txt`. The flag filters results rather than probing those ports. A port outside Shodan's list can never appear in a passive result, whichever range you ask for.

Seven output flags exist, but Nmap's formats cannot carry vulnerabilities or tags

Output uses the -o options, for example `smap example.com -oX output.xml`. A hyphen as the filename prints to the terminal. The seven formats are oX for Nmap's XML, oG for greppable, oN for the default Nmap format, oA for all three at once, oP for IP:PORT pairs separated by newlines, oS for a custom Smap format and oJ for JSON.

The README adds a caveat that matters for the vulnerability feature. Nmap does not scan or display vulnerabilities and tags, so that data is not available in Nmap's formats. To see it, use -oS. A pipeline built around oX or oG therefore drops the vulnerability findings, which are one of the reasons to use Smap in the first place.

If you feed results into another tool, oP is the simplest hand-off, with one IP:PORT pair per line. For anything that needs the vulnerability and tag data, oS is the documented route, and oJ is the machine-readable one. The --append-output option, listed among the options that survive passive mode, appends to an existing file, though the README gives no further detail.

The --nmap flag turns a passive lookup into a real scan against a narrowed port list

Adding --nmap narrows a scan with your local nmap. Smap first collects the union of ports reported by Shodan, then runs Nmap once against the original targets with that smaller port range.

code
smap --nmap -Pn -sV --version-light 1.1.1.1

Except for --nmap and --concurrency, the supplied arguments go to Nmap. Smap replaces the port range with the Shodan candidates, and if you specify -p it first limits the candidates to that range. Nmap handles the scan and output, so its options and formats behave normally and Smap's custom formats do not apply. Host-only operations such as -sL and -sn pass through without passive discovery. If Shodan reports no candidate ports, Nmap is not run.

The cost is stated in the README's closing note. With --nmap, Smap runs nmap against the target and makes active connections, so the no-contact property is gone. Because Shodan's data can be stale or incomplete, using it as a port filter can miss open ports. The saving in time is real, and so is the blind spot.

Default concurrency is three workers, which keeps Shodan's free API from being hammered

Smap defaults to 3 workers to avoid hitting Shodan too aggressively. You raise that with --concurrency, as in `smap --concurrency 5 -iL targets.txt`. The option is one of the few that survive passive mode and is also excluded from the arguments passed through to Nmap.

There is tension between this default and the 200 hosts per second claim. The README states both without reconciling them, and gives no table of throughput at different worker counts. Treat the 200 figure as a best case and measure your own list.

The free API with no account is the draw, and the README does not say what limits Shodan applies to it. If a large CIDR list starts failing, the first things to check are the worker count and whether the API is throttling you. No retry or backoff behavior is documented in the retrieved text.

No IPv6, results up to seven days old, and some unreliable software detection

The Considerations section sets out who should use Smap. You should want vulnerability detection, a very fast port scanner and no connections made to the targets. You should be okay with three things: not being able to scan IPv6 addresses, results being up to 7 days old, and some rare unreliable software detection in passive mode.

Each has a concrete consequence. An IPv6-only host cannot be checked at all, and the supported target formats are all IPv4 or hostnames. A service that opened or closed within the last week will show its old state. A version string from passive mode can be wrong, so a vulnerability tag built on it deserves a second check.

Smap sits next to Nmap and does not replace it for authoritative results. Searches around this project mention RustScan and Naabu as neighbours, but the README makes no comparison with either, so the choice between them rests on the points above.

Editorial conclusion

Use Smap for a first look at an IPv4 address range when you want ports, versions and vulnerability tags without sending a packet to the targets, and when data up to seven days old is acceptable. Do not use it for IPv6, for fresh results or as the last word on what is open. Before relying on it, decide whether you can accept missed ports, and know that adding --nmap makes real connections to the targets.

Frequently asked questions

Does Smap send packets to the hosts it scans?

Not in passive mode. Smap reads port data from Shodan's free API and makes no contact with the targets. With the --nmap option it runs a real Nmap scan and makes active connections.

Can Smap scan IPv6 addresses?

No. The README lists not being able to scan IPv6 addresses as a trade-off. Supported targets are IPv4 addresses, hostnames, CIDR ranges and IPv4 ranges.

How current is the data Smap returns?

Results can be up to 7 days old, because Smap fetches existing port data from shodan.io. The README adds that Shodan's data can be stale or incomplete, so it can miss open ports.

Official sources

  1. Issues
  2. License: AGPL-3.0
  3. README
  4. Releases
  5. s0md3v/Smap on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/s0md3v-smap.svg)](https://hysenlabs.com/projects/s0md3v-smap)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/s0md3v-smap.svg)](https://hysenlabs.com/projects/s0md3v-smap)

Was this useful?