Documentation
¶
Index ¶
- func CheckDependencies(binaries []string) bool
- func ConfigureIPAddresses(interfaces []string, app *tview.Application, pages *tview.Pages, ...) error
- func ConfigureNetworkInterfaces(app *tview.Application, pages *tview.Pages, mainView tview.Primitive) error
- func ConfigureVLANs(mainInterface string, vlanIDs []string) error
- func CreateHostfile(scanFiles []string, hostfilePath string) error
- func DetectInterfaceForIPRange(ipRange string) (interfaceName string, vlanID string, err error)
- func EnsureDir(dirName string) error
- func ExtractIPFromLine(line string) string
- func GetAllConfiguredInterfaces(mainInterface string) ([]string, error)
- func GetEthernetInterfaces() ([]net.Interface, error)
- func GetInterfaceStatus(name string) (string, error)
- func GetMainInterface() string
- func GetSubinterfaces(ifaceName string) ([]string, error)
- func GetWiresharkVLANs() ([]string, error)
- func GetWorkingDirectory() string
- func IsValidInterface(ifaceName string) bool
- func PerformCategorization(...) error
- func SetMainInterface(iface string) error
- type ARPResult
- type Category
- type HostInfo
- type Port
- type Service
- type VLANAnalysis
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDependencies ¶
check dependencies to ensure required binaries are installed
func ConfigureIPAddresses ¶
func ConfigureIPAddresses(interfaces []string, app *tview.Application, pages *tview.Pages, mainView tview.Primitive) error
ConfigureIPAddresses configures IP addresses for the selected interfaces
func ConfigureNetworkInterfaces ¶
func ConfigureNetworkInterfaces(app *tview.Application, pages *tview.Pages, mainView tview.Primitive) error
ConfigureNetworkInterfaces handles the configuration of the main network interface
func ConfigureVLANs ¶
ConfigureVLANs creates and configures VLAN interfaces
func CreateHostfile ¶
createHostfile aggregates all IP addresses from various scan outputs into a single hostfile.
func DetectInterfaceForIPRange ¶
DetectInterfaceForIPRange attempts to detect the network interface and VLAN ID based on the IP range.
func ExtractIPFromLine ¶
extractIPFromLine extracts the first valid IPv4 address from a given line.
func GetAllConfiguredInterfaces ¶
GetAllConfiguredInterfaces returns a list of all interfaces including VLANs
func GetEthernetInterfaces ¶
GetEthernetInterfaces retrieves all wired Ethernet interfaces, excluding wireless and subinterfaces.
func GetInterfaceStatus ¶
func GetMainInterface ¶
func GetMainInterface() string
GetMainInterface returns the currently set main interface
func GetSubinterfaces ¶
GetSubinterfaces retrieves all subinterfaces for a given parent interface.
func GetWiresharkVLANs ¶
GetWiresharkVLANs reads the VLAN analysis results from the most recent Wireshark capture
func GetWorkingDirectory ¶
func GetWorkingDirectory() string
get the working directory from the configuration
func IsValidInterface ¶
IsValidInterface validates whether the provided interface name exists and is a valid Ethernet interface.
func PerformCategorization ¶
func PerformCategorization(hostfilesDir, arpScanFile, pingScanFile, dnsLookupFile, windowsDiscoveryFile, nmapXMLPath string) error
PerformCategorization processes scan results and categorizes each IP.
func SetMainInterface ¶
SetMainInterface sets the main interface
Types ¶
type Category ¶
type Category string
Category represents a classification category for IP addresses.
const ( CategoryWindowsServer Category = "Windows_Server" CategoryWindowsClient Category = "Windows_Client" CategoryWindowsUnknown Category = "Windows_Unknown" CategoryLinux Category = "Linux" CategoryPrinter Category = "Printers" CategoryUPS Category = "UPS" CategoryNAS Category = "NAS" CategoryFirewall Category = "Firewalls" CategoryRouterSwitch Category = "Routers_Switches" CategoryLightsOutManagement Category = "Lights_Out_Management" CategoryUnknown Category = "Unknown" )
type HostInfo ¶
type HostInfo struct {
IP string
MAC string
MACVendor string
HostNames []string
Ports []Port
OS struct {
Vendor string
Family string
Gen string
Detail string
Accuracy int
}
Services []Service
}
HostInfo holds parsed information from Nmap XML
type VLANAnalysis ¶
type VLANAnalysis []struct {
VLANID string `json:"VLANID"`
}
VLANAnalysis represents the structure of the VLAN analysis JSON output