public static void DisplayAlert(ScanAlert Alert) { var color = Alert.AlertType == ScanAlertOptions.Vulnerability ? ConsoleColor.Red : ConsoleColor.Yellow; var msg = Alert.AlertType == ScanAlertOptions.Vulnerability ? "Potential Vulnerability" : Alert.AlertType == ScanAlertOptions.Warning ? "Warning" : "Request Data"; Cli.WriteLine("~{0}~{1}: {2}~R~", color, msg, Alert.AlertName); }
public static void DisplayAlert(ScanAlert Alert) { //Alert.Trace.Request if (Alert.AlertType == ScanAlertOptions.Warning) { Console.ForegroundColor = ConsoleColor.Yellow; Trace.Write("Warning"); } else { Console.ForegroundColor = ConsoleColor.Red; Trace.Write("Potential Vulnerability"); } TraceHelper.WriteLineFormat(": {0}", Alert.AlertName); ResetColors(); }