Jan-14-2020, 08:35 AM
I make a project where user gives a query string for example " ( (ip.src==10.74.45.110 && ip.dst==239.255.255.255) || ip.proto == 17 ) && eth.addr==6c:dd:30:d6:45:f1)"
where all eth.addr, ip.src, ip.dst and ip.proto are field names, and I want to extract all those packets which satisfy above conditions.
But I'm not sure how to write parser for this, is python have any such split function which can do this?
my data structure looks like
where all eth.addr, ip.src, ip.dst and ip.proto are field names, and I want to extract all those packets which satisfy above conditions.
But I'm not sure how to write parser for this, is python have any such split function which can do this?
my data structure looks like
1 2 3 4 5 6 |
{packet_number_1,{ 'field_name1' : value 1 , 'field_name2' : value 2 }, packet_number_2,{ 'field_name1' : value 1 , 'field_name2' : value 2 } packet_number_3,{ 'field_name1' : value 1 , 'field_name2' : value 2 } packet_number_4,{ 'field_name1' : value 1 , 'field_name2' : value 2 } packet_number_5,{ 'field_name1' : value 1 , 'field_name2' : value 2 } packet_number_6,{ 'field_name1' : value 1 , 'field_name2' : value 2 }} |