private void startSpider ( ) { spider = new Spider ( id , extension , spiderParams , extension . getModel ( ) . getOptionsParam ( ) . getConnectionParam ( ) , extension . getModel ( ) , this . scanContext ) ; // Register this thread as a Spider Listener, so it gets notified of events and is able // to manipulate the UI accordingly spider . addSpiderListener ( this ) ; // Add the pending listeners for ( SpiderListener l : pendingSpiderListeners ) { spider . addSpiderListener ( l ) ; } // Add the list of (regex) URIs that should be excluded List < String > excludeList = new ArrayList <> ( ) ; excludeList . addAll ( extension . getExcludeList ( ) ) ; excludeList . addAll ( extension . getModel ( ) . getSession ( ) . getExcludeFromSpiderRegexs ( ) ) ; excludeList . addAll ( extension . getModel ( ) . getSession ( ) . getGlobalExcludeURLRegexs ( ) ) ; spider . setExcludeList ( excludeList ) ; // Add seeds accordingly addSeeds ( ) ; spider . setScanAsUser ( scanUser ) ; // Add any custom parsers and filters specified if ( this . customSpiderParsers != null ) { for ( SpiderParser sp : this . customSpiderParsers ) { spider . addCustomParser ( sp ) ; } } if ( this . customFetchFilters != null ) { for ( FetchFilter ff : this . customFetchFilters ) { spider . addFetchFilter ( ff ) ; } } if ( this . customParseFilters != null ) { for ( ParseFilter pf : this . customParseFilters ) { spider . addParseFilter ( pf ) ; } } // Start the spider spider . start ( ) ; }
Start spider .