final ITargetScope scanTargetScope = wizard.getScanTargetScope();
if(scanTargetScope == null) {
return null;
}
final IScannerConfig config = scan.getConfig();
config.setScanTargetScope(scanTargetScope);
config.setUserAgent(IPreferenceConstants.P_USER_AGENT);
config.setCookieList(getCookieListForScope(wizard.getCookieStringList(), scanTargetScope));
config.setScanIdentity(wizard.getScanIdentity());
config.setExcludedParameterNames(wizard.getExcludedParameterNames());
final IPreferenceStore preferences = Activator.getDefault().getPreferenceStore();
config.setLogAllRequests(preferences.getBoolean(IPreferenceConstants.P_LOG_ALL_REQUESTS));
config.setDisplayDebugOutput(preferences.getBoolean(IPreferenceConstants.P_DISPLAY_DEBUG_OUTPUT));
config.setMaxRequestsPerSecond(preferences.getInt(IPreferenceConstants.P_MAX_REQUESTS_PER_SECOND));
config.setMaxDescendants(preferences.getInt(IPreferenceConstants.P_MAX_SCAN_DESCENDANTS));
config.setMaxChildren(preferences.getInt(IPreferenceConstants.P_MAX_SCAN_CHILDREN));
config.setMaxDepth(preferences.getInt(IPreferenceConstants.P_MAX_SCAN_DEPTH));
config.setMaxDuplicatePaths(preferences.getInt(IPreferenceConstants.P_MAX_SCAN_DUPLICATE_PATHS));
config.setMaxResponseKilobytes(preferences.getInt(IPreferenceConstants.P_MAX_RESPONSE_LENGTH));
final Thread probeThread = new Thread(new ScanProbeTask(shell, scan));
probeThread.start();
return wizard.getTargetField();