From f4d50bc9ce9ed8b08553132dc27cdf2540bfa754 Mon Sep 17 00:00:00 2001 From: caffix Date: Fri, 28 Jul 2023 22:02:57 -0400 Subject: [PATCH] fixed summary output Co-authored-by: Kaushal Mallya --- cmd/amass/db.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/amass/db.go b/cmd/amass/db.go index f2ee9ca4f..d1b7bf33c 100644 --- a/cmd/amass/db.go +++ b/cmd/amass/db.go @@ -181,15 +181,18 @@ func showEventData(args *dbArgs, asninfo bool, db *netmap.Graph) { continue } - out.Addresses = format.DesiredAddrTypes(out.Addresses, args.Options.IPv4, args.Options.IPv6) - if l := len(out.Addresses); (args.Options.IPs || args.Options.IPv4 || args.Options.IPv6) && l == 0 { + if args.Options.IPv4 || args.Options.IPv6 { + out.Addresses = format.DesiredAddrTypes(out.Addresses, args.Options.IPv4, args.Options.IPv6) + } + + if l := len(out.Addresses); (args.Options.IPv4 || args.Options.IPv6) && l == 0 { continue } else if l > 0 { format.UpdateSummaryData(out, asns) } total++ - name, ips := format.OutputLineParts(out, args.Options.IPs || args.Options.IPv4 || args.Options.IPv6, args.Options.DemoMode) + name, ips := format.OutputLineParts(out, args.Options.IPv4 || args.Options.IPv6, args.Options.DemoMode) if ips != "" { ips = " " + ips }