private void btnStop_Click( object sender, EventArgs e ) { this.bgWorker.CancelAsync(); MessageBox.Show( "Scanning aborted!", String.Empty, MessageBoxButtons.OK, MessageBoxIcon.Information ); this.btnStop.Enabled = false; this.ActivateStatusLabel( false ); this.ClearResponseSummary(); this.gvResults.DataSource = null; this._juniperManager.Dispose(); this._juniperManager = null; this.DisableControls( this.Controls, true ); }
private void btnStart_Click( object sender, EventArgs e ) { if( String.IsNullOrEmpty( this.tbUrl.Text ) ) { MessageBox.Show( "You need to enter url!", "Warning!", MessageBoxButtons.OK, MessageBoxIcon.Warning ); return; } if( !this.AtLeastOneCheckSelected() ) { MessageBox.Show( "You must select at least one check!", "Warning!", MessageBoxButtons.OK, MessageBoxIcon.Warning ); return; } this.gvResults.DataSource = null; this.ClearResponseSummary(); this._juniperManager = new JuniperManager( this.GetBaseUrl() ); this._scannerSetting = new ScannerSetting { MinId = ( int )this.nudMin.Value, MaxId = ( int )this.nudMax.Value, CheckMultipleSignInPages = this.chbMultipleSignInPages.Checked, CheckWebRoot = this.chbWebRoot.Checked, CheckSetupFiles = this.chbSetupFiles.Checked, CheckAuthByPass = this.chbAuthByPass.Checked, CheckXssVulnerability = this.chbCheckXss.Checked, CheckAdminAccess = this.chbAdminAccess.Checked, CheckMeetingTest = this.chbMeetingTest.Checked }; this.ActivateStatusLabel( true ); this.DisableControls( this.Controls, false ); this.bgWorker.RunWorkerAsync(); }