mirror of https://github.com/MISP/misp-modules
fix: Avoiding dictionary indexes issues
- Using tuples as a dictionary indexes is better than using generators...pull/304/head
parent
0d5f867825
commit
54f5fa6fa9
|
@ -91,7 +91,7 @@ class JoeParser():
|
|||
connections = defaultdict(list)
|
||||
for packet in network[protocol]['packet']:
|
||||
timestamp = self.parse_timestamp(packet['timestamp'])
|
||||
connections[(packet[field] for field in fields)].append(datetime.strptime(timestamp, '%B %d, %Y %H:%M:%S.%f'))
|
||||
connections[tuple(packet[field] for field in fields)].append(datetime.strptime(timestamp, '%B %d, %Y %H:%M:%S.%f'))
|
||||
for connection, timestamps in connections.items():
|
||||
network_connection_object = MISPObject('network-connection')
|
||||
for field, value in zip(fields, connection):
|
||||
|
|
Loading…
Reference in New Issue