예제 #1
0
        private void Autoscanbutton_Click(object sender, EventArgs e)
        {
            autoscanbox ab = new autoscanbox();
            // ab.ShowDialog();
            Scan   ast = new Scan();
            string asr = ast.Autoscan();

            if (asr.Contains("closed"))
            {
                MessageBox.Show("port closed cant proceed further");
                this.Close();
            }
            MessageBox.Show("Found open/Filtered Port proceeding to test Secure DICOM");
            Basic_Test abt     = new Basic_Test();
            bool       autecho = abt.autoecho();

            if (autecho == true)
            {
                MessageBox.Show("C-Echo success Proceeding to dump patient details");
                abt.autofind();
            }
            else if (autecho == false)
            {
                MessageBox.Show("C-Echo fail proceeding to test SSL/TLS cipher suites");
                bool atsslcheck = autossl();
                if (atsslcheck == true)
                {
                    MessageBox.Show("Meets the DICOM Standars");
                }
                else
                {
                    MessageBox.Show("Doesnt meet the Secure DICOM Standards");
                }
            }

            MessageBox.Show("Test complete");
            this.Close();
        }
예제 #2
0
        private void Autoscanbutton_Click(object sender, EventArgs e)
        {
            // write result to Log.........................
            string dtn         = DateTime.Now.ToString();
            string AutoscanLog = Directory.GetCurrentDirectory() + "\\Autoscan_" + DateTime.Now.ToFileTime() + ".txt";

            using (StreamWriter sw = File.CreateText(AutoscanLog))
            {
                sw.WriteLine("IP address:{0}\n\n", G_callingip);
            }
            //................................
            button3.Enabled = false;
            label3.Text     = "Auto Scan initiated";
            autoscanbox ab = new autoscanbox();
            // ab.ShowDialog();
            Scan   ast = new Scan();
            string asr = ast.Autoscan();

            if (asr.Contains("closed"))
            {
                progressBar1.Value = 100;
                MessageBox.Show("port closed cant proceed further");
                this.Close();
                using (StreamWriter sw = File.AppendText(AutoscanLog))
                {
                    sw.WriteLine(string.Format("Port status: Closed \n"));
                }
            }
            progressBar1.Value = 30;
            MessageBox.Show("Found open/Filtered Port proceeding to test Secure DICOM");
            using (StreamWriter sw = File.AppendText(AutoscanLog))
            {
                sw.WriteLine(string.Format("Port status: Open\\Filtered \n"));
            }

            Basic_Test abt     = new Basic_Test();
            bool       autecho = abt.autoecho();

            if (autecho == true)
            {
                using (StreamWriter sw = File.AppendText(AutoscanLog))
                {
                    sw.WriteLine(string.Format("Secure DICOM: False \n"));
                }
                progressBar1.Value = 50;
                MessageBox.Show("C-Echo success Proceeding to dump patient details");
                using (StreamWriter sw = File.AppendText(AutoscanLog))
                {
                    sw.WriteLine(string.Format("C-Echo status: Sucess \n"));
                }

                abt.autofind(AutoscanLog);
                progressBar1.Value = 70;
            }
            else if (autecho == false)
            {
                using (StreamWriter sw = File.AppendText(AutoscanLog))
                {
                    sw.WriteLine(string.Format("Secure DICOM: True \n"));
                }
                progressBar1.Value = 70;
                MessageBox.Show("C-Echo fail proceeding to test SSL/TLS cipher suites");

                bool atsslcheck = autossl();
                if (atsslcheck == true)
                {
                    progressBar1.Value = 100;
                    MessageBox.Show("Meets the DICOM Standars");
                    using (StreamWriter sw = File.AppendText(AutoscanLog))
                    {
                        sw.WriteLine(string.Format("Supported Cipher suites of DICOM Standard: True \n"));
                    }
                }
                else
                {
                    progressBar1.Value = 100;
                    MessageBox.Show("Doesnt meet the Secure DICOM Standards");
                    using (StreamWriter sw = File.AppendText(AutoscanLog))
                    {
                        sw.WriteLine(string.Format("Supported Cipher suites of DICOM Standard: False \n"));
                    }
                }
            }

            MessageBox.Show("Test complete");
            this.Close();
            using (StreamWriter sw = File.AppendText(AutoscanLog))
            {
                sw.WriteLine(string.Format("Test complete : True \n"));
            }
            button3.Enabled = true;
        }