The capture file appears to have been cut short in the middle of a packet - how to prevent this error?

末鹿安然 提交于 2019-12-05 18:42:38

Try stopping the capture process with ctrl+c instead of killing the process.

Also, you can try using pcapfix to fix your corrupted packets, it may help making your existing files readable again.

If this is on UN*X, if you kill the process with kill -INTpid, then that will look just like a Ctrl+C. I'm not sure there's an equivalent on Windows.

I know this post is old, but in case anyone else runs across this:

The OP is probably running something like this:

tshark > capture.cap

And then killing it with CTRL+C. This will corrupt the file.

Instead of redirecting the output, use the -w option:

tshark -w capture.cap

Then you can kill it with CTRL+C and shouldn't have any corruption issues.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!