@@ -172,9 +172,19 @@ func GetLogger() *logger.Logger {
172172func runIntelligentDiscovery (target string ) error {
173173 log .Infow ("Starting intelligent discovery" , "target" , target )
174174
175- // Create discovery engine
175+ // Create discovery engine with enhanced features
176176 discoveryConfig := discovery .DefaultDiscoveryConfig ()
177- discoveryEngine := discovery .NewEngine (discoveryConfig , log .WithComponent ("discovery" ))
177+ discoveryConfig .MaxDepth = 5
178+ discoveryConfig .MaxAssets = 10000
179+ discoveryConfig .EnableDNS = true
180+ discoveryConfig .EnableCertLog = true
181+ discoveryConfig .EnableSearch = true
182+ discoveryConfig .EnablePortScan = true
183+ discoveryConfig .EnableWebCrawl = true
184+ discoveryConfig .EnableTechStack = true
185+ discoveryConfig .Timeout = 60 * time .Minute
186+
187+ discoveryEngine := discovery .NewEngineWithConfig (discoveryConfig , log .WithComponent ("discovery" ), cfg )
178188
179189 // Start discovery
180190 session , err := discoveryEngine .StartDiscovery (target )
@@ -2278,16 +2288,17 @@ func runMainDiscovery(cmd *cobra.Command, args []string, log *logger.Logger, db
22782288 // Start comprehensive discovery
22792289 fmt .Println ("🔍 Starting comprehensive asset discovery and scanning..." )
22802290
2281- // Create discovery config
2291+ // Create discovery config with all features enabled
22822292 discoveryConfig := discovery .DefaultDiscoveryConfig ()
2283- discoveryConfig .MaxDepth = 3
2284- discoveryConfig .MaxAssets = 1000
2293+ discoveryConfig .MaxDepth = 5 // Increased for recursive discovery
2294+ discoveryConfig .MaxAssets = 10000 // Increased for comprehensive spidering
22852295 discoveryConfig .EnableDNS = true
22862296 discoveryConfig .EnableCertLog = true
2287- discoveryConfig .EnableSearch = true
2297+ discoveryConfig .EnableSearch = true // Search engines enabled
22882298 discoveryConfig .EnablePortScan = true
2289- discoveryConfig .EnableWebCrawl = true
2299+ discoveryConfig .EnableWebCrawl = true // Web spidering enabled
22902300 discoveryConfig .EnableTechStack = true
2301+ discoveryConfig .Timeout = 60 * time .Minute // Increased timeout for thorough discovery
22912302
22922303 // Create scope validator if we have programs configured
22932304 var scopeValidator * discovery.ScopeValidator
@@ -2298,9 +2309,12 @@ func runMainDiscovery(cmd *cobra.Command, args []string, log *logger.Logger, db
22982309 fmt .Printf ("⚠️ Scope validation disabled - all discovered assets will be processed\n \n " )
22992310 }
23002311
2301- // Initialize discovery engine with scope validation
2312+ // Initialize discovery engine with enhanced discovery and scope validation
23022313 engine := discovery .NewEngineWithScopeValidator (discoveryConfig , log , scopeValidator )
23032314
2315+ // Register enhanced discovery module
2316+ engine .RegisterModule (discovery .NewEnhancedDiscovery (discoveryConfig , log , cfg ))
2317+
23042318 // Start discovery with the target
23052319 session , err := engine .StartDiscovery (target )
23062320 if err != nil {
0 commit comments