Skip to content
samuelbaPublic

About

Hotaru (蛍, firefly) is a friendly network scanner for Linux.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Hotaru

Hotaru logo

CI Latest release License

Hotaru (蛍, firefly) is a friendly network scanner for Linux. Type a range or pick your network, press Scan, and the devices on it light up as they answer: their names, vendors, open ports and what runs behind them. More at samuelba.dev/hotaru.

Hotaru's window: networks, saved ranges and past scans on the left, the hosts of a home network in the middle with type icons, names, vendors, pings and open ports, and a NAS's details on the right

Install

curl -fsSL https://samuelba.dev/hotaru/install.sh | sh

The script installs Hotaru for your user, without sudo, to ~/.local/bin/hotaru, with its desktop entry and icons. Run it again to update. Uninstall with:

curl -fsSL https://samuelba.dev/hotaru/install.sh | sh -s -- --uninstall

When minisign or rsign is installed, the script checks the release's signature before installing anything.

Debian, Ubuntu and Fedora

Install the .deb or .rpm from the latest release. It adds Hotaru's apt or dnf repository, so your package manager keeps Hotaru up to date from then on. To add the repository without downloading a package first:

# Debian 12+, Ubuntu 22.04+
sudo install -d -m 0755 /etc/apt/keyrings
sudo curl -fsSLo /etc/apt/keyrings/hotaru.asc https://samuelba.github.io/hotaru/hotaru.asc
sudo curl -fsSLo /etc/apt/sources.list.d/hotaru.sources https://samuelba.github.io/hotaru/deb/hotaru.sources
sudo apt update && sudo apt install hotaru

# Fedora
sudo curl -fsSLo /etc/pki/rpm-gpg/RPM-GPG-KEY-hotaru https://samuelba.github.io/hotaru/hotaru.asc
sudo curl -fsSLo /etc/yum.repos.d/hotaru.repo https://samuelba.github.io/hotaru/rpm/hotaru.repo
sudo dnf install hotaru

The repositories' metadata and the .rpm files are signed with the key in packaging/repo/hotaru.asc. To stop updates from them, set Enabled: no in /etc/apt/sources.list.d/hotaru.sources or enabled=0 in /etc/yum.repos.d/hotaru.repo.

Pings

Hotaru needs no root. It pings over the unprivileged ICMP socket Linux offers to the groups in net.ipv4.ping_group_range, which Fedora and Arch open to everyone. Others, Ubuntu among them, leave it closed and give /usr/bin/ping a capability instead. Where pings are not allowed, Hotaru knocks on TCP and UDP ports and reads the ARP table instead, and says so. The .deb and .rpm give /usr/bin/hotaru the same capability as ping, CAP_NET_RAW. The window gives it up at once and pings through a small helper process that opens the ping sockets and then gives it up too. For the script install, allow pings with:

echo 'net.ipv4.ping_group_range = 0 2147483647' | sudo tee /etc/sysctl.d/60-ping-group.conf
sudo sysctl --system

Updates

Hotaru looks for a newer release when it starts and once a day while it runs. When one is out, a banner offers Update, which installs it in place after checking that the release is signed by the release key, then Restart. About Hotaru checks on request. Turn the daily check off in Settings. From a terminal, hotaru self-update does the same.

Installed from the .deb or .rpm, Hotaru leaves updates to apt or dnf, from the repository the package added: the banner offers the command to copy, such as sudo apt update && sudo apt upgrade.

What it finds

Who is there Pings and TCP and UDP knocks across addresses, ranges (10.0.0.1-50), subnets (192.168.1.0/24) and host names, many at once. A host that answers ARP but ignores both still shows up.
IPv6 IPv4 and IPv6 mix freely in the targets: 2001:db8::20, 2001:db8::1-2001:db8::ff, 2001:db8::/120, or a link-local address on an interface such as fe80::1%eth0. A /64 is far too large to sweep, so scanning a local network also asks all its IPv6 devices to answer at once, and joins their addresses to the device's row by its hardware address. Devices seen only over IPv6 get a row of their own.
Names Reverse DNS, mDNS/Bonjour (“Living Room TV”), UPnP descriptions and NetBIOS names.
Tailscale When Tailscale runs, the sidebar lists your tailnet's devices as one network, and each subnet route you accept as another. Devices are named as tailscaled knows them, even without MagicDNS.
Vendors and types The maker from the hardware address (IEEE registry, bundled), and a guess at what the device is: router, printer, NAS, TV, speaker, camera, phone, computer, smart home.
Ports Presets from Quick to 1–1024, or your own list such as 22,80,8000-8100, which you can name and keep in the port menu. Ports that do not answer at all are listed as filtered.
Services Web page titles and servers, TLS certificates (who issued them, when they expire), SSH versions and other greetings. Printers name their model and location over IPP, and cameras their server and model over RTSP. File shares give their SMB version, computer name and Windows version. Remote desktops say whether RDP requires NLA and which certificate it presents, and VNC lists the ways it lets clients in, with a warning when no password is needed.
What changed Each finished scan is kept. The next scan of the same targets marks devices that are New, Gone, Moved to another address, or whose Ports changed.
Compare scans Open a past scan, then press ⇄ on another scan of the same targets to see the newer one against the older, with the same badges. The details list the ports that opened and closed, and how the older scan saw a device that is gone, moved or new. Clear the history from the sidebar.

Select a host to see everything about it, including each IPv6 address with a word on what it is for (link-local, private or public). Give it a name of your own, open it in the browser, an SSH terminal, the file manager (SMB) or a remote desktop client, copy its address, send it a Wake-on-LAN packet, or watch a live ping. Settings adds commands of your own, such as remmina -c rdp://{ip}.

Export writes the rows in view as CSV, JSON, text or an ip:port list, with each device's IPv6 addresses.

Keys

Key Does
F5, Enter in the target line Scan
Esc Stop the scan, close a dialog or the details
↑ ↓ Pick the previous or next host
Ctrl+L Edit the targets
Ctrl+F Search
Ctrl+C Copy the selected address
Ctrl+E Export as CSV
Ctrl+, Settings

The command line

hotaru scan                                  # this machine's network
hotaru scan 192.168.1.0/24 -p web -f json    # web ports, as JSON
hotaru scan 2001:db8::/120 fe80::1%eth0      # IPv6 addresses and subnets
hotaru scan Office --all -f csv -o office.csv
hotaru ranges add Office 10.20.0.0/22
hotaru networks                              # including the tailnet and its routes
hotaru wake aa:bb:cc:dd:ee:ff

hotaru scan --help lists every option. Progress goes to standard error, results to standard output.

Only scan networks you own or are allowed to scan.

Build from source

Install Rust (the stable toolchain) and the development files for xkbcommon and Wayland (libxkbcommon-devel wayland-devel on Fedora, libxkbcommon-dev libwayland-dev on Debian and Ubuntu), then:

cargo build --release
./target/release/hotaru
Crate What it holds
hotaru The window (iced), the command line, settings and desktop integration
hotaru-scan The scan engine: targets, pings, ports, names, discovery, services, export and history
hotaru-ui Design tokens and controls
hotaru-update Release checks and signed self-updates

cargo test --workspace runs the tests. HOTARU_PREVIEW=<folder> cargo test -p hotaru preview also writes pictures of the window, drawn without a display, to that folder.

License

MIT, see LICENSE. The icons in assets/icons are from Lucide (ISC). Vendor names come from the IEEE registration authority's public registry.

About

Hotaru (蛍, firefly) is a friendly network scanner for Linux.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages