Release v1.2.0: hostname resolution, hardware vendor lookup, and CLI UX improvements - #49
Merged
Merged
Conversation
Criseda
force-pushed
the
feat/hostname-vendor-lookup
branch
4 times, most recently
from
September 18, 2026 20:21
fbb9cab to
dcf4f9c
Compare
…nd CLI UX improvements
Implements zero-privilege, cross-platform hostname resolution, hardware
manufacturer identification, parallel ARP fallback verification, and
improved CLI UX for subnet discovery (ns -s), achieving feature parity
with Advanced IP Scanner across Windows, Linux, and macOS without requiring
root privileges. Bumps package and documentation to v1.2.0.
Key additions & architectural highlights:
- Embedded OUI database (src/core/oui.zig): 1,969 curated IEEE OUI
prefixes parsed at compile time from standard Wireshark manuf flat format
and baked into .rodata for sub-microsecond binary search lookups (< 50ns per host).
Allows loading external Wireshark manuf and IEEE flat files via
--oui-file <path> with colon/hyphen normalization and safe reload management.
- Multi-protocol hostname resolution (src/c/resolver.c, src/core/resolver.zig):
* RFC 6762 mDNS (UDP 5353) unicast reverse PTR with compression label
handling and cyclic pointer bounds checking.
* RFC 1002 NetBIOS NBSTAT (UDP 137) with source IP verification.
* Terminal escape sequence filtering for untrusted network hostnames.
* Standard Reverse DNS PTR via getnameinfo(NI_NAMEREQD).
* Automated domain cleaning, suffix stripping, and IP-echo filtering.
- Ping-blocking host discovery (src/core/scanner.zig, src/core/utils.zig):
* Windows: Parallel SendARP worker pool catches firewalled IoT devices
and smart plugs in milliseconds without stalling discovery sweeps.
* Linux: Kernel neighbor reachability evaluation (REACHABLE/DELAY states)
via ip neigh for immediate confirmation.
- CLI flags & formatting (src/core/utils.zig, src/core/main.zig):
* Flags: --resolve, --hostname, --vendor, and --oui-file <path>.
* Shorthands: -h and -v alongside --help and --version.
* Redesigned, categorized --help output with clear usage examples.
* Aligned tabular output (IP, HOSTNAME, MAC, MANUFACTURER) when resolution
is active; backward-compatible numeric recap when omitted.
- Version bump: build.zig.zon, CHANGELOG.md, README.md, docs/README.md, utils.zig.
- Verified: All 40 automated unit and integration tests pass; all 5 release
targets build cleanly.
Criseda
force-pushed
the
feat/hostname-vendor-lookup
branch
from
September 18, 2026 20:24
dcf4f9c to
aa745f8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Release v1.2.0: Adds zero-privilege, cross-platform hostname resolution, hardware manufacturer identification, parallel ARP fallback verification, and refined CLI UX to NetScanner (
ns -s), achieving full feature parity with tools like Advanced IP Scanner across Windows, Linux, and macOS without requiring root privileges.Key Changes
Embedded OUI Database (
src/core/oui.zig):manufflat format (src/core/data/manuf.txt) and sorted in.rodatafor sub-microsecond binary search lookups (--oui-file <path>to dynamically load full external Wiresharkmanufor IEEE flat files without code changes, handling colon (:) and hyphen (-) delimiters, single- or double-digit hex octets, and safe memory lifecycle management on reloads.Multi-Protocol Hostname Resolution (
src/c/resolver.c,src/core/resolver.zig):getnameinfo(..., NI_NAMEREQD)with domain suffix stripping (.local,.lan, ISP suffixes) and IP-echo filtering (ignoring PTR records that merely echo numeric IP addresses or.in-addr.arpa).c >= 32 && c <= 126) on NetBIOS and mDNS hostnames to prevent malicious LAN devices from injecting ANSI terminal escape sequences.Ping-Blocking Host Discovery (
src/core/scanner.zig,src/core/utils.zig):SendARPworker pool, discovering hardened IoT devices and repeaters (GL.iNet, TP-Link, smart plugs) in milliseconds without stalling discovery sweeps.REACHABLEandDELAYstates) viaip neighconfirms live hosts immediately.CLI Flags & Redesigned Usage Output (
src/core/utils.zig,src/core/main.zig):--resolve(hostnames + vendors),--hostname,--vendor, and--oui-file <path>.IP,HOSTNAME,MAC,MANUFACTURER) when resolution flags are used, while preserving the clean numerical recap when omitted.--helplayout with categorized sections (COMMANDS,SUBNET OPTIONS,PORT OPTIONS,GLOBAL FLAGS,EXAMPLES).-hand-vshorthands alongside--helpand--version.Version Bump to v1.2.0:
build.zig.zon,CHANGELOG.md,README.md,docs/README.md, andsrc/core/utils.zig.Verification
ns -s 192.168.0.1/24 --resolve): 10/10 live hosts matched Advanced IP Scanner with exact hostnames and manufacturers in 6.8s.zig build test --summary all).zig build release -Doptimize=ReleaseFast).