new: added known services descriptions from IANA

This commit is contained in:
evilsocket 2024-10-01 14:46:59 +02:00
parent 30c4c320a6
commit e190737c91
2 changed files with 7299 additions and 1 deletions

File diff suppressed because it is too large Load diff

View file

@ -39,8 +39,15 @@ func (mod *ZeroGod) show(filter string, withData bool) error {
ip = svc.HostName
}
fmt.Fprintf(mod.Session.Events.Stdout, " %s %s:%s\n",
svcDesc := ""
svcName := strings.SplitN(svc.Service, ".", 2)[0]
if desc, found := KNOWN_SERVICES[svcName]; found {
svcDesc = tui.Dim(fmt.Sprintf(" %s", desc))
}
fmt.Fprintf(mod.Session.Events.Stdout, " %s%s %s:%s\n",
tui.Green(svc.ServiceInstanceName()),
svcDesc,
ip,
tui.Red(fmt.Sprintf("%d", svc.Port)),
)