/* Module events */ // sniffer result - username & password sniffed private void sniffer_OnSnifferResult(string url, string username, string password, string aditional, SnifferResultType type) { Window.Dispatcher.BeginInvoke(new UI(delegate { var brush = new SolidColorBrush(); // set brush color if (type == SnifferResultType.HTML) { brush = new SolidColorBrush(Window.ColorSnifferHTML); } else if (type == SnifferResultType.HTTPAuth) { brush = new SolidColorBrush(Window.ColorSnifferHTTPAuth); } else if (type == SnifferResultType.FTP) { brush = new SolidColorBrush(Window.ColorSnifferFTP); } else if (type == SnifferResultType.IMAP) { brush = new SolidColorBrush(Window.ColorSnifferIMAP); } else if (type == SnifferResultType.POP3) { brush = new SolidColorBrush(Window.ColorSnifferPOP3); } else if (type == SnifferResultType.SMTP) { brush = new SolidColorBrush(Window.ColorSnifferSMTP); } // create a new result item var result = new SnifferResult { URL = url, Username = username, Password = password, Aditional = aditional, Type = type, ShapeBrush = brush}; // don't repeat entries if (Window.SnifferResultList.Count == 0 || (Window.SnifferResultList.Last().CompareString() != result.CompareString())) { Window.SnifferResultList.Add(result); // notify user (blinking green line on the "Sniffer" tab, Win7 taskbar)); if (Window.TCTabs.SelectedIndex != 1) { Window.RCTSnifferUpdated.Visibility = Visibility.Visible; ((Storyboard)Window.Resources["STSnifferUpdated"]).Begin(); Window.TaskbarItemInfo.ProgressState = TaskbarItemProgressState.Indeterminate; } } })); }
/* Module events */ // sniffer result - username & password sniffed private void sniffer_OnSnifferResult(string url, string username, string password, string aditional, SnifferResultType type) { Window.Dispatcher.BeginInvoke(new UI(delegate { var brush = new SolidColorBrush(); // set brush color if (type == SnifferResultType.HTML) { brush = new SolidColorBrush(Window.ColorSnifferHTML); } else if (type == SnifferResultType.HTTPAuth) { brush = new SolidColorBrush(Window.ColorSnifferHTTPAuth); } else if (type == SnifferResultType.FTP) { brush = new SolidColorBrush(Window.ColorSnifferFTP); } else if (type == SnifferResultType.IMAP) { brush = new SolidColorBrush(Window.ColorSnifferIMAP); } else if (type == SnifferResultType.POP3) { brush = new SolidColorBrush(Window.ColorSnifferPOP3); } else if (type == SnifferResultType.SMTP) { brush = new SolidColorBrush(Window.ColorSnifferSMTP); } // create a new result item var result = new SnifferResult { URL = url, Username = username, Password = password, Aditional = aditional, Type = type, ShapeBrush = brush }; // don't repeat entries if (Window.SnifferResultList.Count == 0 || (Window.SnifferResultList.Last().CompareString() != result.CompareString())) { Window.SnifferResultList.Add(result); // notify user (blinking green line on the "Sniffer" tab, Win7 taskbar)); if (Window.TCTabs.SelectedIndex != 1) { Window.RCTSnifferUpdated.Visibility = Visibility.Visible; ((Storyboard)Window.Resources["STSnifferUpdated"]).Begin(); Window.TaskbarItemInfo.ProgressState = TaskbarItemProgressState.Indeterminate; } } })); }
private void Result(string url, string username, string password, string aditional, SnifferResultType type) { if (SnifferResult != null) SnifferResult(url, username, password, aditional, type); }
private void Result(string url, string username, string password, string aditional, SnifferResultType type) { if (SnifferResult != null) { SnifferResult(url, username, password, aditional, type); } }