watchyourlan/main.go
2022-08-17 12:41:15 +07:00

37 lines
No EOL
596 B
Go

package main
import (
"fmt"
)
type Host struct {
Id uint16
Name string
Ip string
Mac string
Hw string
Date string
Known uint16
Now uint16
}
type Conf struct {
Iface string
DbPath string
GuiIP string
GuiPort string
}
func main() {
newConfig := get_config("./data/config")
foundHosts := parse_output(scan_iface(newConfig.Iface))
fmt.Println(foundHosts)
db_create(newConfig.DbPath)
fmt.Println(fmt.Sprintf("http://%s:%s", newConfig.GuiIP, newConfig.GuiPort))
webgui(newConfig, foundHosts)
}