История изменений
Исправление ados, (текущая версия) :
In [1]: import pcapy
In [4]: import subprocess
In [6]: subprocess.call(["pacman", "-Qo", pcapy.__file__])
/usr/lib/python3.10/site-packages/pcapy.cpython-310-x86_64-linux-gnu.so is owned by python-pcapy 1.0.7-1
Out[6]: 0
In [9]: pcap_file = '/tmp/p.pcap'
In [10]: reader = pcapy.open_offline(pcap_file)
In [11]: reader.dispatch(-1, lambda hdr, data: print(hdr.caplen()))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
TypeError: <lambda>() missing 2 required positional arguments: 'hdr' and 'data'
The above exception was the direct cause of the following exception:
SystemError Traceback (most recent call last)
<ipython-input-11-c10b6d091522> in <module>
----> 1 reader.dispatch(-1, lambda hdr, data: print(hdr.caplen()))
SystemError: <built-in method dispatch of Reader object at 0x7eff27916610> returned a result with an exception set
Исходная версия ados, :
In [1]: import pcapy
In [2]: pcapy.__package__
Out[2]: ''
In [3]: pcapy.__file__
Out[3]: '/usr/lib/python3.10/site-packages/pcapy.cpython-310-x86_64-linux-gnu.so'
In [4]: import subprocess
In [6]: subprocess.call(["pacman", "-Qo", pcapy.__file__])
/usr/lib/python3.10/site-packages/pcapy.cpython-310-x86_64-linux-gnu.so is owned by python-pcapy 1.0.7-1
Out[6]: 0
In [9]: pcap_file = '/tmp/p.pcap'
In [10]: reader = pcapy.open_offline(pcap_file)
In [11]: reader.dispatch(-1, lambda hdr, data: print(hdr.caplen()))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
TypeError: <lambda>() missing 2 required positional arguments: 'hdr' and 'data'
The above exception was the direct cause of the following exception:
SystemError Traceback (most recent call last)
<ipython-input-11-c10b6d091522> in <module>
----> 1 reader.dispatch(-1, lambda hdr, data: print(hdr.caplen()))
SystemError: <built-in method dispatch of Reader object at 0x7eff27916610> returned a result with an exception set