示例#1
0
        private void scanLaunch()
        {
            if (File.Exists(NmapLocation))
            {
                reportsDir = new DirectoryInfo("reports/" + "Verda-report-" + Times.DateFolderName());
                reportsDir.Create();
                outputBox.Text      = null;
                resultsBox.Text     = null;
                reportTimer.Enabled = true;
                outputBox.AppendText("Command: " + arguments + System.Environment.NewLine);
                argConfig = null;
                argRange  = null;
                generateArguments();
                resultsPost(DateTime.Now.ToString("[HH:mm:ss] ") + "Scan started. Target: " + argRange + " , Preset: " + chosenPreset + System.Environment.NewLine);
                optionsTabControl.Enabled = false;

                inputBox.Text            = arguments;
                cancelScanButton.Enabled = true;

                nmap               = new NmapWorker();
                _nmapReceiver      = new NmapReceiver();
                _nmapAnalyzer      = new NmapAnalyzer();
                _nmapAnalyzer.mode = chosenPreset;
                nmap.Received     += _nmapReceiver.OnReceive;
                nmap.Received     += _nmapAnalyzer.Parse;
                nmap.Ended        += OnScanEnd;
                nmap.NmapRun(arguments, NmapLocation);

                debugPost("Scan started.");
                busyPic.Image   = Verda.Properties.Resources.gif_loading;
                statsLabel.Text = "Scan started.";
                this.BackColor  = Color.Lavender;
            }
            else
            {
                MessageBox.Show("nmap.exe not found. Install NMAP or set path to nmap.exe in settings", "nmap.exe not found", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#2
0
        private void scanLaunch()
        {
            if (File.Exists(NmapLocation))
            {
                reportsDir = new DirectoryInfo("reports/" + "Verda-report-" + Times.DateFolderName());
                reportsDir.Create();
                outputBox.Text = null;
                resultsBox.Text = null;
                reportTimer.Enabled = true;
                outputBox.AppendText("Command: " + arguments + System.Environment.NewLine);
                argConfig = null;
                argRange = null;
                generateArguments();
                resultsPost(DateTime.Now.ToString("[HH:mm:ss] ") + "Scan started. Target: " + argRange + " , Preset: " + chosenPreset + System.Environment.NewLine);
                optionsTabControl.Enabled = false;

                inputBox.Text = arguments;
                cancelScanButton.Enabled = true;

                nmap = new NmapWorker();
                _nmapReceiver = new NmapReceiver();
                _nmapAnalyzer = new NmapAnalyzer();
                _nmapAnalyzer.mode = chosenPreset;
                nmap.Received += _nmapReceiver.OnReceive;
                nmap.Received += _nmapAnalyzer.Parse;
                nmap.Ended += OnScanEnd;
                nmap.NmapRun(arguments, NmapLocation);

                debugPost("Scan started.");
                busyPic.Image = Verda.Properties.Resources.gif_loading;
                statsLabel.Text = "Scan started.";
                this.BackColor = Color.Lavender;
            }
            else
                MessageBox.Show("nmap.exe not found. Install NMAP or set path to nmap.exe in settings", "nmap.exe not found", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }