diff --git a/ex3/rep-19.py b/ex3/rep-19.py index 4f4cfbd..199fe47 100644 --- a/ex3/rep-19.py +++ b/ex3/rep-19.py @@ -16,7 +16,8 @@ packets_percentage_proto = ((df_proto['6 · # Packets'].sum() + # Calculate ratio of packets from all other protocols packets_percentage_others = 100 - packets_percentage_proto -print('Percentage of "others" from all protocols: ', round(packets_percentage_others, 2)) +print('Percentage of packets in protocols not belonging to ICMP, TCP, UDP: ', + round(packets_percentage_others, 2)) # Calculate percentage of unique source IPs with 1 (ICMP), 6 (TCP) or 17 (UDP) protocols uIPs_percentage_proto = ((df_proto['6 · # Unique Source IPs'].sum() + @@ -26,7 +27,8 @@ uIPs_percentage_proto = ((df_proto['6 · # Unique Source IPs'].sum() + # Calculate ratio of unique source IPs from all other protocols uIPs_percentage_others = 100 - uIPs_percentage_proto -print('Percentage of "others" from all protocols: ', round(uIPs_percentage_others, 1)) +print('Percentage of unique source IPs in protocols not belonging to ICMP, TCP, UDP: ', + round(uIPs_percentage_others, 1)) # Calculate percentage of unique destination IPs with 1 (ICMP), 6 (TCP) or 17 (UDP) protocols uIPd_percentage_proto = ((df_proto['6 · # Unique Destination IPs'].sum() + @@ -36,4 +38,5 @@ uIPd_percentage_proto = ((df_proto['6 · # Unique Destination IPs'].sum() + # Calculate ratio of unique destination IPs from all other protocols uIPd_percentage_others = 100 - uIPd_percentage_proto -print('Percentage of "others" from all protocols: ', round(uIPd_percentage_others, 1)) +print('Percentage of unique destination IPs in protocols not belonging to ICMP, TCP, UDP: ', + round(uIPd_percentage_others, 1))