diff --git a/modules/net_recon.go b/modules/net_recon.go index 8681f864..2be7c6ab 100644 --- a/modules/net_recon.go +++ b/modules/net_recon.go @@ -78,29 +78,6 @@ func (d Discovery) Author() string { return "Simone Margaritelli " } -func (d *Discovery) checkShared(new net.ArpTable) { - n_gw_shared := 0 - for ip, mac := range new { - if ip != d.Session.Gateway.IpAddress && mac == d.Session.Gateway.HwAddress { - n_gw_shared++ - } - } - - if n_gw_shared > 0 { - a := "" - b := "" - if n_gw_shared == 1 { - a = "" - b = "s" - } else { - a = "s" - b = "" - } - - log.Warning("Found %d endpoint%s which share%s the same MAC of the gateway (%s), there're might be some IP isolation going on, skipping.", n_gw_shared, a, b, d.Session.Gateway.HwAddress) - } -} - func (d *Discovery) runDiff() { // check for endpoints who disappeared var rem net.ArpTable = make(net.ArpTable) diff --git a/net/endpoint.go b/net/endpoint.go index 997d6b90..1a1f7366 100644 --- a/net/endpoint.go +++ b/net/endpoint.go @@ -100,7 +100,7 @@ func (t *Endpoint) String() string { return fmt.Sprintf("%s : %s", t.IpAddress, t.HwAddress) } else if t.Hostname == "" { return fmt.Sprintf("%s : %s ( %s )", t.IpAddress, t.HwAddress, t.Vendor) - } else { - return fmt.Sprintf("%s : %s ( %s ) - "+core.BOLD+t.Hostname+core.RESET, t.IpAddress, t.HwAddress, t.Vendor) } + + return fmt.Sprintf("%s : %s ( %s ) - %s", t.IpAddress, t.HwAddress, t.Vendor, core.Bold(t.Hostname)) } diff --git a/session/module_handler.go b/session/module_handler.go index db0adb7e..eaff64b8 100644 --- a/session/module_handler.go +++ b/session/module_handler.go @@ -40,15 +40,12 @@ func (h *ModuleHandler) Parse(line string) (bool, []string) { if h.Parser == nil { if line == h.Name { return true, nil - } else { - return false, nil - } - } else { - result := h.Parser.FindStringSubmatch(line) - if len(result) == h.Parser.NumSubexp()+1 { - return true, result[1:] - } else { - return false, nil } + return false, nil } + result := h.Parser.FindStringSubmatch(line) + if len(result) == h.Parser.NumSubexp()+1 { + return true, result[1:] + } + return false, nil }