Open seanachao opened 2 years ago
I have the same problem :(
same problem but happened on sniff method
Same problem here when reading a capture with FileCapture
gays, I know how to deal with this. call the function named set_debug ,then you could see what's the problem in console. my problem is that my wireshark is break. when I install it again , problem gone . good luck !
You need version correspondence me : Wireshark-win64-2.4.2/ pyshark==0.4.2.7 This error will also occur if you illegally block and intercept good luck!
Is there any mapping for Wireshark-Version / pyshark_version compatibility?
same question. It turns out that the pcap file was appears to have been cut short in the middle of a packet.
. This should not cause a crash, pyshark should just ignore the notice.
Same issue, need support in handling this error "appears to have been cut short in the middle of a packet"
gays, I know how to deal with this. call the function named set_debug ,then you could see what's the problem in console. my problem is that my wireshark is break. when I install it again , problem gone . good luck !
does this mean you reinstalled wireshark and the issue is fixed after that?
gays, I know how to deal with this. call the function named set_debug ,then you could see what's the problem in console. my problem is that my wireshark is break. when I install it again , problem gone . good luck !
does this mean you reinstalled wireshark and the issue is fixed after that?
yes
gays, I know how to deal with this. call the function named set_debug ,then you could see what's the problem in console. my problem is that my wireshark is break. when I install it again , problem gone . good luck !
does this mean you reinstalled wireshark and the issue is fixed after that?
but U should call the function first ,and get what's the problem with you.
Hello everybody, I think I have found a solution for this.
MY SITUATION:
I am logging something with "tcpdump" in the background of a Ubuntu server. After some time I was stopping the tcpdump with "sudo kill -SIGKILL
Then I was copying the pcap file onto a Windows Machine and manipulate it with pyshark
This was cutting the package while it was written and made the tshark tool from pyshark call to crash. I should have had an uncorrupted pcap file for pyshark to read.
I did this by stopping the tcpdump process from the Ubuntu background with "sudo kill -SIGINT
I hope this helps.
When you got an error like "have been cut short in the middle of a packet", if you want to preserve the parsing results of the cap , you can modify pyshark\capture\capture.py, starting at line 378, Try to ignore this exception, as in my code below:
`if "cut short in the middle of a packet" in self._last_error_line:
self._log.debug(f"err: {self._last_error_line}")
# return
else:
raise TSharkCrashException........`
Same problem when i use tshark to read FileCapture.
I find a solution in the tshark website and it's useful for me.
You can try to use "reordercap" to fix your packets. Here is usage:
reordercap your_source.pcap temp.pcap
However, I don not know if "reordercap" will have any effect on the packets. So be careful.
Here is the webpage of tshark: https://tshark.dev/share/pcap_preparation/
my code example1
there was wrong
but if I use code example2
there not any wrong , what should I do my example1 could work normal?