I am following Pcap.net tutorials from its wiki on github. I tried to run code from here:
https://github.com/PcapDotNet/Pcap.Net/wiki/Pcap.Net-Tutorial-Handling-offline-dump-files
I didn't understand the following part:
if (args.Length != 1)
{
Console.WriteLine("usage: " + Environment.GetCommandLineArgs()[0] + " <filename>");
return;
}
But I run this code and Bingo, nothings happen (no output).
I tried to figure out and found that args
has the value "0".
I comment return
command and it start working fine till I got IndexOutOfBound
exception here:
using (PacketDumpFile dumpFile = communicator.OpenDump(args[0]))
Did I missed any thing?