@@ -102,7 +102,7 @@ Commands:
102102 subdomains get -d <domain>
103103 livehosts get -d <domain>
104104 cnames get -d <domain>
105- urls collect -d <domain>
105+ urls collect -d <domain> [--subdomain]
106106 js scan -d <domain> [-s <subdomain>]
107107 reflection scan -d <domain>
108108 nuclei run -d <domain>
@@ -2772,8 +2772,9 @@ func handleLivehostsGo(args []string) error {
27722772func handleURLsGo (args []string ) error {
27732773 var domain string
27742774 threads := 100
2775+ skipSubdomainEnum := false
27752776
2776- // Parse arguments: collect -d <domain> [-t <threads>]
2777+ // Parse arguments: collect -d <domain> [-t <threads>] [--subdomain]
27772778 for i := 0 ; i < len (args ); i ++ {
27782779 switch args [i ] {
27792780 case "-d" , "--domain" :
@@ -2788,20 +2789,27 @@ func handleURLsGo(args []string) error {
27882789 }
27892790 i ++
27902791 }
2792+ case "--subdomain" :
2793+ skipSubdomainEnum = true
27912794 }
27922795 }
27932796
27942797 if domain == "" {
2795- fmt .Println ("Usage: urls collect -d <domain> [-t <threads>]" )
2798+ fmt .Println ("Usage: urls collect -d <domain> [-t <threads>] [--subdomain]" )
2799+ fmt .Println (" --subdomain: Treat input as a single subdomain (skip subdomain enumeration)" )
27962800 return fmt .Errorf ("domain is required" )
27972801 }
27982802
2799- res , err := urls .CollectURLs (domain , threads )
2803+ res , err := urls .CollectURLs (domain , threads , skipSubdomainEnum )
28002804 if err != nil {
28012805 return err
28022806 }
28032807
2804- fmt .Printf ("[OK] Found %d total URLs; %d JavaScript URLs for %s\n " , res .TotalURLs , res .JSURLs , res .Domain )
2808+ mode := "domain"
2809+ if skipSubdomainEnum {
2810+ mode = "subdomain"
2811+ }
2812+ fmt .Printf ("[OK] Found %d total URLs; %d JavaScript URLs for %s (mode: %s)\n " , res .TotalURLs , res .JSURLs , res .Domain , mode )
28052813 fmt .Printf ("[INFO] All URLs saved to %s\n " , res .AllFile )
28062814 if res .JSURLs > 0 {
28072815 fmt .Printf ("[INFO] JS URLs saved to %s\n " , res .JSFile )
@@ -3178,7 +3186,7 @@ func main() {
31783186 if len (args ) > 0 && args [0 ] == "collect" {
31793187 err = handleURLsGo (args [1 :])
31803188 } else {
3181- err = fmt .Errorf ("unsupported urls action; use: autoar urls collect -d <domain> [-t <threads>]" )
3189+ err = fmt .Errorf ("unsupported urls action; use: autoar urls collect -d <domain> [-t <threads>] [--subdomain] " )
31823190 }
31833191
31843192 case "dns" :
0 commit comments