aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2022-02-25 14:26:26 +0100
committerGitHub <noreply@github.com>2022-02-25 14:26:26 +0100
commit8b062295cc76a60e3905c054ce37bd17669464d1 (patch)
treee2fdc3e672881f98e7b91cad7497d7563df38a33 /src
parentf14dcb8344f1cbb1197cdc4f341a6fe4fdcc0cf6 (diff)
Add some scripts to easily update some IPs lists (#1449)
While the lists in a6ff0dd0 and 2f5f445f are somehow provided by the companies themselves (or by some interested parties), these new lists are directly extracted from BGP information, via AS prefixes. *Usually*, these new lists are far more stable than the previous ones. TODO: * add some other ASNs (see `src/lib/ndpi_content_match.c.inc`) * IPv6, as usual :-(
Diffstat (limited to 'src')
-rw-r--r--src/include/ndpi_typedefs.h1
-rw-r--r--src/lib/ndpi_asn_apple.c.inc36
-rw-r--r--src/lib/ndpi_asn_facebook.c.inc74
-rw-r--r--src/lib/ndpi_asn_netflix.c.inc40
-rw-r--r--src/lib/ndpi_asn_teamviewer.c.inc33
-rw-r--r--src/lib/ndpi_asn_telegram.c.inc34
-rw-r--r--src/lib/ndpi_asn_twitter.c.inc60
-rw-r--r--src/lib/ndpi_asn_webex.c.inc51
-rw-r--r--src/lib/ndpi_content_match.c.inc124
-rw-r--r--src/lib/ndpi_main.c16
10 files changed, 350 insertions, 119 deletions
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h
index e19e9f82c..bbd26961c 100644
--- a/src/include/ndpi_typedefs.h
+++ b/src/include/ndpi_typedefs.h
@@ -1402,6 +1402,7 @@ typedef enum
ndpi_dont_load_microsoft_list = (1 << 9),
ndpi_dont_load_google_list = (1 << 10),
ndpi_dont_load_google_cloud_list = (1 << 11),
+ ndpi_dont_load_asn_lists = (1 << 12),
} ndpi_prefs;
typedef struct {
diff --git a/src/lib/ndpi_asn_apple.c.inc b/src/lib/ndpi_asn_apple.c.inc
new file mode 100644
index 000000000..80adb10eb
--- /dev/null
+++ b/src/lib/ndpi_asn_apple.c.inc
@@ -0,0 +1,36 @@
+/*
+ *
+ * This file is generated automatically and part of nDPI
+ *
+ * nDPI is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * nDPI is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with nDPI. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/* ****************************************************** */
+
+
+static ndpi_network ndpi_protocol_apple_protocol_list[] = {
+ { 0x11000000 /* 17.0.0.0/8 */, 8, NDPI_PROTOCOL_APPLE },
+ { 0x39660000 /* 57.102.0.0/15 */, 15, NDPI_PROTOCOL_APPLE },
+ { 0x39700000 /* 57.112.0.0/12 */, 12, NDPI_PROTOCOL_APPLE },
+ { 0x3F5CE000 /* 63.92.224.0/19 */, 19, NDPI_PROTOCOL_APPLE },
+ { 0x41C71600 /* 65.199.22.0/23 */, 23, NDPI_PROTOCOL_APPLE },
+ { 0x8BB28000 /* 139.178.128.0/18 */, 18, NDPI_PROTOCOL_APPLE },
+ { 0x90B20000 /* 144.178.0.0/19 */, 19, NDPI_PROTOCOL_APPLE },
+ { 0x90B22000 /* 144.178.32.0/24 */, 24, NDPI_PROTOCOL_APPLE },
+ { 0x90B22400 /* 144.178.36.0/22 */, 22, NDPI_PROTOCOL_APPLE },
+ { 0x90B23000 /* 144.178.48.0/20 */, 20, NDPI_PROTOCOL_APPLE },
+ /* End */
+ { 0x0, 0, 0 }
+};
diff --git a/src/lib/ndpi_asn_facebook.c.inc b/src/lib/ndpi_asn_facebook.c.inc
new file mode 100644
index 000000000..d5719fcb3
--- /dev/null
+++ b/src/lib/ndpi_asn_facebook.c.inc
@@ -0,0 +1,74 @@
+/*
+ *
+ * This file is generated automatically and part of nDPI
+ *
+ * nDPI is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * nDPI is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with nDPI. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/* ****************************************************** */
+
+
+static ndpi_network ndpi_protocol_facebook_protocol_list[] = {
+ { 0x1F0D1800 /* 31.13.24.0/21 */, 21, NDPI_PROTOCOL_FACEBOOK },
+ { 0x1F0D4000 /* 31.13.64.0/18 */, 18, NDPI_PROTOCOL_FACEBOOK },
+ { 0x2D402800 /* 45.64.40.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
+ { 0x42DC9000 /* 66.220.144.0/20 */, 20, NDPI_PROTOCOL_FACEBOOK },
+ { 0x453FB000 /* 69.63.176.0/20 */, 20, NDPI_PROTOCOL_FACEBOOK },
+ { 0x45ABE000 /* 69.171.224.0/19 */, 19, NDPI_PROTOCOL_FACEBOOK },
+ { 0x4A774C00 /* 74.119.76.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
+ { 0x66846000 /* 102.132.96.0/20 */, 20, NDPI_PROTOCOL_FACEBOOK },
+ { 0x66847000 /* 102.132.112.0/21 */, 21, NDPI_PROTOCOL_FACEBOOK },
+ { 0x66847800 /* 102.132.120.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
+ { 0x66847A00 /* 102.132.122.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
+ { 0x66847C00 /* 102.132.124.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
+ { 0x66DDBC00 /* 102.221.188.0/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
+ { 0x66DDBF00 /* 102.221.191.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
+ { 0x67046000 /* 103.4.96.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
+ { 0x81860000 /* 129.134.0.0/17 */, 17, NDPI_PROTOCOL_FACEBOOK },
+ { 0x81868000 /* 129.134.128.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
+ { 0x81868200 /* 129.134.130.0/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
+ { 0x81868400 /* 129.134.132.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
+ { 0x81868700 /* 129.134.135.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
+ { 0x81868800 /* 129.134.136.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
+ { 0x81868C00 /* 129.134.140.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
+ { 0x81868F00 /* 129.134.143.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
+ { 0x81869000 /* 129.134.144.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
+ { 0x81869300 /* 129.134.147.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
+ { 0x81869400 /* 129.134.148.0/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
+ { 0x81869600 /* 129.134.150.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
+ { 0x81869A00 /* 129.134.154.0/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
+ { 0x81869C00 /* 129.134.156.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
+ { 0x8186A000 /* 129.134.160.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
+ { 0x8186A300 /* 129.134.163.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
+ { 0x8186A400 /* 129.134.164.0/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
+ { 0x8186AA00 /* 129.134.170.0/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
+ { 0x9DF00000 /* 157.240.0.0/17 */, 17, NDPI_PROTOCOL_FACEBOOK },
+ { 0x9DF08000 /* 157.240.128.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
+ { 0x9DF09E00 /* 157.240.158.0/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
+ { 0x9DF0AC00 /* 157.240.172.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
+ { 0x9DF0AE00 /* 157.240.174.0/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
+ { 0x9DF0B000 /* 157.240.176.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
+ { 0x9DF0B400 /* 157.240.180.0/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
+ { 0x9DF0C000 /* 157.240.192.0/18 */, 18, NDPI_PROTOCOL_FACEBOOK },
+ { 0xA3728000 /* 163.114.128.0/20 */, 20, NDPI_PROTOCOL_FACEBOOK },
+ { 0xADFC4000 /* 173.252.64.0/18 */, 18, NDPI_PROTOCOL_FACEBOOK },
+ { 0xB33CC000 /* 179.60.192.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
+ { 0xB93CD800 /* 185.60.216.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
+ { 0xB959DA00 /* 185.89.218.0/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
+ { 0xC7C94000 /* 199.201.64.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
+ { 0xCC0F1400 /* 204.15.20.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
+ /* End */
+ { 0x0, 0, 0 }
+};
diff --git a/src/lib/ndpi_asn_netflix.c.inc b/src/lib/ndpi_asn_netflix.c.inc
new file mode 100644
index 000000000..d68b994f4
--- /dev/null
+++ b/src/lib/ndpi_asn_netflix.c.inc
@@ -0,0 +1,40 @@
+/*
+ *
+ * This file is generated automatically and part of nDPI
+ *
+ * nDPI is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * nDPI is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with nDPI. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/* ****************************************************** */
+
+
+static ndpi_network ndpi_protocol_netflix_protocol_list[] = {
+ { 0x17F60000 /* 23.246.0.0/18 */, 18, NDPI_PROTOCOL_NETFLIX },
+ { 0x254DB800 /* 37.77.184.0/21 */, 21, NDPI_PROTOCOL_NETFLIX },
+ { 0x2D390000 /* 45.57.0.0/17 */, 17, NDPI_PROTOCOL_NETFLIX },
+ { 0x40788000 /* 64.120.128.0/17 */, 17, NDPI_PROTOCOL_NETFLIX },
+ { 0x42C58000 /* 66.197.128.0/17 */, 17, NDPI_PROTOCOL_NETFLIX },
+ { 0x4535E000 /* 69.53.224.0/19 */, 19, NDPI_PROTOCOL_NETFLIX },
+ { 0x6CAF2000 /* 108.175.32.0/20 */, 20, NDPI_PROTOCOL_NETFLIX },
+ { 0xB902DC00 /* 185.2.220.0/22 */, 22, NDPI_PROTOCOL_NETFLIX },
+ { 0xB909BC00 /* 185.9.188.0/22 */, 22, NDPI_PROTOCOL_NETFLIX },
+ { 0xC0AD4000 /* 192.173.64.0/18 */, 18, NDPI_PROTOCOL_NETFLIX },
+ { 0xC6266000 /* 198.38.96.0/19 */, 19, NDPI_PROTOCOL_NETFLIX },
+ { 0xC62D3000 /* 198.45.48.0/20 */, 20, NDPI_PROTOCOL_NETFLIX },
+ { 0xCF2D4800 /* 207.45.72.0/22 */, 22, NDPI_PROTOCOL_NETFLIX },
+ { 0xD04B4C00 /* 208.75.76.0/22 */, 22, NDPI_PROTOCOL_NETFLIX },
+ /* End */
+ { 0x0, 0, 0 }
+};
diff --git a/src/lib/ndpi_asn_teamviewer.c.inc b/src/lib/ndpi_asn_teamviewer.c.inc
new file mode 100644
index 000000000..630619413
--- /dev/null
+++ b/src/lib/ndpi_asn_teamviewer.c.inc
@@ -0,0 +1,33 @@
+/*
+ *
+ * This file is generated automatically and part of nDPI
+ *
+ * nDPI is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * nDPI is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with nDPI. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/* ****************************************************** */
+
+
+static ndpi_network ndpi_protocol_teamviewer_protocol_list[] = {
+ { 0x2D936C00 /* 45.147.108.0/22 */, 22, NDPI_PROTOCOL_TEAMVIEWER },
+ { 0xB9BC2000 /* 185.188.32.0/22 */, 22, NDPI_PROTOCOL_TEAMVIEWER },
+ { 0xB9F51C00 /* 185.245.28.0/23 */, 23, NDPI_PROTOCOL_TEAMVIEWER },
+ { 0xB9F51E00 /* 185.245.30.0/24 */, 24, NDPI_PROTOCOL_TEAMVIEWER },
+ { 0xC120E100 /* 193.32.225.0/24 */, 24, NDPI_PROTOCOL_TEAMVIEWER },
+ { 0xC120E200 /* 193.32.226.0/23 */, 23, NDPI_PROTOCOL_TEAMVIEWER },
+ { 0xC13A6400 /* 193.58.100.0/23 */, 23, NDPI_PROTOCOL_TEAMVIEWER },
+ /* End */
+ { 0x0, 0, 0 }
+};
diff --git a/src/lib/ndpi_asn_telegram.c.inc b/src/lib/ndpi_asn_telegram.c.inc
new file mode 100644
index 000000000..ed375805e
--- /dev/null
+++ b/src/lib/ndpi_asn_telegram.c.inc
@@ -0,0 +1,34 @@
+/*
+ *
+ * This file is generated automatically and part of nDPI
+ *
+ * nDPI is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * nDPI is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with nDPI. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/* ****************************************************** */
+
+
+static ndpi_network ndpi_protocol_telegram_protocol_list[] = {
+ { 0x5B69C000 /* 91.105.192.0/23 */, 23, NDPI_PROTOCOL_TELEGRAM },
+ { 0x5B6C0400 /* 91.108.4.0/22 */, 22, NDPI_PROTOCOL_TELEGRAM },
+ { 0x5B6C0800 /* 91.108.8.0/21 */, 21, NDPI_PROTOCOL_TELEGRAM },
+ { 0x5B6C1000 /* 91.108.16.0/21 */, 21, NDPI_PROTOCOL_TELEGRAM },
+ { 0x5B6C3800 /* 91.108.56.0/22 */, 22, NDPI_PROTOCOL_TELEGRAM },
+ { 0x5FA14000 /* 95.161.64.0/20 */, 20, NDPI_PROTOCOL_TELEGRAM },
+ { 0x959AA000 /* 149.154.160.0/20 */, 20, NDPI_PROTOCOL_TELEGRAM },
+ { 0xB94C9700 /* 185.76.151.0/24 */, 24, NDPI_PROTOCOL_TELEGRAM },
+ /* End */
+ { 0x0, 0, 0 }
+};
diff --git a/src/lib/ndpi_asn_twitter.c.inc b/src/lib/ndpi_asn_twitter.c.inc
new file mode 100644
index 000000000..c0b5c6222
--- /dev/null
+++ b/src/lib/ndpi_asn_twitter.c.inc
@@ -0,0 +1,60 @@
+/*
+ *
+ * This file is generated automatically and part of nDPI
+ *
+ * nDPI is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * nDPI is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with nDPI. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/* ****************************************************** */
+
+
+static ndpi_network ndpi_protocol_twitter_protocol_list[] = {
+ { 0x0819C200 /* 8.25.194.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
+ { 0x0819C400 /* 8.25.196.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
+ { 0x403F0000 /* 64.63.0.0/18 */, 18, NDPI_PROTOCOL_TWITTER },
+ { 0x450C3800 /* 69.12.56.0/21 */, 21, NDPI_PROTOCOL_TWITTER },
+ { 0x45C3A000 /* 69.195.160.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
+ { 0x45C3A200 /* 69.195.162.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
+ { 0x45C3A400 /* 69.195.164.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
+ { 0x45C3A600 /* 69.195.166.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
+ { 0x45C3A800 /* 69.195.168.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
+ { 0x45C3AB00 /* 69.195.171.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
+ { 0x45C3AC00 /* 69.195.172.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
+ { 0x45C3AE00 /* 69.195.174.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
+ { 0x45C3B000 /* 69.195.176.0/20 */, 20, NDPI_PROTOCOL_TWITTER },
+ { 0x67FC7000 /* 103.252.112.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
+ { 0x68F42800 /* 104.244.40.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
+ { 0x68F42A00 /* 104.244.42.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
+ { 0x68F42C00 /* 104.244.44.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
+ { 0xB92D0400 /* 185.45.4.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
+ { 0xBC40E000 /* 188.64.224.0/21 */, 21, NDPI_PROTOCOL_TWITTER },
+ { 0xC02C4500 /* 192.44.69.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
+ { 0xC030EC00 /* 192.48.236.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
+ { 0xC0854C00 /* 192.133.76.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
+ { 0xC7109C00 /* 199.16.156.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
+ { 0xC73B9400 /* 199.59.148.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
+ { 0xC7603800 /* 199.96.56.0/21 */, 21, NDPI_PROTOCOL_TWITTER },
+ { 0xCAA08000 /* 202.160.128.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
+ { 0xD1EDC000 /* 209.237.192.0/21 */, 21, NDPI_PROTOCOL_TWITTER },
+ { 0xD1EDC800 /* 209.237.200.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
+ { 0xD1EDCC00 /* 209.237.204.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
+ { 0xD1EDCE00 /* 209.237.206.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
+ { 0xD1EDD000 /* 209.237.208.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
+ { 0xD1EDD400 /* 209.237.212.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
+ { 0xD1EDD600 /* 209.237.214.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
+ { 0xD1EDD800 /* 209.237.216.0/21 */, 21, NDPI_PROTOCOL_TWITTER },
+ /* End */
+ { 0x0, 0, 0 }
+};
diff --git a/src/lib/ndpi_asn_webex.c.inc b/src/lib/ndpi_asn_webex.c.inc
new file mode 100644
index 000000000..0f947c011
--- /dev/null
+++ b/src/lib/ndpi_asn_webex.c.inc
@@ -0,0 +1,51 @@
+/*
+ *
+ * This file is generated automatically and part of nDPI
+ *
+ * nDPI is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * nDPI is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with nDPI. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/* ****************************************************** */
+
+
+static ndpi_network ndpi_protocol_webex_protocol_list[] = {
+ { 0x17590000 /* 23.89.0.0/17 */, 17, NDPI_PROTOCOL_WEBEX },
+ { 0x17598000 /* 23.89.128.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
+ { 0x1759A000 /* 23.89.160.0/20 */, 20, NDPI_PROTOCOL_WEBEX },
+ { 0x1759B000 /* 23.89.176.0/21 */, 21, NDPI_PROTOCOL_WEBEX },
+ { 0x1759C000 /* 23.89.192.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
+ { 0x3E6DC000 /* 62.109.192.0/18 */, 18, NDPI_PROTOCOL_WEBEX },
+ { 0x40446000 /* 64.68.96.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
+ { 0x4272A000 /* 66.114.160.0/20 */, 20, NDPI_PROTOCOL_WEBEX },
+ { 0x42A32000 /* 66.163.32.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
+ { 0x451AA000 /* 69.26.160.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
+ { 0x721DC000 /* 114.29.192.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
+ { 0x8BB15C00 /* 139.177.92.0/23 */, 23, NDPI_PROTOCOL_WEBEX },
+ { 0x96FD8000 /* 150.253.128.0/17 */, 17, NDPI_PROTOCOL_WEBEX },
+ { 0xAA480000 /* 170.72.0.0/17 */, 17, NDPI_PROTOCOL_WEBEX },
+ { 0xAA488000 /* 170.72.128.0/18 */, 18, NDPI_PROTOCOL_WEBEX },
+ { 0xAA48C000 /* 170.72.192.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
+ { 0xAA858000 /* 170.133.128.0/18 */, 18, NDPI_PROTOCOL_WEBEX },
+ { 0xAD27E000 /* 173.39.224.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
+ { 0xADF30000 /* 173.243.0.0/20 */, 20, NDPI_PROTOCOL_WEBEX },
+ { 0xCFB6A000 /* 207.182.160.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
+ { 0xD0FDFE00 /* 208.253.254.0/24 */, 24, NDPI_PROTOCOL_WEBEX },
+ { 0xD0FE7200 /* 208.254.114.0/24 */, 24, NDPI_PROTOCOL_WEBEX },
+ { 0xD1C5C000 /* 209.197.192.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
+ { 0xD204C000 /* 210.4.192.0/20 */, 20, NDPI_PROTOCOL_WEBEX },
+ { 0xD8978000 /* 216.151.128.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
+ /* End */
+ { 0x0, 0, 0 }
+};
diff --git a/src/lib/ndpi_content_match.c.inc b/src/lib/ndpi_content_match.c.inc
index 06c45ba5a..323d7116e 100644
--- a/src/lib/ndpi_content_match.c.inc
+++ b/src/lib/ndpi_content_match.c.inc
@@ -29,30 +29,9 @@ static ndpi_network host_protocol_list[] = {
{ 0x36C0CA58 /* 54.192.202.88 */, 32, NDPI_PROTOCOL_SOUNDCLOUD },
/*
- Facebook, Inc.
- origin AS32934, AS54115
- */
-
- { 0x1F0D1800 /* 31.13.24.0/21 */, 21, NDPI_PROTOCOL_FACEBOOK },
- { 0x1F0D4000 /* 31.13.64.0/18 */, 18, NDPI_PROTOCOL_FACEBOOK },
- { 0x2D402800 /* 45.64.40.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
- { 0x42DC9000 /* 66.220.144.0/20 */, 20, NDPI_PROTOCOL_FACEBOOK },
- { 0x453FB000 /* 69.63.176.0/20 */, 20, NDPI_PROTOCOL_FACEBOOK },
- { 0x45ABE000 /* 69.171.224.0/19 */, 19, NDPI_PROTOCOL_FACEBOOK },
- { 0x4A774C00 /* 74.119.76.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
- { 0x67046000 /* 103.4.96.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
- { 0x81860000 /* 129.134.0.0/16 */, 16, NDPI_PROTOCOL_FACEBOOK },
- { 0x81CD5E00 /* 129.205.94.0/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
- { 0x9df00000 /* 157.240.0.0/16 */, 16, NDPI_PROTOCOL_FACEBOOK },
- { 0xADFC4000 /* 173.252.64.0/18 */, 18, NDPI_PROTOCOL_FACEBOOK },
- { 0xB33CC000 /* 179.60.192.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
- { 0xB93CD800 /* 185.60.216.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
- { 0xC7C94000 /* 199.201.64.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
- { 0xCC0F1400 /* 204.15.20.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
-
- /*
Instagram, Inc.
- origin AS32934 (instagram-*.fbcdn.net, fna-instagram-*.fbcdn.net)
+ (instagram-*.fbcdn.net, fna-instagram-*.fbcdn.net)
+ TODO: are we able to autogenerate this list (like the other FB IPs)?
*/
{ 0x9DF00225 /* 157.240.2.37/32 */, 32, NDPI_PROTOCOL_INSTAGRAM },
{ 0x9DF00234 /* 157.240.2.52/32 */, 32, NDPI_PROTOCOL_INSTAGRAM },
@@ -513,35 +492,6 @@ static ndpi_network host_protocol_list[] = {
{ 0x9DF0F1AE /* 157.240.241.174/32 */, 32, NDPI_PROTOCOL_INSTAGRAM },
{ 0x9DF0F1C4 /* 157.240.241.196/32 */, 32, NDPI_PROTOCOL_INSTAGRAM },
-
- /*
- Twitter Inc.
- origin AS13414, AS35995
- */
-
- { 0x0819C200 /* 8.25.194.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
- { 0x0819C400 /* 8.25.196.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
- { 0x450C3800 /* 69.12.56.0/21 */, 21, NDPI_PROTOCOL_TWITTER },
- { 0x67FC7000 /* 103.252.112.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
- { 0x68F42800 /* 104.244.40.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
- { 0x68F42900 /* 104.244.41.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
- { 0x68F42A00 /* 104.244.42.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
- { 0x68F42B00 /* 104.244.43.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
- { 0x68F42C00 /* 104.244.44.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
- { 0x68F42D00 /* 104.244.45.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
- { 0x68F42E00 /* 104.244.46.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
- { 0x68F42F00 /* 104.244.47.0/24 */, 24, NDPI_PROTOCOL_TWITTER },
- { 0xB92D0400 /* 185.45.4.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
- { 0xB92D0600 /* 185.45.6.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
- { 0xBC40E000 /* 188.64.224.0/21 */, 21, NDPI_PROTOCOL_TWITTER },
- { 0xC02C4400 /* 192.44.68.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
- { 0xC0854C00 /* 192.133.76.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
- { 0xC7109C00 /* 199.16.156.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
- { 0xC73B9400 /* 199.59.148.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
- { 0xC7453A00 /* 199.69.58.0/23 */, 23, NDPI_PROTOCOL_TWITTER },
- { 0xC7603800 /* 199.96.56.0/21 */, 21, NDPI_PROTOCOL_TWITTER },
- { 0xCAA08000 /* 202.160.128.0/22 */, 22, NDPI_PROTOCOL_TWITTER },
-
/*
WeChat
origin AS132203, AS132591, AS45090
@@ -571,26 +521,6 @@ static ndpi_network host_protocol_list[] = {
{ 0xD0452000 /* 208.69.32.0/21 */, 21, NDPI_PROTOCOL_OPENDNS },
/*
- Netflix Inc. / Netflix Streaming Services Inc.
- origin AS2906, AS55095, AS40027
- */
-
- { 0x17F60000 /* 23.246.0.0/18 */, 18, NDPI_PROTOCOL_NETFLIX },
- { 0x254DB800 /* 37.77.184.0/21 */, 21, NDPI_PROTOCOL_NETFLIX },
- { 0x26487E00 /* 38.72.126.0/24 */, 24, NDPI_PROTOCOL_NETFLIX },
- { 0x2D390000 /* 45.57.0.0/17 */, 17, NDPI_PROTOCOL_NETFLIX },
- { 0x40788000 /* 64.120.128.0/17 */, 17, NDPI_PROTOCOL_NETFLIX },
- { 0x42C58000 /* 66.197.128.0/17 */, 17, NDPI_PROTOCOL_NETFLIX },
- { 0x4535E000 /* 69.53.224.0/19 */, 19, NDPI_PROTOCOL_NETFLIX },
- { 0x6CAF2000 /* 108.175.32.0/20 */, 20, NDPI_PROTOCOL_NETFLIX },
- { 0xB902DC00 /* 185.2.220.0/22 */, 22, NDPI_PROTOCOL_NETFLIX },
- { 0xB909BC00 /* 185.9.188.0/22 */, 22, NDPI_PROTOCOL_NETFLIX },
- { 0xC0AD4000 /* 192.173.64.0/18 */, 18, NDPI_PROTOCOL_NETFLIX },
- { 0xC6266000 /* 198.38.96.0/19 */, 19, NDPI_PROTOCOL_NETFLIX },
- { 0xC62D3000 /* 198.45.48.0/20 */, 20, NDPI_PROTOCOL_NETFLIX },
- { 0xD194D687 /* 209.148.214.135/21*/, 21, NDPI_PROTOCOL_NETFLIX },
-
- /*
OCS GO (Orange Cinéma Séries)
*/
@@ -598,8 +528,9 @@ static ndpi_network host_protocol_list[] = {
/* Teamviewer
- AS43304, AS208187, AS208175
- router1.teamviewer.com... router16.teamviewer.com */
+ router1.teamviewer.com... router16.teamviewer.com
+ TODO: are we able to autogenerate this list (like the other Teamviewer IPs)?
+ */
{ 0x25FCE044 /* 37.252.224.68 */, 30, NDPI_PROTOCOL_TEAMVIEWER },
{ 0x25FCE048 /* 37.252.224.72 */, 30, NDPI_PROTOCOL_TEAMVIEWER },
{ 0x25FCE04C /* 37.252.224.76 */, 31, NDPI_PROTOCOL_TEAMVIEWER },
@@ -672,8 +603,6 @@ static ndpi_network host_protocol_list[] = {
{ 0xB2FF9BBC /* 178.255.155.188 */, 31, NDPI_PROTOCOL_TEAMVIEWER },
{ 0xB2FF9BBE /* 178.255.155.190 */, 32, NDPI_PROTOCOL_TEAMVIEWER },
{ 0xB86B0EA8 /* 184.107.14.168 */, 29, NDPI_PROTOCOL_TEAMVIEWER },
- { 0xB9BC2000 /* 185.188.32.0 */, 22, NDPI_PROTOCOL_TEAMVIEWER },
- { 0xB9F51C00 /* 185.245.28.0 */, 22, NDPI_PROTOCOL_TEAMVIEWER },
{ 0xBC414C84 /* 188.65.76.132 */, 30, NDPI_PROTOCOL_TEAMVIEWER },
{ 0xBC414C88 /* 188.65.76.136 */, 30, NDPI_PROTOCOL_TEAMVIEWER },
{ 0xBC414C8C /* 188.65.76.140 */, 31, NDPI_PROTOCOL_TEAMVIEWER },
@@ -722,8 +651,6 @@ static ndpi_network host_protocol_list[] = {
{ 0xBCACFE88 /* 188.172.254.136 */, 30, NDPI_PROTOCOL_TEAMVIEWER },
{ 0xBCACFE8C /* 188.172.254.140 */, 31, NDPI_PROTOCOL_TEAMVIEWER },
{ 0xC0AF7958 /* 192.175.121.88 */, 29, NDPI_PROTOCOL_TEAMVIEWER },
- { 0xC120E000 /* 193.32.224.0 */, 22, NDPI_PROTOCOL_TEAMVIEWER },
- { 0xC13A6400 /* 193.58.100.0 */, 22, NDPI_PROTOCOL_TEAMVIEWER },
{ 0xD5E3A264 /* 213.227.162.100 */, 30, NDPI_PROTOCOL_TEAMVIEWER },
{ 0xD5E3A268 /* 213.227.162.104 */, 29, NDPI_PROTOCOL_TEAMVIEWER },
{ 0xD5E3A270 /* 213.227.162.112 */, 29, NDPI_PROTOCOL_TEAMVIEWER },
@@ -791,23 +718,6 @@ static ndpi_network host_protocol_list[] = {
{ 0xADC70000 /* 173.199.0.0 */, 18, NDPI_PROTOCOL_CITRIX },
/*
- Cisco Webex LLC
- origin AS13445
- */
-
- { 0x0819C000 /* 8.25.192.0/24 */, 24, NDPI_PROTOCOL_WEBEX },
- { 0x3E6DC000 /* 62.109.192.0/18 */, 18, NDPI_PROTOCOL_WEBEX },
- { 0x40446000 /* 64.68.96.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
- { 0x4272A000 /* 66.114.160.0/20 */, 20, NDPI_PROTOCOL_WEBEX },
- { 0x42A32000 /* 66.163.32.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
- { 0x721DC000 /* 114.29.192.0/19 */, 19, NDPI_PROTOCOL_WEBEX },
- { 0xADF30000 /* 173.243.0.0/20 */, 20, NDPI_PROTOCOL_WEBEX },
- { 0xCFB6A000 /* 207.182.160.0/19*/, 19, NDPI_PROTOCOL_WEBEX },
- { 0xD0085100 /* 208.8.81.0/24 */, 24, NDPI_PROTOCOL_WEBEX },
- { 0xD1C5C000 /* 209.197.192.0/19*/, 19, NDPI_PROTOCOL_WEBEX },
- { 0xD204C000 /* 210.4.192.0/20 */, 20, NDPI_PROTOCOL_WEBEX },
-
- /*
Viber Media S.à r.l.
https://whois.arin.net/rest/nets;q=AWS-VIBER-MEDIA?showDetails=true&showARIN=false&showNonArinTopLevelNet=false&ext=netref2
*/
@@ -831,17 +741,6 @@ static ndpi_network host_protocol_list[] = {
{ 0x36E8FB90 /* 54.232.251.144/28 */, 28, NDPI_PROTOCOL_VIBER },
/*
- Apple Inc.
- origin AS714, AS6185
- */
-
- { 0x11000000 /* 17.0.0.0/8 */, 8 , NDPI_PROTOCOL_APPLE },
- { 0xC0233200 /* 192.35.50.0/24 */, 24, NDPI_PROTOCOL_APPLE },
- { 0xC6B71000 /* 198.183.16.0/24 */, 24, NDPI_PROTOCOL_APPLE },
- { 0xC6B71100 /* 198.183.17.0/24 */, 24, NDPI_PROTOCOL_APPLE },
- { 0xCDB4AF00 /* 205.180.175.0/24 */, 24, NDPI_PROTOCOL_APPLE },
-
- /*
Dropbox, Inc.
origin AS19679
*/
@@ -887,19 +786,6 @@ static ndpi_network host_protocol_list[] = {
{ 0xB97DBC00 /* 185.125.188.0/22 */, 22, NDPI_PROTOCOL_UBUNTUONE },
/*
- Telegram Messenger LLP
- origin: AS62041, AS62014, AS59930
- */
-
- { 0x5B6C0400 /* 91.108.4.0/22 */, 22, NDPI_PROTOCOL_TELEGRAM },
- { 0x5B6C0800 /* 91.108.8.0/22 */, 22, NDPI_PROTOCOL_TELEGRAM },
- { 0x5B6C0C00 /* 91.108.12.0/22 */, 22, NDPI_PROTOCOL_TELEGRAM },
- { 0x5B6C1000 /* 91.108.16.0/22 */, 22, NDPI_PROTOCOL_TELEGRAM },
- { 0x5B6C1400 /* 91.108.20.0/22 */, 22, NDPI_PROTOCOL_TELEGRAM },
- { 0x5B6C3800 /* 91.108.56.0/22 */, 22, NDPI_PROTOCOL_TELEGRAM },
- { 0x959AA000 /* 149.154.160.0/20*/, 20, NDPI_PROTOCOL_TELEGRAM },
-
- /*
Twitch Interactive Inc.
origin AS46489
*/
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index c0a871cc5..335cccba2 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -63,6 +63,13 @@
#include "ndpi_ms_skype_teams_match.c.inc"
#include "ndpi_google_match.c.inc"
#include "ndpi_google_cloud_match.c.inc"
+#include "ndpi_asn_telegram.c.inc"
+#include "ndpi_asn_apple.c.inc"
+#include "ndpi_asn_twitter.c.inc"
+#include "ndpi_asn_netflix.c.inc"
+#include "ndpi_asn_webex.c.inc"
+#include "ndpi_asn_teamviewer.c.inc"
+#include "ndpi_asn_facebook.c.inc"
/* Third party libraries */
#include "third_party/include/ndpi_patricia.h"
@@ -2427,6 +2434,15 @@ struct ndpi_detection_module_struct *ndpi_init_detection_module(ndpi_init_prefs
ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->protocols_ptree, ndpi_protocol_google_protocol_list);
if(!(prefs & ndpi_dont_load_google_cloud_list))
ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->protocols_ptree, ndpi_protocol_google_cloud_protocol_list);
+ if(!(prefs & ndpi_dont_load_asn_lists)) {
+ ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->protocols_ptree, ndpi_protocol_telegram_protocol_list);
+ ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->protocols_ptree, ndpi_protocol_apple_protocol_list);
+ ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->protocols_ptree, ndpi_protocol_twitter_protocol_list);
+ ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->protocols_ptree, ndpi_protocol_netflix_protocol_list);
+ ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->protocols_ptree, ndpi_protocol_webex_protocol_list);
+ ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->protocols_ptree, ndpi_protocol_teamviewer_protocol_list);
+ ndpi_init_ptree_ipv4(ndpi_str, ndpi_str->protocols_ptree, ndpi_protocol_facebook_protocol_list);
+ }
}
ndpi_str->ip_risk_mask_ptree = ndpi_patricia_new(32 /* IPv4 */);