From a6ff0dd0e3b14e3f7e396a1d5ea125cc2ae9b82f Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Wed, 9 Feb 2022 11:45:48 +0100 Subject: Add few scripts to easily update some IPs lists (#1436) * Add few scripts to easily update some IPs lists Some IPs lists should be updated frequently: try to easy the process. The basic idea is taken from d59fefd0 and a8fe74e5 (for Azure addresses): one specific .c.inc file and one script for each protocol. Add the possibility to don't load a specific list. Rename the old NDPI_PROTOCOL_HOTMAIL id to NDPI_PROTOCOL_MS_OUTLOOK, to identify Hotmail/Outlook/Exchange flows. TODO: ipv6 Remove the 9 addresses associated to BitTorrent: they have been added in e2f21116 but it is not clear why all the traffic to/from these ips should be classified as BitTorrent. * Added quotes * Added quotes Co-authored-by: Luca Deri --- utils/zoom_ip_addresses_download.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 utils/zoom_ip_addresses_download.sh (limited to 'utils/zoom_ip_addresses_download.sh') diff --git a/utils/zoom_ip_addresses_download.sh b/utils/zoom_ip_addresses_download.sh new file mode 100755 index 000000000..b2f04e7fe --- /dev/null +++ b/utils/zoom_ip_addresses_download.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +cd "$(dirname "${0}")" + +DEST=../src/lib/ndpi_zoom_match.c.inc +LIST=/tmp/zoom.list +# https://support.zoom.us/hc/en-us/articles/201362683-Zoom-network-firewall-or-proxy-server-settings +# There are few lists in this page, partially overlapping. Pick the generic one +ORIGIN="https://assets.zoom.us/docs/ipranges/Zoom.txt" + + +echo "(1) Downloading file..." +http_response=$(curl -s -o $LIST -w "%{http_code}" ${ORIGIN}) +if [ "$http_response" != "200" ]; then + echo "Error $http_response: you probably need to update the list url!" + return +fi + +echo "(2) Processing IP addresses..." +./ipaddr2list.py $LIST NDPI_PROTOCOL_ZOOM > $DEST +rm -f $LIST + +echo "(3) ZOOM IPs are available in $DEST" + + + -- cgit v1.2.3