Hi,
I working on a .NET app to help analyze pcap files. I am trying to figure out how to launch Wireshark and pass it the pcap data via standard in. Here is what I tried:
Process process = new Process(); process.StartInfo.FileName = @"C:\Program Files\Wireshark\wireshark.exe"; process.StartInfo.Arguments = "-k -i -"; process.StartInfo.UseShellExecute = false; process.StartInfo.RedirectStandardInput = true; process.Start();
stream.Write(packetArray, 0, packetArray.Length); // packetArray is byte array of raw packet data, including pcap header, etc.
process.Close()
Wireshark starts just fine, but it does not read what I send to stdin (in the status bar, it says, "Waiting for capture data...")
Any help on this would be great!
Thanks,
JB
|