百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
H

havn

> DevOps
开源

一个快速的可配置端口扫描器,具有合理的默认值

317 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个快速的可配置端口扫描器,具有合理的默认值

havn

Description

havn - ˈheɪvən || "HAY" + "vuhn" - is a lightweight self-contained port scanning application written in Rust, using asynchronous Tokio multithreading to deliver fast and reliable results. With sensible defaults and configurable options, users are able customise the scanning process according to their needs. It is designed and built to be compatible with multiple platforms, including Docker, and has a binary size of less than 1mb.

Download & install

Cargo

Published on crates.io, so if you have cargo installed, simply run

bash
cargo install havn

Arch Linux

havn is available in the official repositories. You can install it using:

bash
pacman -S havn

Docker

Published on Docker Hub and ghcr.io, with images built for linux/amd64, linux/arm64, and linux/arm/v6

via ghcr.io

bash
docker run --rm -it ghcr.io/mrjackwills/havn:latest #[options]

via Docker Hub

bash
docker run --rm -it mrjackwills/havn:latest #[options]

❗Caution: To scan the Docker host itself, you must grant access by including the option:

bash
--network=host

X-CMD

If you're an x-cmd user, you can install it with the following command:

bash
x install havn

Pre-Built

See the pre-built binaries

or, download & install (x86_64 one liner)

bash
wget https://www.github.com/mrjackwills/havn/releases/latest/download/havn_linux_x86_64.tar.gz &&
tar xzvf havn_linux_x86_64.tar.gz havn &&
install -Dm 755 havn -t "${HOME}/.local/bin" &&
rm havn_linux_x86_64.tar.gz havn

or, for automatic platform selection, download, and installation (to $HOME/.local/bin)

One should always verify script content before running in a shell

bash
curl https://raw.githubusercontent.com/mrjackwills/havn/main/install.sh | bash

Run

bash
havn #[options]

Available command line arguments

argument result
[string] The address or IP to scan. [default: 127.0.0.1]
-a Scan every port, from 1 to 65535, conflicts with -p
-c [number] How many concurrent request should be made. [default: 1000]
-m Monochrome mode - won't colourize the output [default: false]
-p [number / string] Inclusive port range to scan, accepts either a range: -300, 101-200, or a single port 80, conflicts with -a [default: -1000]
-r [number] Retry attempts per port. [default: 1]
-t [number] Timeout for each request in milliseconds. [default: 2000]
-6 Scan the IPv6 address instead of IPv4, [default: false]
--verbose Display simple verbose information when scanning

Examples

…

Todo

  • debug option to display more verbose output
  • Scan UDP ports, currently only TCP
  • allow multiple addresses/IPs to be scanned
  • monitor response times to automatically modify request settings
  • configurable option to disable second-pass scan
  • improve windows performance
  • publish to npm

Tests

A number of tests will open port 80, this may cause issues if the port is already open on your system

bash
cargo test -- --test-threads=1

Build step

x86_64

bash
cargo build --release

Cross platform

Using Docker

requires Docker & cross-rs

64bit arm (pi 4, pi zero w 2)

bash
cross build --target aarch64-unknown-linux-musl --release

32bit pi (pi zero w)

bash
cross build --target arm-unknown-linux-musleabihf --release

Windows x86_64

bash
cross build --target x86_64-pc-windows-gnu --release

Without Docker

64bit arm (pi 4, pi zero w 2)

edit ~/.cargo/config

[target.aarch64-unknown-linux-musl]
linker = "rust-lld"
bash
rustup target add aarch64-unknown-linux-musl
cargo build --target aarch64-unknown-linux-musl --release

32bit pi (pi zero w)

edit ~/.cargo/config

[target.arm-unknown-linux-musleabihf]
linker = "arm-linux-gnueabihf-ld"
bash
sudo apt update && sudo apt install gcc-arm-linux-gnueabihf -y
rustup target add arm-unknown-linux-musleabihf
cargo build --target arm-unknown-linux-musleabihf --release

Windows (build on linux)

edit ~/.cargo/config

[target.x86_64-pc-windows-gnu]
linker = "x86_64-w64-mingw32-gcc"
ar = "x86_64-w64-mingw32-gcc-ar"
bash
sudo apt update && sudo apt install mingw-w64
rustup target add x86_64-pc-windows-gnu
cargo build --target x86_64-pc-windows-gnu --release

Untested on other platforms

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustasyncdockerportport-scanner

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类DevOps
定价开源

> 相关工具

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理