GNU Affero General Public License v3.0

项目介绍

s0md3v/Smap 是一个托管在 GitHub 上的开源项目,主要使用 Go 编写,采用 GNU Affero General Public License v3.0 许可证,目前获得 3.3k 个 Star、323 次 Fork。

仓库全名
s0md3v/Smap
开源许可证
GNU Affero General Public License v3.0
Star 数
3.3k
Fork 数
323
未关闭 Issue
1

README 摘要

nmap alternative powered by shodan.io Smap is 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 makes it a drop-in replacement for Nmap. Features Scans 200 hosts per second Doesn't require any account/api key Vulnerability detection Supports nmap's output formats Service and version fingerprinting Makes no contact to the…

完整内容见 GitHub 原始 README 或本页 。

常见问题

Smap 用什么语言开发?

主要使用 Go 编写,采用 GNU Affero General Public License v3.0 许可证,目前有 3.3k 个 Star。

Smap 可以免费商用吗?

仓库标注的许可证为 GNU Affero General Public License v3.0,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 Smap 的源码?

可以直接克隆仓库:git clone https://github.com/s0md3v/Smap.git,默认分支为 main;安装与运行步骤见仓库 README。

Smap 最近还在维护吗?

仓库最近一次更新为 8月16日,当前有 1 个未关闭 Issue;Star 数为 3.3k,可作为社区活跃度的参考。

简要分析

热度分
3984
价值分
2086
活跃状态
活跃

语言占比

Go

Release

README

Smap logo
nmap alternative powered by shodan.io

Smap demo

Smap is 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 makes it a drop-in replacement for Nmap.

Features

  • Scans 200 hosts per second
  • Doesn’t require any account/api key
  • Vulnerability detection
  • Supports nmap’s output formats
  • Service and version fingerprinting
  • Makes no contact to the targets in passive mode
  • Optional nmap acceleration using Shodan’s reported ports

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 package

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

Homebrew/Mac

Smap is also available on Homebrew.

brew update
brew install smap

Usage

Smap takes the same arguments as Nmap, but options other than -p, -h, -V, -o*, -iL, --concurrency, and --append-output are ignored in passive mode. Use --nmap to pass Nmap options to a real Nmap scan after passive port discovery. 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, separated by newlines.

smap -iL targets.txt

Supported formats

1.1.1.1         // IPv4 address
example.com     // hostname
178.23.56.0/8   // CIDR
1.1.1.1-20      // IPv4 range

Output

Smap supports 7 output formats which can be used with -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 separated 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 ~4000 ports by default. If you want to display results for certain ports, use the -p option.

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

Nmap acceleration

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

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

Except for --nmap and --concurrency, the supplied arguments are passed to Nmap. Smap replaces the port range with the Shodan candidates; if you specify -p, it first limits the candidates to that range. Nmap handles the scan and output directly, so its options and output formats behave normally. Host-only operations such as -sL and -sn are passed through without passive port discovery.

Smap’s custom output formats are passive-mode features; with --nmap, output options have their normal Nmap meanings. If Shodan reports no candidate ports, Nmap is not run.

This can save time if passive data is good enough for your use case.

Controlling concurrency

Smap defaults to 3 workers to avoid hitting Shodan too aggressively. You can change that with --concurrency.

smap --concurrency 5 -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
  • 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
  • some rare unreliable software detection in passive mode

Note: if you use --nmap, Smap will run nmap against the target and make active connections. Because Shodan’s data can be stale or incomplete, using it as a port filter can miss open ports.

评论

暂无评论