public void ShowResults() { foreach (Vulnerability vuln in _vulnerabilities.Where(i => i.Vulnerable)) { Beaprint.BadPrint(String.Format(" [!] {0} : VULNERABLE", vuln.Identification)); foreach (string exploit in vuln.KnownExploits) { Beaprint.BadPrint(String.Format(" [>] {0}", exploit)); } System.Console.WriteLine(); } if (_vulnerabilities.Any(e => e.Vulnerable)) { if (Program.using_ansi) { System.Console.WriteLine(Beaprint.GRAY + " Finished. Found " + Beaprint.ansi_color_bad + _vulnerabilities.Count(i => i.Vulnerable) + Beaprint.GRAY + " potential vulnerabilities." + Beaprint.NOCOLOR); } else { string iniPrint = " Finished. Found {0} potential vulnerabilities."; Formatter[] colors = new Formatter[] { new Formatter(_vulnerabilities.Count(i => i.Vulnerable), Beaprint.color_bad), }; Colorful.Console.WriteLineFormatted(iniPrint, Color.Gray, colors); } } else { Beaprint.GrayPrint(" Finished. Found 0 vulnerabilities.\r\n"); } }
public void ShowResults() { foreach (Vulnerability vuln in _vulnerabilities.Where(i => i.Vulnerable)) { Beaprint.BadPrint(String.Format(" [!] {0} : VULNERABLE", vuln.Identification)); foreach (string exploit in vuln.KnownExploits) { Beaprint.BadPrint(String.Format(" [>] {0}", exploit)); } System.Console.WriteLine(); } if (_vulnerabilities.Any(e => e.Vulnerable)) { System.Console.WriteLine(Beaprint.GRAY + " Finished. Found " + Beaprint.ansi_color_bad + _vulnerabilities.Count(i => i.Vulnerable) + Beaprint.GRAY + " potential vulnerabilities." + Beaprint.NOCOLOR); } else { Beaprint.GrayPrint(" Finished. Found 0 vulnerabilities.\r\n"); } }