MCPcopy Index your code
hub / github.com/CramBL/mdns-scanner

github.com/CramBL/mdns-scanner @v0.27.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.27.4 ↗ · + Follow
882 symbols 2,416 edges 85 files 144 documented · 16%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Table of Contents↗️

MDNS Scanner mdns-scanner

<a href="https://github.com/CramBL/mdns-scanner/releases" title="Latest Stable GitHub Release">
  <img src="https://img.shields.io/github/release/CramBL/mdns-scanner/all.svg?style=flat&logo=github&logoColor=white&color=blue&label=Latest%20Release" alt="GitHub release">
</a>
<a href=https://github.com/CramBL/mdns-scanner/actions>
<img src=https://github.com/CramBL/mdns-scanner/actions/workflows/CI.yml/badge.svg alt="CI status">

codecov

<img src="https://img.shields.io/badge/-Linux-9C2A91.svg?style=flat&logo=linux&logoColor=white" alt="Linux" title="Supported Platform: Linux">&thinsp;
<img src="https://img.shields.io/badge/-macOS-red.svg?style=flat&logo=apple&logoColor=white" alt="macOS" title="Supported Platform: macOS">
<img src="https://img.shields.io/badge/-Windows-6E46A2.svg?style=flat&logo=windows-11&logoColor=white" alt="Windows" title="Supported Platform: Windows">&thinsp;

Purpose

Scan a network and create a list of IPs and associated hostnames, including DNS-SD service instances, mDNS hostnames and other aliases.

Demo

demo

Install

[!NOTE] Windows has a runtime dependency on the Npcap packet capture library

📥 Prebuilt binaries

Prebuilt binaries for Linux, MacOS, and Windows can be found on the releases page.

Install the latest version with the standalone installer:

# On 🍎 macOS and 🐧 Linux.
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/CramBL/mdns-scanner/releases/latest/download/mdns-scanner-installer.sh | sh
# On 🖥️ Windows.
powershell -ExecutionPolicy Bypass -c "irm https://github.com/CramBL/mdns-scanner/releases/latest/download/mdns-scanner-installer.ps1 | iex"

If installed via the standalone installer, mdns-scanner can update itself to the latest version:

mdns-scanner update

With homebrew

brew install CramBL/tap/mdns-scanner

With cargo

mdns-scanner is available via Cargo, but must be built from Git rather than crates.io due to its dependency on unpublished crates.

cargo install --git https://github.com/CramBL/mdns-scanner mdns-scanner

Quickstart

Simply run it.

mdns-scanner will start scanning any non-loopback network interfaces for IPs with a host on the other end, and resolve the hostnames for those IPs.

[!TIP] Inform your resident sys admin that you're about to run hundreds of IP scans per second.

Configuration

... or dump the default configuration file to stdout, or add the -o/--output option to write it to a file.

mdns-scanner dump-default-config [--output <FILE>]
mdns-scanner dump-default-keymap [--output <FILE>]

The config and keymap can be placed in the user config directory, dump the config or see the default_config.toml for where that is for your system.

The command-line arguments take precedence over configuration files, after looking for mdns-scanner.toml in the user config directory, any command-line arguments are applied to the final configuration.

Keybindings

Default keybindings are defined in the default keymap. You can override these defaults by creating a keymap.toml file in your user config directory.

You can check your keymap.toml file with

mdns-scanner check-keymap [--file <FILE>]

if no path is specified, the default location in the user config directory is checked.

[!IMPORTANT] When you define a custom keybinding for an action, the default keybinding for that action is automatically disabled. For example, if you bind ctrl-q to the quit action, the default q binding will no longer work.

To preserve multiple keybindings for the same action, you must explicitly define each one:

"<q>"      = "quit"
"<ctrl-q>" = "quit"

Extension points exported contracts — how you extend this code

UdpSocketSender (Interface)
(no doc) [2 implementers]
crates/mds-dns-sd/src/discover.rs

Core symbols most depended-on inside this repo

push
called by 104
crates/mds-log/src/db.rs
run
called by 77
tests/common/mod.rs
clone
called by 51
crates/mds-log/src/logger.rs
len
called by 48
crates/mds-log/src/db.rs
insert
called by 42
crates/mds-ipinfo/src/db.rs
draw
called by 28
tests/common/mod.rs
create_test_ip_info
called by 27
crates/mds-ipinfo/src/db.rs
next
called by 26
crates/mds-tui/src/table_pane/clipboard.rs

Shape

Method 513
Function 290
Class 55
Enum 23
Interface 1

Languages

Rust100%

Modules by API surface

crates/mds-ipinfo/src/lib.rs50 symbols
crates/mds-tui/src/model.rs42 symbols
crates/mds-ipinfo/src/ip.rs42 symbols
crates/mds-tui/src/table_pane.rs41 symbols
crates/mds-tui/src/table_pane/colors.rs40 symbols
crates/mds-ipinfo/src/db.rs34 symbols
crates/mds-tui/src/config_window/selected_tab.rs31 symbols
crates/mds-keybindings/src/lib.rs31 symbols
crates/mds-tui/src/table_pane/clipboard.rs29 symbols
crates/mds-dns-sd/src/service_registry.rs27 symbols
crates/mds-tui/src/log_pane.rs20 symbols
crates/mds-dns-sd/src/bivec.rs19 symbols

For agents

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

⬇ download graph artifact