demo

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package demo provides fake network data for demo recordings.

Index

Constants

This section is empty.

Variables

View Source
var Hosts = []Host{
	{
		IP: "192.168.1.1", Hardware: "f0:9f:c2:1a:22:01",
		Ports: []Port{
			{22, "SSH-2.0-OpenSSH_8.4"},
			{80, "UniFi OS 3.2.12"},
			{443, ""},
		},
	},
	{
		IP: "192.168.1.50", Hardware: "48:b0:2d:5e:a3:10",
		Ports: []Port{
			{22, "SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.6"},
			{5432, ""},
		},
	},
	{
		IP: "192.168.1.75", Hardware: "9c:b7:0d:0a:3f:12",
		Ports: []Port{
			{22, "SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.11"},
		},
	},
	{
		IP: "192.168.1.100", Hardware: "f0:ee:7a:ab:cd:ef",
		Ports: []Port{
			{80, "Apache/2.4.56"},
			{443, ""},
			{8080, "Jetty 11.0.15"},
		},
	},
	{
		IP: "10.0.0.42", Hardware: "d8:3a:dd:11:22:33",
		Ports: []Port{
			{22, "SSH-2.0-OpenSSH_9.2p1 Debian-2+deb12u2"},
			{80, "lighttpd/1.4.69"},
			{1883, ""},
		},
	},
}

Hosts defines fake hosts with real MAC addresses so demo uses the OUI lookup.

View Source
var WiFiHosts = []Host{
	{IP: "10.0.0.2", Hardware: "3c:52:82:10:20:30", Ports: []Port{{22, "SSH-2.0-OpenSSH_9.2"}, {80, "nginx"}, {443, ""}, {3000, "Grafana"}, {9090, "Prometheus"}}},
	{IP: "10.0.0.3", Hardware: "dc:a6:32:11:22:31", Ports: []Port{{22, "SSH-2.0-dropbear"}, {80, "GoAhead-Webs"}, {443, ""}, {554, "RTSP/1.0"}, {8000, "DVR HTTP"}}},
	{IP: "10.0.0.4", Hardware: "f4:f2:6d:12:23:32", Ports: []Port{{22, "SSH-2.0-OpenSSH_8.8"}, {80, "Apache/2.4.57"}, {443, ""}, {8080, "Tomcat/10.1"}}},
	{IP: "10.0.0.5", Hardware: "70:ee:50:13:24:33", Ports: []Port{{53, "dnsmasq 2.89"}, {67, ""}, {80, "OpenWrt uhttpd"}, {443, ""}, {1900, ""}}},
	{IP: "10.0.0.6", Hardware: "b8:27:eb:14:25:34", Ports: []Port{{22, "SSH-2.0-OpenSSH_9.0"}, {80, "Home Assistant"}, {443, ""}, {1883, "MQTT"}, {8123, "Home Assistant API"}}},

	{IP: "10.0.0.7", Hardware: "3c:52:82:10:20:30", Ports: []Port{{22, "SSH-2.0-OpenSSH_9.2"}, {80, "nginx"}, {443, ""}, {3000, "Grafana"}, {9090, "Prometheus"}}},
	{IP: "10.0.0.8", Hardware: "dc:a6:32:11:22:31", Ports: []Port{{22, "SSH-2.0-dropbear"}, {80, "GoAhead-Webs"}, {443, ""}, {554, "RTSP/1.0"}, {8000, "DVR HTTP"}}},
	{IP: "10.0.0.9", Hardware: "f4:f2:6d:12:23:32", Ports: []Port{{22, "SSH-2.0-OpenSSH_8.8"}, {80, "Apache/2.4.57"}, {443, ""}, {8080, "Tomcat/10.1"}}},
	{IP: "10.0.0.10", Hardware: "70:ee:50:13:24:33", Ports: []Port{{53, "dnsmasq 2.89"}, {67, ""}, {80, "OpenWrt uhttpd"}, {443, ""}, {1900, ""}}},
	{IP: "10.0.0.11", Hardware: "b8:27:eb:14:25:34", Ports: []Port{{22, "SSH-2.0-OpenSSH_9.0"}, {80, "Home Assistant"}, {443, ""}, {1883, "MQTT"}, {8123, "Home Assistant API"}}},

	{IP: "10.0.0.12", Hardware: "3c:52:82:10:20:30", Ports: []Port{{22, "SSH-2.0-OpenSSH_9.2"}, {80, "nginx"}, {443, ""}, {3000, "Grafana"}, {9090, "Prometheus"}}},
	{IP: "10.0.0.13", Hardware: "dc:a6:32:11:22:31", Ports: []Port{{22, "SSH-2.0-dropbear"}, {80, "GoAhead-Webs"}, {443, ""}, {554, "RTSP/1.0"}, {8000, "DVR HTTP"}}},
	{IP: "10.0.0.14", Hardware: "f4:f2:6d:12:23:32", Ports: []Port{{22, "SSH-2.0-OpenSSH_8.8"}, {80, "Apache/2.4.57"}, {443, ""}, {8080, "Tomcat/10.1"}}},
	{IP: "10.0.0.15", Hardware: "70:ee:50:13:24:33", Ports: []Port{{53, "dnsmasq 2.89"}, {67, ""}, {80, "OpenWrt uhttpd"}, {443, ""}, {1900, ""}}},
	{IP: "10.0.0.16", Hardware: "b8:27:eb:14:25:34", Ports: []Port{{22, "SSH-2.0-OpenSSH_9.0"}, {80, "Home Assistant"}, {443, ""}, {1883, "MQTT"}, {8123, "Home Assistant API"}}},

	{IP: "10.0.0.17", Hardware: "3c:52:82:10:20:30", Ports: []Port{{22, "SSH-2.0-OpenSSH_9.2"}, {80, "nginx"}, {443, ""}, {3000, "Grafana"}, {9090, "Prometheus"}}},
	{IP: "10.0.0.18", Hardware: "dc:a6:32:11:22:31", Ports: []Port{{22, "SSH-2.0-dropbear"}, {80, "GoAhead-Webs"}, {443, ""}, {554, "RTSP/1.0"}, {8000, "DVR HTTP"}}},
	{IP: "10.0.0.19", Hardware: "f4:f2:6d:12:23:32", Ports: []Port{{22, "SSH-2.0-OpenSSH_8.8"}, {80, "Apache/2.4.57"}, {443, ""}, {8080, "Tomcat/10.1"}}},
	{IP: "10.0.0.20", Hardware: "70:ee:50:13:24:33", Ports: []Port{{53, "dnsmasq 2.89"}, {67, ""}, {80, "OpenWrt uhttpd"}, {443, ""}, {1900, ""}}},
	{IP: "10.0.0.21", Hardware: "b8:27:eb:14:25:34", Ports: []Port{{22, "SSH-2.0-OpenSSH_9.0"}, {80, "Home Assistant"}, {443, ""}, {1883, "MQTT"}, {8123, "Home Assistant API"}}},

	{IP: "10.0.0.22", Hardware: "3c:52:82:10:20:30", Ports: []Port{{22, "SSH-2.0-OpenSSH_9.2"}, {80, "nginx"}, {443, ""}, {3000, "Grafana"}, {9090, "Prometheus"}}},
	{IP: "10.0.0.23", Hardware: "dc:a6:32:11:22:31", Ports: []Port{{22, "SSH-2.0-dropbear"}, {80, "GoAhead-Webs"}, {443, ""}, {554, "RTSP/1.0"}, {8000, "DVR HTTP"}}},
	{IP: "10.0.0.24", Hardware: "f4:f2:6d:12:23:32", Ports: []Port{{22, "SSH-2.0-OpenSSH_8.8"}, {80, "Apache/2.4.57"}, {443, ""}, {8080, "Tomcat/10.1"}}},
	{IP: "10.0.0.25", Hardware: "70:ee:50:13:24:33", Ports: []Port{{53, "dnsmasq 2.89"}, {67, ""}, {80, "OpenWrt uhttpd"}, {443, ""}, {1900, ""}}},
	{IP: "10.0.0.26", Hardware: "b8:27:eb:14:25:34", Ports: []Port{{22, "SSH-2.0-OpenSSH_9.0"}, {80, "Home Assistant"}, {443, ""}, {1883, "MQTT"}, {8123, "Home Assistant API"}}},

	{IP: "10.0.0.27", Hardware: "3c:52:82:10:20:30", Ports: []Port{{22, "SSH-2.0-OpenSSH_9.2"}, {80, "nginx"}, {443, ""}, {3000, "Grafana"}, {9090, "Prometheus"}}},
	{IP: "10.0.0.28", Hardware: "dc:a6:32:11:22:31", Ports: []Port{{22, "SSH-2.0-dropbear"}, {80, "GoAhead-Webs"}, {443, ""}, {554, "RTSP/1.0"}, {8000, "DVR HTTP"}}},
	{IP: "10.0.0.29", Hardware: "f4:f2:6d:12:23:32", Ports: []Port{{22, "SSH-2.0-OpenSSH_8.8"}, {80, "Apache/2.4.57"}, {443, ""}, {8080, "Tomcat/10.1"}}},
	{IP: "10.0.0.30", Hardware: "70:ee:50:13:24:33", Ports: []Port{{53, "dnsmasq 2.89"}, {67, ""}, {80, "OpenWrt uhttpd"}, {443, ""}, {1900, ""}}},
	{IP: "10.0.0.31", Hardware: "b8:27:eb:14:25:34", Ports: []Port{{22, "SSH-2.0-OpenSSH_9.0"}, {80, "Home Assistant"}, {443, ""}, {1883, "MQTT"}, {8123, "Home Assistant API"}}},

	{IP: "10.0.0.32", Hardware: "3c:52:82:10:20:30", Ports: []Port{{22, "SSH-2.0-OpenSSH_9.2"}, {80, "nginx"}, {443, ""}, {3000, "Grafana"}, {9090, "Prometheus"}}},
	{IP: "10.0.0.33", Hardware: "dc:a6:32:11:22:31", Ports: []Port{{22, "SSH-2.0-dropbear"}, {80, "GoAhead-Webs"}, {443, ""}, {554, "RTSP/1.0"}, {8000, "DVR HTTP"}}},
	{IP: "10.0.0.34", Hardware: "f4:f2:6d:12:23:32", Ports: []Port{{22, "SSH-2.0-OpenSSH_8.8"}, {80, "Apache/2.4.57"}, {443, ""}, {8080, "Tomcat/10.1"}}},
	{IP: "10.0.0.35", Hardware: "70:ee:50:13:24:33", Ports: []Port{{53, "dnsmasq 2.89"}, {67, ""}, {80, "OpenWrt uhttpd"}, {443, ""}, {1900, ""}}},
	{IP: "10.0.0.36", Hardware: "b8:27:eb:14:25:34", Ports: []Port{{22, "SSH-2.0-OpenSSH_9.0"}, {80, "Home Assistant"}, {443, ""}, {1883, "MQTT"}, {8123, "Home Assistant API"}}},

	{IP: "10.0.0.37", Hardware: "3c:52:82:10:20:30", Ports: []Port{{22, "SSH-2.0-OpenSSH_9.2"}, {80, "nginx"}, {443, ""}, {3000, "Grafana"}, {9090, "Prometheus"}}},
	{IP: "10.0.0.38", Hardware: "dc:a6:32:11:22:31", Ports: []Port{{22, "SSH-2.0-dropbear"}, {80, "GoAhead-Webs"}, {443, ""}, {554, "RTSP/1.0"}, {8000, "DVR HTTP"}}},
	{IP: "10.0.0.39", Hardware: "f4:f2:6d:12:23:32", Ports: []Port{{22, "SSH-2.0-OpenSSH_8.8"}, {80, "Apache/2.4.57"}, {443, ""}, {8080, "Tomcat/10.1"}}},
	{IP: "10.0.0.40", Hardware: "70:ee:50:13:24:33", Ports: []Port{{53, "dnsmasq 2.89"}, {67, ""}, {80, "OpenWrt uhttpd"}, {443, ""}, {1900, ""}}},
	{IP: "10.0.0.41", Hardware: "b8:27:eb:14:25:34", Ports: []Port{{22, "SSH-2.0-OpenSSH_9.0"}, {80, "Home Assistant"}, {443, ""}, {1883, "MQTT"}, {8123, "Home Assistant API"}}},

	{IP: "10.0.0.42", Hardware: "3c:52:82:10:20:30", Ports: []Port{{22, "SSH-2.0-OpenSSH_9.2"}, {80, "nginx"}, {443, ""}, {3000, "Grafana"}, {9090, "Prometheus"}}},
	{IP: "10.0.0.43", Hardware: "dc:a6:32:11:22:31", Ports: []Port{{22, "SSH-2.0-dropbear"}, {80, "GoAhead-Webs"}, {443, ""}, {554, "RTSP/1.0"}, {8000, "DVR HTTP"}}},
	{IP: "10.0.0.44", Hardware: "f4:f2:6d:12:23:32", Ports: []Port{{22, "SSH-2.0-OpenSSH_8.8"}, {80, "Apache/2.4.57"}, {443, ""}, {8080, "Tomcat/10.1"}}},
	{IP: "10.0.0.45", Hardware: "70:ee:50:13:24:33", Ports: []Port{{53, "dnsmasq 2.89"}, {67, ""}, {80, "OpenWrt uhttpd"}, {443, ""}, {1900, ""}}},
	{IP: "10.0.0.46", Hardware: "b8:27:eb:14:25:34", Ports: []Port{{22, "SSH-2.0-OpenSSH_9.0"}, {80, "Home Assistant"}, {443, ""}, {1883, "MQTT"}, {8123, "Home Assistant API"}}},

	{IP: "10.0.0.47", Hardware: "3c:52:82:10:20:30", Ports: []Port{{22, "SSH-2.0-OpenSSH_9.2"}, {80, "nginx"}, {443, ""}, {3000, "Grafana"}, {9090, "Prometheus"}}},
	{IP: "10.0.0.48", Hardware: "dc:a6:32:11:22:31", Ports: []Port{{22, "SSH-2.0-dropbear"}, {80, "GoAhead-Webs"}, {443, ""}, {554, "RTSP/1.0"}, {8000, "DVR HTTP"}}},
	{IP: "10.0.0.49", Hardware: "f4:f2:6d:12:23:32", Ports: []Port{{22, "SSH-2.0-OpenSSH_8.8"}, {80, "Apache/2.4.57"}, {443, ""}, {8080, "Tomcat/10.1"}}},
	{IP: "10.0.0.50", Hardware: "70:ee:50:13:24:33", Ports: []Port{{53, "dnsmasq 2.89"}, {67, ""}, {80, "OpenWrt uhttpd"}, {443, ""}, {1900, ""}}},
}

WiFiHosts defines a dense demo dataset for wlan0 to stress long result lists.

Functions

This section is empty.

Types

type Host

type Host struct {
	IP       string
	Hardware string
	Ports    []Port
}

type Port

type Port struct {
	Port   int
	Banner string
}

type Scanner

type Scanner struct {
	Ports []int
}

Scanner simulates a scan with fake host data.

func (*Scanner) GetInterfaces

func (s *Scanner) GetInterfaces() ([]net.Interface, map[string][]net.Addr, error)

GetInterfaces returns fake interfaces used by demo mode.

func (*Scanner) ScanNetwork

func (s *Scanner) ScanNetwork(ifaceName, subnet string, progressChan chan<- shared.ProgressUpdate)

Jump to

Keyboard shortcuts

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