使用jdivert(windivert的java绑定)捕获出站数据包后出现异常

zzlelutf  于 2021-06-29  发布在  Java
关注(0)|答案(0)|浏览(290)

我试着用jdivert捕捉网络塔菲(https://github.com/ffalcinelli/jdivert)每当我试图打开手柄时:

public static void main(String[] args) throws WinDivertException {
        WinDivert w = new WinDivert("outbound");
        w.open(); //exception there

        Packet packet = w.recv();
        System.out.println(packet);

        w.close(); 
    }

它引发异常:

Exception in thread "main" WinDivertException{code=5, message='null'}
    at com.github.ffalcinelli.jdivert.exceptions.WinDivertException.throwExceptionOnGetLastError(WinDivertException.java:57)
    at com.github.ffalcinelli.jdivert.WinDivert.open(WinDivert.java:112)
    at pl.alpaq.lab.packets.TestClass.main(TestClass.java:11)

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题