netkit

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2026 License: MIT

README

netkit

CI Go Report Card

A pragmatic Go toolkit for network operations — LAN discovery, OS fingerprinting, port scanning, and MAC vendor lookup.

Built for network engineers who prefer a single binary over a pile of Python scripts.

Features

Module Description
discovery ARP-based LAN device discovery
oui MAC address → vendor/manufacturer lookup
portscan Concurrent TCP port scanner
fingerprint OS detection via TCP/IP stack fingerprinting

Install

go install github.com/lybw/netkit/cmd/netkit@latest

Quick Start

# Discover devices on local network
netkit discover 192.168.1.0/24

# Scan ports on a target
netkit portscan 192.168.1.1 -p 22,80,443,8080

# Lookup MAC vendor
netkit oui 00:1A:2B:3C:4D:5E

# OS fingerprint (requires root/admin)
netkit fingerprint 192.168.1.1

As a Library

package main

import (
    "fmt"
    "github.com/lybw/netkit/pkg/discovery"
    "github.com/lybw/netkit/pkg/oui"
)

func main() {
    // Discover devices
    devices, _ := discovery.ARP("192.168.1.0/24")
    for _, d := range devices {
        vendor := oui.Lookup(d.MAC)
        fmt.Printf("%-16s %-18s %s\n", d.IP, d.MAC, vendor)
    }
}

Modules

discovery

ARP scan to find live hosts on a subnet. Returns IP + MAC pairs.

oui

Offline MAC-to-vendor lookup using the IEEE OUI database. Embedded via go:embed, no external files needed.

portscan

Concurrent TCP connect scanner with configurable timeout and worker count.

fingerprint

OS detection by analyzing TCP SYN-ACK responses (TTL, window size, options).

License

MIT

Directories

Path Synopsis
cmd
netkit command
pkg
discovery
Package discovery provides LAN device discovery via ARP scanning.
Package discovery provides LAN device discovery via ARP scanning.
fingerprint
Package fingerprint provides OS detection via TCP/IP stack analysis.
Package fingerprint provides OS detection via TCP/IP stack analysis.
oui
Package oui provides MAC address to vendor/manufacturer lookup using the IEEE OUI (Organizationally Unique Identifier) database.
Package oui provides MAC address to vendor/manufacturer lookup using the IEEE OUI (Organizationally Unique Identifier) database.
portscan
Package portscan provides a concurrent TCP port scanner.
Package portscan provides a concurrent TCP port scanner.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL