void SourceWrapper_OnReceived(byte[] bytes) { if (ProxyConfig.Sniffer.ShowOnConsole) { log.InfoFormat("Source -> Target: {0}", Encoding.Default.GetString(bytes)); } if (ProxyConfig.Sniffer.Save) { Sniffer.Save(ProxyConfig.Sniffer.InputDescription, bytes); } }
void TargetWrapper_OnDataReceived(object sender, WrapperDataReceivedEventArgs e) { if (ProxyConfig.Sniffer.ShowOnConsole) { log.InfoFormat("T->S: {0}", e.DataString); } else { log.InfoFormat("T->S: {0} bytes", e.DataBytes.Length); } if (ProxyConfig.Sniffer.Save) { Sniffer.Save(ProxyConfig.Sniffer.OutputDescription, e.DataBytes); } }