0

我正在构建应用程序,该应用程序开始使用命令行通过 Tshark 进行捕获,并且我正在寻找在启动 Tshark 进程后计算所有接收到的数据包的选项这是我启动该进程的函数:

int _interfaceNumber;
string _pcapPath;


    Process tshark = new Process();
    tshark.StartInfo.FileName = _tshark;
    tshark.StartInfo.Arguments = string.Format(" -i " + _interfaceNumber + " -V -x -s " + _packetLimitSize + " -w " + _pcapPath);
    tshark.StartInfo.RedirectStandardOutput = true;
    tshark.StartInfo.UseShellExecute = false;
    tshark.StartInfo.CreateNoWindow = true;
    tshark.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
    tshark.Start();

也许有人有想法?

4

0 回答 0