MCPcopy Index your code
hub / github.com/s0md3v/Smap

github.com/s0md3v/Smap @0.1.12 sqlite

repository ↗ · DeepWiki ↗ · release 0.1.12 ↗
54 symbols 123 edges 19 files 0 documented · 0%
README

Smap logo

passive Nmap like scanner built with shodan.io

Smap demo


Smap is a port scanner built with shodan.io's free API. 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 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

AUR pacakge

Smap is available on AUR as smap-git (builds from source) and smap-bin (pre-built binary).

Homebrew/Mac

Smap is also avaible on Homebrew.

brew update
brew install smap

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

smap 127.0.0.1 127.0.0.2

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

smap -iL targets.txt

Supported formats

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

smap example.com -oX output.xml

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

Supported formats

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 by default. If you want to display results for certain ports, use the -p option.

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

Considerations

Since Smap simply fetches existent port data from 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

Core symbols most depended-on inside this repo

Write
called by 19
internal/output/common.go
ConvertTime
called by 7
internal/output/common.go
OpenFile
called by 6
internal/output/common.go
GetCommand
called by 4
internal/output/common.go
pad
called by 4
internal/output/nmap.go
containsInt
called by 4
internal/core/correlate.go
isIPv4
called by 2
internal/core/manager.go
createScanObjects
called by 2
internal/core/manager.go

Shape

Function 45
Struct 7
Method 1
TypeAlias 1

Languages

Go100%

Modules by API surface

internal/core/manager.go13 symbols
internal/output/xml.go4 symbols
internal/output/nmap.go4 symbols
internal/output/common.go4 symbols
internal/global/types.go4 symbols
internal/output/smap.go3 symbols
internal/output/pair.go3 symbols
internal/output/json.go3 symbols
internal/output/grep.go3 symbols
internal/global/variables.go3 symbols
internal/core/correlate.go3 symbols
internal/util/util.go2 symbols

Dependencies from manifests, versioned

github.com/s0md3v/smapv0.0.0-2022041518030 · 1×
github.com/weppos/publicsuffix-gov0.15.0 · 1×
golang.org/x/netv0.0.0-2022022517224 · 1×
golang.org/x/textv0.3.7 · 1×

For agents

$ claude mcp add Smap \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact