-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faild to read pcap file using PcapReader #226
Comments
Sorry, I've found the issue. |
Thanks for posting solution! |
Today with the most recent version this issue is still present. |
Can we reopen this? The solution isn't really a solution at all, it's just a workaround. This seems more like a bug to me. |
Please, @big-o add details on python version you execute with. |
Running the latest version of Kamene installed via pip (0.32 I believe) |
I have tested on the latest version from github with python 3.8, and I cannot repeat your issue. Of course, there is a difference that I use |
Just tested using version from pip, too. At least on Linux, python 3.8.10, cannot repeat. |
@big-o Please, post your code and your error message. |
... however importing from
|
Should have added, running on Ubuntu 20.04.3 LTS |
For all typical use cases you should use |
So I understand that there's a workaround, but my point is that it's just a workaround and not a solution. I'm new to kamene and just had a quick look through the code before trying it. I reasonably assumed that if the same thing is available in multiple modules then it shouldn't matter where I import it from, and that it would be more pythonic to import it from where it is defined (explicit is better than implicit). I had to go looking through GitHub issues to figure out why my code didn't work; maybe other new users would not do this and just give up. So I would flip the question around: why does kamene allow |
Basically, for any standard usage you import all from |
Adding some color here -- I run some tests on pcap files using Python in both Linux and Windows. I noticed |
Hi!
In case when I try to read pcap file on Centos7 or Ubuntu host I got an error:
WARNING: RawPcapReader: unknown LL type [1]/[0x1]. Using Raw packets
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/scapy/utils.py", line 829, in read_packet
p = self.reader.LLclsi
TypeError: 'NoneType' object is not callable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 2, in
File "/usr/lib/python3.4/site-packages/scapy/utils.py", line 817, in next
pkt = self.read_packet()
File "/usr/lib/python3.4/site-packages/scapy/utils.py", line 835, in read_packet
p = conf.raw_layer(s)
TypeError: 'NoneType' object is not callable
with PcapReader('/home/alex/pcaps/1512559393.pcap') as in_pcap:
... for pkt in in_pcap:
... ip = pkt.getlayer(1)
Any idea what is the issue there?
Thanks in advance.
The text was updated successfully, but these errors were encountered: