You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I' reading packets with dpkt like this:
import dpkt
import pcapkit
from pcapkit.reassembly import IPv4_Reassembly
ipv4_reassembly = IPv4_Reassembly()
f = open(r'test.pcapng','rb')
pcap = dpkt.pcapng.Reader(f)
buffer = []
for timestamp, buf in pcap:
eth = dpkt.ethernet.Ethernet(buf)
if isinstance(eth.data, dpkt.ip.IP):
ip = eth.data
if ip.p == dpkt.ip.IP_PROTO_UDP:
udp = ip.data
frag, defrag = pcapkit.toolkit.dpkt.ipv4_reassembly(eth)
if frag:
buffer = ipv4_reassembly(defrag)
System information
OS Version: [Windows 10]
Python Version: [3.8,7]
Python Implementation: [CPython]
Traceback stack
Run program again with PCAPKIT_DEVMODE=true set to provide the traceback stack.
pcapkit.utilities.exceptions.IntError: Function call expected integral number, NotImplementedType got instead.
During handling of the above exception, another exception occurred:
pcapkit.utilities.exceptions.FragmentError: 'Malformed fragment object: Function call expected integral number, NotImplementedType got instead.'
With
buffer = []
for timestamp, buf in pcap:
eth = dpkt.ethernet.Ethernet(buf)
if isinstance(eth.data, dpkt.ip.IP):
ip = eth.data
if ip.p == dpkt.ip.IP_PROTO_UDP:
udp = ip.data
frag, defrag = pcapkit.toolkit.dpkt.ipv4_reassembly(eth)
if frag:
defrag['num'] = 0
buffer = ipv4_reassembly(defrag)
I got:
Traceback (most recent call last):
File "C:\Program Files\Python38\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "", line 10, in
UnboundLocalError: local variable 'TDL' referenced before assignment
Expected behavior
Defragmented packet(s).
The text was updated successfully, but these errors were encountered:
Describe the bug
I' reading packets with dpkt like this:
System information
Traceback stack
Run program again with
PCAPKIT_DEVMODE=true
set to provide the traceback stack.pcapkit.utilities.exceptions.IntError: Function call expected integral number, NotImplementedType got instead.
During handling of the above exception, another exception occurred:
pcapkit.utilities.exceptions.FragmentError: 'Malformed fragment object: Function call expected integral number, NotImplementedType got instead.'
With
I got:
Traceback (most recent call last):
File "C:\Program Files\Python38\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "", line 10, in
UnboundLocalError: local variable 'TDL' referenced before assignment
Expected behavior
Defragmented packet(s).
The text was updated successfully, but these errors were encountered: