@ Override public void save ( ) { List < Object > contextSpecificObjects = new ArrayList < Object > ( ) ; techTreeState = getTechTree ( ) . getTechSet ( ) ; if ( ! this . getBoolValue ( FIELD_ADVANCED ) ) { contextSpecificObjects . add ( scanPolicy ) ; } else { contextSpecificObjects . add ( policyPanel . getScanPolicy ( ) ) ; if ( target == null && this . customPanels != null ) { // One of the custom scan panels must have specified a target for ( CustomScanPanel customPanel : this . customPanels ) { target = customPanel . getTarget ( ) ; if ( target != null ) { break ; } } } // Save all Variant configurations getVariantPanel ( ) . saveParam ( scannerParam ) ; // If all other vectors has been disabled // force all injectable params and rpc model to NULL if ( getDisableNonCustomVectors ( ) . isSelected ( ) ) { scannerParam . setTargetParamsInjectable ( 0 ) ; scannerParam . setTargetParamsEnabledRPC ( 0 ) ; } if ( ! getBoolValue ( FIELD_RECURSE ) && injectionPointModel . getSize ( ) > 0 ) { int [ ] [ ] injPoints = new int [ injectionPointModel . getSize ( ) ] [ ] ; for ( int i = 0 ; i < injectionPointModel . getSize ( ) ; i ++ ) { Highlight hl = injectionPointModel . elementAt ( i ) ; injPoints [ i ] = new int [ 2 ] ; injPoints [ i ] [ 0 ] = hl . getStartOffset ( ) ; injPoints [ i ] [ 1 ] = hl . getEndOffset ( ) ; } try { if ( target != null && target . getStartNode ( ) != null ) { VariantUserDefined . setInjectionPoints ( this . target . getStartNode ( ) . getHistoryReference ( ) . getURI ( ) . toString ( ) , injPoints ) ; enableUserDefinedRPC ( ) ; } } catch ( Exception e ) { logger . error ( e . getMessage ( ) , e ) ; } } scannerParam . setHostPerScan ( extension . getScannerParam ( ) . getHostPerScan ( ) ) ; scannerParam . setThreadPerHost ( extension . getScannerParam ( ) . getThreadPerHost ( ) ) ; scannerParam . setHandleAntiCSRFTokens ( extension . getScannerParam ( ) . getHandleAntiCSRFTokens ( ) ) ; scannerParam . setMaxResultsToList ( extension . getScannerParam ( ) . getMaxResultsToList ( ) ) ; contextSpecificObjects . add ( scannerParam ) ; contextSpecificObjects . add ( techTreeState ) ; if ( this . customPanels != null ) { for ( CustomScanPanel customPanel : this . customPanels ) { Object [ ] objs = customPanel . getContextSpecificObjects ( ) ; if ( objs != null ) { for ( Object obj : objs ) { contextSpecificObjects . add ( obj ) ; } } } } } target . setRecurse ( this . getBoolValue ( FIELD_RECURSE ) ) ; if ( target . getContext ( ) == null && getSelectedContext ( ) != null ) { target . setContext ( getSelectedContext ( ) ) ; } this . extension . startScan ( target , getSelectedUser ( ) , contextSpecificObjects . toArray ( ) ) ; }
Use the save method to launch a scan