Skip to content

Commit

Permalink
fixed summary output
Browse files Browse the repository at this point in the history
Co-authored-by: Kaushal Mallya <chaeyib@users.noreply.github.com>
  • Loading branch information
caffix and chaeyib committed Jul 29, 2023
1 parent ff37eb5 commit f4d50bc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cmd/amass/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit f4d50bc

Please sign in to comment.