From 3203caca01a6c8b8cc8d274d7c5a315b34f84615 Mon Sep 17 00:00:00 2001 From: firefart <105281+firefart@users.noreply.github.com> Date: Thu, 22 May 2025 10:24:35 +0200 Subject: [PATCH] remove show ips option --- cli/dns/dns.go | 2 -- gobusterdns/gobusterdns.go | 10 +--------- gobusterdns/options.go | 1 - gobusterdns/result.go | 2 +- 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/cli/dns/dns.go b/cli/dns/dns.go index 691790c..e748a7c 100644 --- a/cli/dns/dns.go +++ b/cli/dns/dns.go @@ -26,7 +26,6 @@ func getFlags() []cli.Flag { var flags []cli.Flag flags = append(flags, []cli.Flag{ &cli.StringFlag{Name: "domain", Aliases: []string{"do"}, Usage: "The target domain", Required: true}, - &cli.BoolFlag{Name: "show-ips", Aliases: []string{"i"}, Value: false, Usage: "Show IP addresses of found domains"}, &cli.BoolFlag{Name: "check-cname", Aliases: []string{"c"}, Value: false, Usage: "Also check CNAME records"}, &cli.DurationFlag{Name: "timeout", Aliases: []string{"to"}, Value: 1 * time.Second, Usage: "DNS resolver timeout"}, &cli.BoolFlag{Name: "wildcard", Aliases: []string{"wc"}, Value: false, Usage: "Force continued operation when wildcard found"}, @@ -42,7 +41,6 @@ func run(c *cli.Context) error { pluginOpts := gobusterdns.NewOptions() pluginOpts.Domain = c.String("domain") - pluginOpts.ShowIPs = c.Bool("show-ips") pluginOpts.CheckCNAME = c.Bool("check-cname") pluginOpts.Timeout = c.Duration("timeout") pluginOpts.WildcardForced = c.Bool("wildcard") diff --git a/gobusterdns/gobusterdns.go b/gobusterdns/gobusterdns.go index e09e67d..20c91b3 100644 --- a/gobusterdns/gobusterdns.go +++ b/gobusterdns/gobusterdns.go @@ -139,9 +139,7 @@ func (d *GobusterDNS) ProcessWord(ctx context.Context, word string, progress *li Subdomain: strings.TrimSuffix(subdomain, "."), } - if d.options.ShowIPs { - result.IPs = ips - } + result.IPs = ips if d.options.CheckCNAME { cname, err := d.dnsLookupCname(ctx, subdomain) if err == nil { @@ -204,12 +202,6 @@ func (d *GobusterDNS) GetConfigString() (string, error) { } } - if o.ShowIPs { - if _, err := fmt.Fprintf(tw, "[+] Show IPs:\ttrue\n"); err != nil { - return "", err - } - } - if o.WildcardForced { if _, err := fmt.Fprintf(tw, "[+] Wildcard forced:\ttrue\n"); err != nil { return "", err diff --git a/gobusterdns/options.go b/gobusterdns/options.go index a908577..8ccd212 100644 --- a/gobusterdns/options.go +++ b/gobusterdns/options.go @@ -7,7 +7,6 @@ import ( // OptionsDNS holds all options for the dns plugin type OptionsDNS struct { Domain string - ShowIPs bool CheckCNAME bool WildcardForced bool Resolver string diff --git a/gobusterdns/result.go b/gobusterdns/result.go index 543557b..f168524 100644 --- a/gobusterdns/result.go +++ b/gobusterdns/result.go @@ -31,7 +31,7 @@ func (r Result) ResultToString() (string, error) { for i := range r.IPs { ips[i] = r.IPs[i].String() } - green(buf, " IPs: %s", strings.Join(ips, ",")) + green(buf, " %s", strings.Join(ips, ",")) } if r.CNAME != "" {