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

Closed
adolia opened this Issue Dec 7, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@adolia

adolia commented Dec 7, 2017

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.

@adolia adolia changed the title from Faild to read pcap file on Centos7 to Faild to read pcap file using PcapReader Dec 7, 2017

@adolia

This comment has been minimized.

adolia commented Dec 7, 2017

Sorry, I've found the issue.
I need to use from scapy.all import PcapReader instead of from scapy.utils import PcapReader.
It's strange but, I think some modules do not initialized in this case.
Issue from original scapy
So, I'm closing the issue.

@adolia adolia closed this Dec 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment