Closed bitkeks closed 2 years ago
@j-licht could you please try e43980f in your setup?
@bitkeks works for me
Thanks for testing! I'll include this fix in the next version/release.
@j-licht could you please try again with commit 5adde00 ?
I've get this, maybe only python 3.8 related error:
Traceback (most recent call last):
File "./main.py", line 20, in <module>
export = netflow.parse_packet(binascii.unhexlify(pkt.packet.payload.payload.payload), templates[pkt.packet.payload.src])
File "/home/nas/.local/lib/python3.8/site-packages/netflow/utils.py", line 57, in parse_packet
return V9ExportPacket(data, templates["netflow"])
File "/home/nas/.local/lib/python3.8/site-packages/netflow/v9.py", line 503, in __init__
otfs = V9OptionsTemplateFlowSet(data[offset:])
File "/home/nas/.local/lib/python3.8/site-packages/netflow/v9.py", line 326, in __init__
for scope_counter in range(option_scope_length / 4): # example: option_scope_length = 4 means one scope
TypeError: 'float' object cannot be interpreted as an integer
Could you solve this? It's because it uses /
(giving a float) instead of //
As noted in #29, options templates and options data records are missing a correct implementation. The current workaround is a for flowsets with ID 1, which is always the Options Template Flowset. The mixing might lead to errors, therefore correct handling is needed
cc @j-licht