* Fix if network_behavior_field doesn't exist in packet

pull/564/head
Dermott, Scott 2022-04-07 15:10:15 +01:00
parent f73b961330
commit 7f5174efd5
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ class JoeParser():
if network.get(protocol):
for packet in network[protocol]['packet']:
timestamp = datetime.strptime(self.parse_timestamp(packet['timestamp']), '%b %d, %Y %H:%M:%S.%f')
connections[tuple(packet[field] for field in network_behavior_fields)][protocol].add(timestamp)
connections[tuple(packet.get(field) for field in network_behavior_fields)][protocol].add(timestamp)
for connection, data in connections.items():
attributes = self.prefetch_attributes_data(connection)
if len(data.keys()) == len(set(protocols[protocol] for protocol in data.keys())):