0

我正在尝试打开 Tshark 进程并开始捕获,但我的进程启动并立即关闭,所以我的 pcap 文件大小为零,我不知道为什么。

string path = "-i 1 -s 65535 -w \\192.168.0.1\captures\myFile.pcap";";
public string _tshark = @"C:\Program Files (x86)\Wireshark\tshark.exe";


        public void startCapture(string path)
        {
            ProcessStartInfo ps = new ProcessStartInfo();
            ps.FileName = _tshark;
            ps.CreateNoWindow = true;
            ps.WindowStyle = ProcessWindowStyle.Hidden;
            ps.UseShellExecute = false;
            ps.CreateNoWindow = true; 
            ps.Arguments = path;
            Process process = new Process();
            process.StartInfo = ps;
            process.Start();

        }
4

0 回答 0