Compare commits
277
Commits
4.2-stable
...
4.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c5258b19d | ||
|
|
175f863665 | ||
|
|
c019946f60 | ||
|
|
7645909460 | ||
|
|
52d987b603 | ||
|
|
f4a1739f9c | ||
|
|
388dfb8e13 | ||
|
|
7fa8d882d8 | ||
|
|
461589517e | ||
|
|
e7a5eaecde | ||
|
|
8ff2860601 | ||
|
|
b3ab66020f | ||
|
|
b3d3e3b210 | ||
|
|
4ff8aa48b2 | ||
|
|
5aa3d9126f | ||
|
|
4445989588 | ||
|
|
a1de0285eb | ||
|
|
75f7da5c26 | ||
|
|
192a32207c | ||
|
|
a74fc089c4 | ||
|
|
faaff58620 | ||
|
|
50c0212df1 | ||
|
|
b5fb2066cb | ||
|
|
422d002542 | ||
|
|
eed47acfc8 | ||
|
|
77ac58e553 | ||
|
|
060e894d5b | ||
|
|
fdb1649a49 | ||
|
|
5fe6087686 | ||
|
|
5f6fa6d164 | ||
|
|
69ccb39741 | ||
|
|
f2d1edbedf | ||
|
|
1a01e8dc68 | ||
|
|
5ca82ad84b | ||
|
|
59b00b00a7 | ||
|
|
7c5c811eb0 | ||
|
|
008a1790e4 | ||
|
|
bb72aa4767 | ||
|
|
8f6a006e36 | ||
|
|
6cf7838295 | ||
|
|
c96f4512fa | ||
|
|
5f1caeb54e | ||
|
|
d393fb969d | ||
|
|
227ab5c105 | ||
|
|
4296ec969a | ||
|
|
b2b61011ae | ||
|
|
ab09b8ce2e | ||
|
|
c287eb835b | ||
|
|
6cd8f8cc6d | ||
|
|
432de5eb57 | ||
|
|
9c8b2d63da | ||
|
|
20a29c393f | ||
|
|
c43360f8e6 | ||
|
|
c73a0988cd | ||
|
|
e2cc08bfe5 | ||
|
|
d1773cc8e3 | ||
|
|
bdf54d725b | ||
|
|
8dcaa5c0e1 | ||
|
|
defe7d7f79 | ||
|
|
831562c141 | ||
|
|
7a172ce11e | ||
|
|
cf5873ffd7 | ||
|
|
32428026d6 | ||
|
|
df0ff9bcbd | ||
|
|
341f58fd80 | ||
|
|
11babc7ea3 | ||
|
|
bb3c2e82de | ||
|
|
938e89ca33 | ||
|
|
df78e67518 | ||
|
|
0b3f8ed849 | ||
|
|
1d492c9ed8 | ||
|
|
59c084b166 | ||
|
|
2202365b95 | ||
|
|
b6ae9642d3 | ||
|
|
7419cfee64 | ||
|
|
338427d712 | ||
|
|
ff8e1e197e | ||
|
|
09fbe0a64a | ||
|
|
6149c0f880 | ||
|
|
4ff1bf29df | ||
|
|
eac11030ac | ||
|
|
00c62a7c3c | ||
|
|
d8d806c79f | ||
|
|
9040bc74c9 | ||
|
|
354addd693 | ||
|
|
b306a4b8ed | ||
|
|
b3bf695723 | ||
|
|
00ee364a7e | ||
|
|
ca115774c9 | ||
|
|
912b69af60 | ||
|
|
34ede63c15 | ||
|
|
48065d80e9 | ||
|
|
32750271c3 | ||
|
|
c4f50b2cda | ||
|
|
3b825fca6d | ||
|
|
897f8314b2 | ||
|
|
1da9f1a36f | ||
|
|
f25deeccb1 | ||
|
|
a9d7cc4841 | ||
|
|
9c1a53f39f | ||
|
|
406ac81a37 | ||
|
|
dfbe863f4e | ||
|
|
1093aafa5f | ||
|
|
6b7b23b01d | ||
|
|
33f9729ee4 | ||
|
|
cfd23e8819 | ||
|
|
77dc884a4c | ||
|
|
7e3d061428 | ||
|
|
6d543808ad | ||
|
|
02ba12b0de | ||
|
|
f81f0c5e69 | ||
|
|
cedbd32030 | ||
|
|
1645fea85c | ||
|
|
78dfe959cb | ||
|
|
9614b66b44 | ||
|
|
7010d17ccc | ||
|
|
83e1ea2506 | ||
|
|
0c703ef8eb | ||
|
|
4f9dee164e | ||
|
|
2560260a41 | ||
|
|
8b750686c9 | ||
|
|
dae7986a37 | ||
|
|
3c08a3c875 | ||
|
|
7162bf6abf | ||
|
|
f822aad8b0 | ||
|
|
054d151373 | ||
|
|
704920414a | ||
|
|
6fc29b3ae8 | ||
|
|
915ffebade | ||
|
|
4319d760e0 | ||
|
|
34882d9cf0 | ||
|
|
b2648a45a3 | ||
|
|
87f93ea4fd | ||
|
|
2e0dedbaae | ||
|
|
434c38c74d | ||
|
|
5996cf1725 | ||
|
|
81a367f1ae | ||
|
|
5dcb9c1c16 | ||
|
|
d5b922cfe4 | ||
|
|
65dd052a61 | ||
|
|
47d6a65522 | ||
|
|
c8f72ef764 | ||
|
|
02d0b5fe13 | ||
|
|
e4318ffc2d | ||
|
|
71636dcafd | ||
|
|
10161448bc | ||
|
|
3ad989f6a8 | ||
|
|
3d755fce73 | ||
|
|
a7c1152397 | ||
|
|
e8d81123cc | ||
|
|
d5005f584c | ||
|
|
bc2ad3407a | ||
|
|
075bce5f3d | ||
|
|
ac0f50b561 | ||
|
|
9d31b7450b | ||
|
|
d5ae9170ba | ||
|
|
824c343602 | ||
|
|
42909673ce | ||
|
|
ddc256b09e | ||
|
|
c1d46ebc4e | ||
|
|
dbf2fb8c9f | ||
|
|
a83ca555fb | ||
|
|
fa79f07d15 | ||
|
|
739dfc54b0 | ||
|
|
8b2c9860be | ||
|
|
9c8a3f270a | ||
|
|
fba75a3cf5 | ||
|
|
c3df3a12aa | ||
|
|
4775be3d85 | ||
|
|
e00997ea7c | ||
|
|
939572c61e | ||
|
|
06a0abb6fd | ||
|
|
e3faecf9de | ||
|
|
713cdd0b13 | ||
|
|
9537788ade | ||
|
|
ff993e2f57 | ||
|
|
a6e2f4a15a | ||
|
|
19019383f0 | ||
|
|
e0e231756c | ||
|
|
8080b3d14f | ||
|
|
9f3a6f131b | ||
|
|
32a7d42469 | ||
|
|
6eb5bd88a7 | ||
|
|
a75d77b536 | ||
|
|
61bc9815d5 | ||
|
|
8238e68275 | ||
|
|
1e8cdd893c | ||
|
|
0ff3e77c42 | ||
|
|
6677d692c4 | ||
|
|
98a548c642 | ||
|
|
46dc8b5bda | ||
|
|
4e199abd39 | ||
|
|
6bcba118d4 | ||
|
|
6acf7a6abe | ||
|
|
ec80f1fb3b | ||
|
|
4896dabb6b | ||
|
|
d668ab4bec | ||
|
|
856d7d2916 | ||
|
|
aeb5f1f947 | ||
|
|
af1d20bca1 | ||
|
|
26df1403e6 | ||
|
|
bb12837ca7 | ||
|
|
c7059db84a | ||
|
|
1207ea118a | ||
|
|
c47d710d8e | ||
|
|
beef4f997b | ||
|
|
93f723d50f | ||
|
|
8dd70b7023 | ||
|
|
9e22c88e0a | ||
|
|
b83e9f20e7 | ||
|
|
7aee856aa0 | ||
|
|
f646a4bce0 | ||
|
|
74ae315e36 | ||
|
|
269be6c7ef | ||
|
|
f91218360b | ||
|
|
a1451935b8 | ||
|
|
c345b3c7af | ||
|
|
438f04066b | ||
|
|
a173d3e98f | ||
|
|
95a3d4fffe | ||
|
|
cb62dfd249 | ||
|
|
e23507d3e9 | ||
|
|
6f431057c5 | ||
|
|
e8559a4127 | ||
|
|
6c4df21238 | ||
|
|
4da1453d90 | ||
|
|
736a80f9ce | ||
|
|
7a7e4ee69f | ||
|
|
1a8a6aa161 | ||
|
|
e193f3713d | ||
|
|
c390085f91 | ||
|
|
00d9a16b6a | ||
|
|
61a3c2eb5b | ||
|
|
8b062295cc | ||
|
|
f14dcb8344 | ||
|
|
34e020ac35 | ||
|
|
16ed0fd3f8 | ||
|
|
d506a0e12f | ||
|
|
96f8942f75 | ||
|
|
279779062c | ||
|
|
fbb9700086 | ||
|
|
6c1accd2bd | ||
|
|
59993e294e | ||
|
|
2f5f445f72 | ||
|
|
75a53ad064 | ||
|
|
f2411958d7 | ||
|
|
f28a3b293e | ||
|
|
a2878af1ee | ||
|
|
8a2a47e62a | ||
|
|
92da30f017 | ||
|
|
c4113ffd7e | ||
|
|
de6905f41b | ||
|
|
023618c13a | ||
|
|
ada7d32c50 | ||
|
|
1431aa3d1c | ||
|
|
5ddbbf4dd2 | ||
|
|
b5eea436ae | ||
|
|
4cf853548c | ||
|
|
f229068fd3 | ||
|
|
a6ff0dd0e3 | ||
|
|
8cc5cb9f76 | ||
|
|
9838ceb7cd | ||
|
|
be5a29ba9d | ||
|
|
922a7be897 | ||
|
|
d59f0327a5 | ||
|
|
ff38d4b980 | ||
|
|
79968f3245 | ||
|
|
f5035521e8 | ||
|
|
c40496eaac | ||
|
|
7aef27f85e | ||
|
|
0dd5ac89f8 | ||
|
|
6975f265ec | ||
|
|
ae09e7fb14 | ||
|
|
a96d7eb180 | ||
|
|
37ff626e78 | ||
|
|
cd3d720ae3 | ||
|
|
46bd093934 |
@@ -0,0 +1,4 @@
|
||||
# Codige Code Review ignore
|
||||
|
||||
# Prevent Codiga complaining about Sphinx config.py
|
||||
doc/conf.py
|
||||
@@ -21,7 +21,7 @@ A clear and concise description of what happening.
|
||||
* OS version: [e.g. 18.04]
|
||||
* Architecture: [e.g. arm64]
|
||||
* nDPI version or commit hash: [e.g. 4.0-stable or 937357e4bc55610f116f66d15a8e0fc1e260c02c].
|
||||
* nDPI compilation flags used: if you are building from source [e.g. --with-pcre --disable-gcrypt].
|
||||
* nDPI compilation flags used: if you are building from source [e.g. --with-pcre --with-local-libgcrypt].
|
||||
* Attach the `config.log` file generated after `./configure` ran (if you are building from source).
|
||||
|
||||
## How to reproduce the reported bug
|
||||
|
||||
+238
-45
@@ -10,15 +10,166 @@ on:
|
||||
release:
|
||||
types: [created]
|
||||
jobs:
|
||||
coverage:
|
||||
name: Coverage (ubuntu-latest)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install Ubuntu Prerequisites
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev
|
||||
sudo apt-get install rrdtool librrd-dev
|
||||
sudo apt-get install libpcre3-dev libmaxminddb-dev lcov
|
||||
sudo apt-get install wdiff colordiff
|
||||
- name: Configure
|
||||
run: env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-option-checking=fatal --enable-debug-messages --enable-code-coverage --with-pcre --with-maxminddb --enable-tls-sigs
|
||||
- name: Build
|
||||
run: make all
|
||||
- name: Test
|
||||
run: |
|
||||
make check VERBOSE=1
|
||||
- name: Generate Coverage Report
|
||||
run: |
|
||||
mkdir -vp coverage_report/ndpi_coverage_report
|
||||
lcov --directory . --capture --output-file lcov.info
|
||||
genhtml -o coverage_report/ndpi_coverage_report lcov.info
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ndpi-coverage-report
|
||||
path: coverage_report
|
||||
retention-days: 7
|
||||
|
||||
python-bindings:
|
||||
name: Python Bindings (ubuntu-latest)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.9"
|
||||
- name: Install Ubuntu Prerequisites
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev
|
||||
- name: Build nDPI library
|
||||
run: |
|
||||
env CC=gcc CFLAGS='-Werror' ./autogen.sh
|
||||
make
|
||||
sudo make install
|
||||
- name: Generate Python bindings
|
||||
run: |
|
||||
pip install --upgrade pip
|
||||
pip install -r python/requirements.txt
|
||||
cd python
|
||||
python setup.py install
|
||||
cd ..
|
||||
- name: Test Python Bindings
|
||||
run: |
|
||||
cd python
|
||||
python tests.py
|
||||
|
||||
documentation:
|
||||
name: Documentation (ubuntu-latest)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.9"
|
||||
- name: Install Ubuntu Prerequisites
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install autoconf automake libtool pkg-config gettext flex bison doxygen
|
||||
- name: Configure nDPI library
|
||||
run: |
|
||||
./autogen.sh --with-only-libndpi --enable-option-checking=fatal
|
||||
- name: Generate Documentation
|
||||
run: |
|
||||
pip install --upgrade pip
|
||||
pip install -r doc/requirements.txt
|
||||
make doc
|
||||
mkdir -vp doc/_build/ndpi-documentation-upload/ndpi-documentation
|
||||
mv -v doc/_build/html doc/_build/ndpi-documentation-upload/ndpi-documentation/html
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ndpi-documentation
|
||||
path: doc/_build/ndpi-documentation-upload
|
||||
retention-days: 7
|
||||
|
||||
performance:
|
||||
name: Performance (ubuntu-latest)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install Ubuntu Prerequisites
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install autoconf automake libtool pkg-config gettext flex bison libpcap-dev
|
||||
sudo apt-get install golang-1.16-go libgoogle-perftools-dev graphviz
|
||||
env GO111MODULE=on go install github.com/google/pprof@latest
|
||||
sudo ln -s ${HOME}/go/bin/pprof /usr/bin/pprof
|
||||
pprof -h
|
||||
- name: Configure nDPI library
|
||||
run: |
|
||||
./autogen.sh --enable-gprof --enable-option-checking=fatal --with-pcre --with-maxminddb --enable-tls-sigs
|
||||
- name: Build nDPI library
|
||||
run: |
|
||||
make
|
||||
- name: Performance Profiling
|
||||
run: |
|
||||
./tests/do.sh
|
||||
mkdir ndpi-performance-upload
|
||||
mv -v tests/result/cpu_profile.png ndpi-performance-upload/cpu_profile.png
|
||||
mv -v tests/result/heap_profile.png ndpi-performance-upload/heap_profile.png
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ndpi-performance
|
||||
path: ndpi-performance-upload
|
||||
retention-days: 7
|
||||
|
||||
test-scripts:
|
||||
name: Test Utils (ubuntu-latest)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install Ubuntu Prerequisites
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install python3-netaddr git
|
||||
- name: Run Scripts
|
||||
run: |
|
||||
echo 'Running ./utils/bitcoinnodes.sh'
|
||||
./utils/bitcoinnodes.sh >/dev/null
|
||||
echo 'Running ./utils/get_routes_by_asn.sh AS714'
|
||||
./utils/get_routes_by_asn.sh AS714 >/dev/null
|
||||
echo 'Running ./utils/update_every_lists.sh'
|
||||
./utils/update_every_lists.sh
|
||||
echo 'Checking for changes in the git tree..'
|
||||
git update-index --refresh || echo "::warning file=utils/update_every_lists.sh::Please re-run utils/update_every_lists.sh and commit any changes."
|
||||
git diff-index --quiet HEAD -- || true
|
||||
|
||||
test:
|
||||
name: ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.gcrypt }} ${{ matrix.compiler }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} ${{ matrix.msan }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false # Debugging purposes, switch to true when all issues on big endian is solved
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os: ["ubuntu-latest", "ubuntu-18.04", "macOS-latest", "macos-11"]
|
||||
os: ["ubuntu-latest", "ubuntu-18.04", "macOS-latest", "macos-11", "windows-latest"]
|
||||
arch: ["x86_64"]
|
||||
gcrypt: ["--disable-gcrypt", ""]
|
||||
gcrypt: ["--with-local-libgcrypt", ""]
|
||||
compiler: ["default-cc"]
|
||||
pcre: [""]
|
||||
maxminddb: [""]
|
||||
@@ -59,6 +210,13 @@ jobs:
|
||||
pcre: "--with-pcre"
|
||||
maxminddb: "--with-maxminddb"
|
||||
msan: "--with-sanitizer"
|
||||
- compiler: "default-cc"
|
||||
os: ubuntu-latest
|
||||
arch: "x86_64"
|
||||
gcrypt: ""
|
||||
pcre: "--with-pcre"
|
||||
maxminddb: "--with-maxminddb"
|
||||
msan: "--with-thread-sanitizer"
|
||||
- compiler: "default-cc"
|
||||
os: ubuntu-18.04
|
||||
arch: "x86_64"
|
||||
@@ -118,7 +276,7 @@ jobs:
|
||||
sudo apt-get install doxygen python3-sphinx python3-sphinx-rtd-theme python3-breathe python3-pip
|
||||
sudo apt-get install rrdtool librrd-dev
|
||||
- name: Install Ubuntu Prerequisites (libgcrypt)
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.gcrypt, '--disable-gcrypt')
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.gcrypt, '--with-local-libgcrypt')
|
||||
run: |
|
||||
sudo apt-get install libgcrypt20-dev
|
||||
- name: Install Ubuntu Prerequisites (libpcre)
|
||||
@@ -137,14 +295,38 @@ jobs:
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'clang')
|
||||
run: |
|
||||
sudo apt-get install ${{ matrix.compiler }}
|
||||
- name: Install Windows prerequisites
|
||||
if: startsWith(matrix.os, 'windows')
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW64
|
||||
update: true
|
||||
install: git mingw-w64-x86_64-toolchain automake1.16 automake-wrapper autoconf libtool make mingw-w64-x86_64-json-c mingw-w64-x86_64-crt-git mingw-w64-x86_64-pcre mingw-w64-x86_64-libpcap
|
||||
- name: Setup Windows prerequisites (libgcrypt)
|
||||
if: startsWith(matrix.os, 'windows') && startsWith(matrix.gcrypt, '--with-local-libgcrypt')
|
||||
run: |
|
||||
msys2 -c 'git clone --branch libgpg-error-1.42 https://github.com/gpg/libgpg-error'
|
||||
cd libgpg-error
|
||||
msys2 -c './autogen.sh'
|
||||
msys2 -c './configure -enable-maintainer-mode --enable-static --enable-shared --with-pic --disable-doc --disable-nls'
|
||||
msys2 -c 'make'
|
||||
msys2 -c 'make install'
|
||||
msys2 -c 'cd ..'
|
||||
msys2 -c 'rm -rf libgpg-error/'
|
||||
msys2 -c 'git clone --branch libgcrypt-1.8.8 https://github.com/gpg/libgcrypt'
|
||||
cd libgcrypt
|
||||
msys2 -c './autogen.sh'
|
||||
msys2 -c './configure -enable-maintainer-mode --enable-static --enable-shared --with-pic --disable-doc'
|
||||
msys2 -c 'make'
|
||||
msys2 -c 'make install'
|
||||
msys2 -c 'cd ..'
|
||||
msys2 -c 'rm -rf libgcrypt/'
|
||||
- name: Installing MacOS prerequisites
|
||||
if: startsWith(matrix.os, 'macOS') && startsWith(matrix.arch, 'x86_64')
|
||||
run: |
|
||||
brew install autoconf automake libtool pkg-config gettext json-c
|
||||
brew install coreutils
|
||||
brew install rrdtool
|
||||
brew install coreutils wdiff colordiff autoconf automake libtool pkg-config gettext json-c rrdtool
|
||||
- name: Install MacOS Prerequisites (libgcrypt)
|
||||
if: startsWith(matrix.os, 'macOS') && startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.gcrypt, '--disable-gcrypt')
|
||||
if: startsWith(matrix.os, 'macOS') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.gcrypt, '--with-local-libgcrypt')
|
||||
run: |
|
||||
brew install libgcrypt
|
||||
- name: Install MacOS Prerequisites (libpcre)
|
||||
@@ -158,60 +340,73 @@ jobs:
|
||||
- name: Configure nDPI on Ubuntu
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'default-cc')
|
||||
run: |
|
||||
env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }}
|
||||
env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-option-checking=fatal --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} --enable-tls-sigs
|
||||
- name: Configure nDPI on MacOS
|
||||
if: startsWith(matrix.os, 'macOS') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'default-cc')
|
||||
run: |
|
||||
env CC=clang CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }}
|
||||
env CC=clang CFLAGS='-Werror' ./autogen.sh --enable-option-checking=fatal --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} --enable-tls-sigs
|
||||
- name: Configure nDPI on Windows
|
||||
if: startsWith(matrix.os, 'windows') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'default-cc')
|
||||
run: |
|
||||
msys2 -c 'env CFLAGS=\"-Werror\" ./autogen.sh --enable-option-checking=fatal --enable-debug-messages --enable-tls-sigs --disable-npcap ${{ matrix.gcrypt }}'
|
||||
- name: Build nDPI on Windows
|
||||
if: startsWith(matrix.os, 'windows') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'default-cc')
|
||||
run: |
|
||||
msys2 -c 'make all'
|
||||
msys2 -c 'ldd ./example/ndpiReader.exe'
|
||||
- name: Configure nDPI with specified GCC version on Ubuntu
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'gcc')
|
||||
run: |
|
||||
env CC=${{ matrix.compiler }} CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }}
|
||||
env CC=${{ matrix.compiler }} CFLAGS='-Werror' ./autogen.sh --enable-option-checking=fatal --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} --enable-tls-sigs
|
||||
- name: Configure nDPI with specified CLANG on Ubuntu
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'clang')
|
||||
run: |
|
||||
env CC=${{ matrix.compiler }} CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }}
|
||||
env CC=${{ matrix.compiler }} CFLAGS='-Werror' ./autogen.sh --enable-option-checking=fatal --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} --enable-tls-sigs
|
||||
- name: Build nDPI
|
||||
if: startsWith(matrix.arch, 'x86_64')
|
||||
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows')
|
||||
run: |
|
||||
make all
|
||||
make -C example ndpiSimpleIntegration
|
||||
make -C rrdtool
|
||||
make -C python
|
||||
- name: Install nDPI
|
||||
if: startsWith(matrix.arch, 'x86_64')
|
||||
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows')
|
||||
run: |
|
||||
make install DESTDIR=$(realpath _install)
|
||||
ls -alhHR _install
|
||||
- name: Test nDPI [DIFF]
|
||||
if: startsWith(matrix.arch, 'x86_64')
|
||||
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows')
|
||||
run: |
|
||||
./tests/do.sh
|
||||
- name: Test nDPI [UNIT]
|
||||
if: startsWith(matrix.arch, 'x86_64')
|
||||
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows')
|
||||
run: |
|
||||
./tests/do-unit.sh
|
||||
- name: Test nDPI [DGA]
|
||||
if: startsWith(matrix.arch, 'x86_64')
|
||||
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows')
|
||||
run: |
|
||||
./tests/do-dga.sh
|
||||
- name: Generate tarball
|
||||
- name: Test nDPI [DIFF] (runs only on windows jobs)
|
||||
if: startsWith(matrix.arch, 'x86_64') && startsWith(matrix.os, 'windows')
|
||||
run: |
|
||||
msys2 -c './tests/do.sh'
|
||||
- name: Test nDPI [UNIT] (runs only on windows jobs)
|
||||
if: startsWith(matrix.arch, 'x86_64') && startsWith(matrix.os, 'windows')
|
||||
run: |
|
||||
msys2 -c './tests/do-unit.sh'
|
||||
- name: Test nDPI [DGA] (runs only on windows jobs)
|
||||
if: startsWith(matrix.arch, 'x86_64') && startsWith(matrix.os, 'windows')
|
||||
run: |
|
||||
msys2 -c './tests/do-dga.sh'
|
||||
- name: Generate/Verify tarball
|
||||
if: startsWith(matrix.os, 'ubuntu-latest') && startsWith(matrix.arch, 'x86_64')
|
||||
run: |
|
||||
make dist
|
||||
- name: Generate documentation
|
||||
if: startsWith(matrix.os, 'ubuntu-latest') && startsWith(matrix.arch, 'x86_64')
|
||||
run: |
|
||||
pip3 install --user sphinxcontrib.swaggerdoc
|
||||
make -C doc text
|
||||
make -C doc html
|
||||
- name: Configure nDPI [Mingw-w64] (runs only on ubuntu jobs)
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64')
|
||||
run: |
|
||||
make distclean && ./autogen.sh --host=x86_64-w64-mingw32 ${{ matrix.gcrypt }} ${{ matrix.pcre }} ${{ matrix.maxminddb }}
|
||||
./utils/verify_dist_tarball.sh
|
||||
- name: Build nDPI [Mingw-w64] (runs only on ubuntu jobs)
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64')
|
||||
run: |
|
||||
make distclean
|
||||
env CFLAGS='-Werror' ./autogen.sh --enable-option-checking=fatal --enable-debug-messages --enable-tls-sigs --host=x86_64-w64-mingw32
|
||||
make all
|
||||
- name: Display qemu specified architecture (arm64 - little endian)
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'arm64')
|
||||
@@ -229,14 +424,13 @@ jobs:
|
||||
args: >
|
||||
bash -c
|
||||
"apt-get -y update &&
|
||||
apt-get -y install git autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev libgcrypt20-dev libpcre3-dev libmaxminddb-dev rrdtool librrd-dev &&
|
||||
env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} &&
|
||||
apt-get -y install git wdiff colordiff autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev libgcrypt20-dev libpcre3-dev libmaxminddb-dev rrdtool librrd-dev &&
|
||||
git config --global --add safe.directory $(realpath .) &&
|
||||
env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-option-checking=fatal --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} --enable-tls-sigs &&
|
||||
make all &&
|
||||
make -C example ndpiSimpleIntegration &&
|
||||
make -C rrdtool &&
|
||||
make -C python &&
|
||||
./tests/do.sh &&
|
||||
./tests/do-unit.sh
|
||||
make check VERBOSE=1
|
||||
"
|
||||
- name: Display qemu specified architecture (armhf - little endian)
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'armhf')
|
||||
@@ -254,14 +448,13 @@ jobs:
|
||||
args: >
|
||||
bash -c
|
||||
"apt-get -y update &&
|
||||
apt-get -y install git autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev libgcrypt20-dev libpcre3-dev libmaxminddb-dev rrdtool librrd-dev &&
|
||||
env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} &&
|
||||
apt-get -y install git wdiff colordiff autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev libgcrypt20-dev libpcre3-dev libmaxminddb-dev rrdtool librrd-dev &&
|
||||
git config --global --add safe.directory $(realpath .) &&
|
||||
env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-option-checking=fatal --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} --enable-tls-sigs &&
|
||||
make all &&
|
||||
make -C example ndpiSimpleIntegration &&
|
||||
make -C rrdtool &&
|
||||
make -C python &&
|
||||
./tests/do.sh &&
|
||||
./tests/do-unit.sh
|
||||
make check VERBOSE=1
|
||||
"
|
||||
- name: Display qemu specified architecture (s390x - big endian)
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 's390x')
|
||||
@@ -272,18 +465,18 @@ jobs:
|
||||
"uname -a &&
|
||||
lscpu | grep Endian
|
||||
"
|
||||
- name: Configure and compile (no tests) using qemu for the specified architecture (s390x - big endian)
|
||||
- name: Configure and compile using qemu for the specified architecture (s390x - big endian)
|
||||
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 's390x')
|
||||
uses: docker://multiarch/ubuntu-core:s390x-bionic
|
||||
with: #./tests/do.sh disabled because we know we have some problems with big-endian machines
|
||||
with:
|
||||
args: >
|
||||
bash -c
|
||||
"apt-get -y update &&
|
||||
apt-get -y install git autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev libgcrypt20-dev libpcre3-dev libmaxminddb-dev rrdtool librrd-dev &&
|
||||
env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} &&
|
||||
apt-get -y install git wdiff colordiff autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev libgcrypt20-dev libpcre3-dev libmaxminddb-dev rrdtool librrd-dev &&
|
||||
git config --global --add safe.directory $(realpath .) &&
|
||||
env CC=gcc CFLAGS='-Werror' ./autogen.sh --enable-option-checking=fatal --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} --enable-tls-sigs &&
|
||||
make all &&
|
||||
make -C example ndpiSimpleIntegration &&
|
||||
make -C rrdtool &&
|
||||
make -C python &&
|
||||
./tests/do-unit.sh
|
||||
make check VERBOSE=1
|
||||
"
|
||||
|
||||
+2
-1
@@ -61,7 +61,6 @@ stamp-h1
|
||||
/fuzz/fuzz_ndpi_reader_with_main
|
||||
/fuzz/fuzz_process_packet
|
||||
/fuzz/fuzz_process_packet_with_main
|
||||
/python/Makefile
|
||||
/tests/dga/Makefile
|
||||
/tests/do.sh
|
||||
/tests/unit/Makefile
|
||||
@@ -79,3 +78,5 @@ stamp-h1
|
||||
/rrdtool/rrd_anomaly
|
||||
/rrdtool/rrd_similarity
|
||||
/tests/performance/Makefile
|
||||
/influxdb/Makefile
|
||||
/doc/Doxyfile.cfg
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
/**
|
||||
* @name Suspicious packet->payload based integer arithmetic
|
||||
* @description An arithmetic operation influenced array access is suspicious
|
||||
* if it uses an integer value that is likely to be network-controlled, and
|
||||
* may require a closer manual audit.
|
||||
* @kind problem
|
||||
* @problem.severity warning
|
||||
* @id cpp/packet-payload-integer-arithmetic
|
||||
* @tags audit security
|
||||
*/
|
||||
|
||||
import cpp
|
||||
|
||||
import semmle.code.cpp.dataflow.TaintTracking
|
||||
import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis
|
||||
|
||||
/** A source of an integer value that is likely to come from the network.
|
||||
* This is produced by an invocation of a macro of the form `ntoh*` or `get_u_int*_t`,
|
||||
* called with `packet->payload` as an argument.
|
||||
*/
|
||||
|
||||
class NetworkMacro extends Macro {
|
||||
NetworkMacro() { this.getName().regexpMatch("^ntoh(ll|l|s)") }
|
||||
}
|
||||
|
||||
class NetworkIntegerSource extends Expr {
|
||||
NetworkIntegerSource() {
|
||||
exists(MacroInvocation mi |
|
||||
this = mi.getExpr() and
|
||||
mi.getUnexpandedArgument(0).regexpMatch(".*packet->payload.*") |
|
||||
// catch all get_u_int*_t(x)
|
||||
mi.getMacroName().regexpMatch("^get_u_int(64|32|16|8)_t") and
|
||||
// dedup ntoh*(get_u_int*_t(x)) since we'll catch those in the next case
|
||||
not mi.getOutermostMacroAccess().getMacro() instanceof NetworkMacro
|
||||
or
|
||||
// catch all ntoh*(x) ... this will also catch the nested cases
|
||||
mi.getMacro() instanceof NetworkMacro
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
class ArithmeticOperation extends Operation {
|
||||
ArithmeticOperation() {
|
||||
this instanceof UnaryArithmeticOperation or this instanceof BinaryArithmeticOperation
|
||||
}
|
||||
}
|
||||
|
||||
class NetworkToArrayAccess extends TaintTracking::Configuration {
|
||||
NetworkToArrayAccess() { this = "NetworkToArrayAccess" }
|
||||
|
||||
override predicate isSource(DataFlow::Node source) {
|
||||
source.asExpr() instanceof NetworkIntegerSource
|
||||
}
|
||||
|
||||
override predicate isSink(DataFlow::Node sink) {
|
||||
exists(ArrayExpr ae | sink.asExpr() = ae.getArrayOffset())
|
||||
}
|
||||
}
|
||||
|
||||
class NetworkToArithmetic extends TaintTracking::Configuration {
|
||||
NetworkToArithmetic() { this = "NetworkToArithmetic" }
|
||||
|
||||
override predicate isSource(DataFlow::Node source) {
|
||||
source.asExpr() instanceof NetworkIntegerSource
|
||||
}
|
||||
|
||||
override predicate isSink(DataFlow::Node sink) {
|
||||
exists (Assignment assign |
|
||||
sink.asExpr() = assign.getRValue().(ArithmeticOperation) or
|
||||
sink.asExpr() = assign.(AssignArithmeticOperation)
|
||||
) or
|
||||
exists(LocalVariable var |
|
||||
sink.asExpr() = var.getInitializer().getExpr().(ArithmeticOperation)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// find audit candidates based on suspicious network integer use
|
||||
from NetworkIntegerSource source, Expr sink1, Expr sink2, NetworkToArithmetic config1, NetworkToArrayAccess config2
|
||||
where config1.hasFlow(DataFlow::exprNode(source), DataFlow::exprNode(sink1))
|
||||
// or this if you want integer arithmeric _OR_ array accesses
|
||||
and config2.hasFlow(DataFlow::exprNode(source), DataFlow::exprNode(sink2))
|
||||
select source, "Suspicious use of network integer arithmetic."
|
||||
+19
-1
@@ -8,7 +8,25 @@ endif
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libndpi.pc
|
||||
|
||||
EXTRA_DIST = README.md CHANGELOG.md CONTRIBUTING.md autogen.sh wireshark python windows utils packages example/MacOS doc/api.rst doc/conf.py doc/flow_risks.rst doc/guide/nDPI_QuickStartGuide.pages doc/guide/nDPI_QuickStartGuide.pdf doc/img/logo.png doc/index.rst doc/Makefile doc/what_is_ndpi.rst
|
||||
EXTRA_DIST = README.md README.fuzzer.md CHANGELOG.md CONTRIBUTING.md \
|
||||
autogen.sh wireshark windows utils packages \
|
||||
influxdb/Makefile.in influxdb/metric_anomaly.c influxdb/README.txt \
|
||||
rrdtool/Makefile.in rrdtool/README.txt rrdtool/rrd_anomaly.c rrdtool/rrd_similarity.c \
|
||||
doc/requirements.txt doc/conf.py doc/flow_risks.rst doc/guide/nDPI_QuickStartGuide.pages \
|
||||
doc/guide/nDPI_QuickStartGuide.pdf doc/img/logo.png doc/index.rst \
|
||||
doc/Makefile doc/what_is_ndpi.rst \
|
||||
python/DEV_GUIDE.md python/dev_requirements.txt python/ndpi_example.py python/ndpi/__init__.py \
|
||||
python/ndpi/ndpi_build.py python/ndpi/ndpi.py python/README.md \
|
||||
python/requirements.txt python/setup.py python/tests.py \
|
||||
sonar-project.properties .github .ci-ignore lgtm.yml
|
||||
|
||||
|
||||
.PHONY: doc doc-view
|
||||
doc:
|
||||
make -C doc html
|
||||
|
||||
doc-view:
|
||||
python3 -m http.server --bind 127.0.0.1 --directory doc/_build/html 8080
|
||||
|
||||
changelog:
|
||||
git log --since={`curl -s https://github.com/ntop/ndpi/releases | grep datetime | head -n1 | egrep -o "[0-9]+\-[0-9]+\-[0-9]+"`} --name-only --pretty=format:" - %s" | grep "^ " > CHANGELOG.latest
|
||||
|
||||
@@ -12,44 +12,70 @@ nDPI® is an open source LGPLv3 library for deep-packet inspection. Based on Ope
|
||||
|
||||
### How To Compile nDPI
|
||||
|
||||
In order to compile this library do
|
||||
In order to compile this project do
|
||||
|
||||
- ./autogen.sh
|
||||
- ./configure
|
||||
- make
|
||||
|
||||
To compile the library w/o any tools or tests:
|
||||
|
||||
- ./autogen.sh --with-only-libndpi
|
||||
- make
|
||||
|
||||
To run tests do additionally:
|
||||
|
||||
- cd tests; ./do.sh
|
||||
- ./tests/do.sh # Generate and check for diff's in PCAP files
|
||||
- ./tests/do-unit.sh # Run unit tests
|
||||
- ./tests/do-dga.sh # Run DGA detection test
|
||||
|
||||
Please note that the pre-requisites for compilation include:
|
||||
- GNU tools (autogen, automake, autoconf, libtool)
|
||||
- GNU C compiler (gcc)
|
||||
or run all with: `make check`
|
||||
|
||||
Please note that the (minimal) pre-requisites for compilation include:
|
||||
- GNU tools (autoconf automake libtool pkg-config gettext flex bison)
|
||||
- GNU C compiler (gcc) or Clang
|
||||
|
||||
On Debian/Ubuntu systems do:
|
||||
- sudo apt-get install build-essential git bison flex libpcap-dev libtool libtool-bin autoconf pkg-config automake autogen libjson-c-dev libnuma-dev libgcrypt20-dev libpcre2-dev
|
||||
- sudo apt-get install build-essential git gettext flex bison libtool autoconf automake pkg-config libpcap-dev libjson-c-dev libnuma-dev libpcre2-dev libmaxminddb-dev librrd-dev
|
||||
|
||||
FreeBSD
|
||||
- sudo pkg install gcc git autoconf automake libtool devel/pkgconf json-c gmake
|
||||
On Arch Linux:
|
||||
- sudo pacman -S gcc git gettext flex bison libtool autoconf automake pkg-config libpcap json-c numactl pcre2 libmaxminddb rrdtool
|
||||
|
||||
Remember to use gmake and not make on FreeBSD
|
||||
On FreeBSD:
|
||||
- sudo pkg install gcc git gettext flex bison libtool autoconf automake devel/pkgconf gmake libpcap json-c pcre2 libmaxminddb rrdtool
|
||||
|
||||
Remember to use `gmake` and not `make` on FreeBSD
|
||||
|
||||
On MacOS:
|
||||
- brew install coreutils gcc git gettext flex bison libtool autoconf automake pkg-config libpcap json-c pcre2 libmaxminddb rrdtool
|
||||
|
||||
On Windows (assuming [MSYS2](https://www.msys2.org/) already installed):
|
||||
- msys2 -c "pacman --noconfirm -S --needed --overwrite '\*' git mingw-w64-x86\_64-toolchain automake1.16 automake-wrapper autoconf libtool make mingw-w64-x86\_64-json-c mingw-w64-x86\_64-crt-git mingw-w64-x86\_64-pcre mingw-w64-x86\_64-libpcap"
|
||||
|
||||
### How To Build The Documentation
|
||||
|
||||
- pip install --upgrade pip
|
||||
- pip install -r doc/requirements.txt
|
||||
- make doc
|
||||
|
||||
Use the builtin python3 webserver to view documentation:
|
||||
- make doc-view
|
||||
|
||||
### How To Add A New Protocol Dissector
|
||||
|
||||
The entire procedure of adding new protocols in detail:
|
||||
|
||||
1. Add new protocol together with its unique ID to: src/include/ndpi_protocol_ids.h
|
||||
2. Create a new protocol in: src/lib/protocols/
|
||||
3. Variables to be kept for the duration of the entire flow (as state variables) need to be placed in: src/include/ndpi_typedefs.h in ndpi_flow_tcp_struct (for TCP only), ndpi_flow_udp_struct (for UDP only), or ndpi_flow_struct (for both).
|
||||
4. Add a new entry for the search function for the new protocol in: src/include/ndpi_protocols.h
|
||||
5. Choose (do not change anything) a selection bitmask from: src/include/ndpi_define.h
|
||||
6. Add a new entry in ndpi_set_protocol_detection_bitmask2 in: src/lib/ndpi_main.c
|
||||
7. Set protocol default ports in ndpi_init_protocol_defaults in: src/lib/ndpi_main.c
|
||||
8. ./autogen.sh
|
||||
9. make
|
||||
10. make check
|
||||
1. Add new protocol together with its unique ID to: `src/include/ndpi_protocol_ids.h`
|
||||
2. Create a new protocol in: `src/lib/protocols/`
|
||||
3. Variables to be kept for the duration of the entire flow (as state variables) need to be placed in: `src/include/ndpi_typedefs.h` in `ndpi_flow_tcp_struct` (for TCP only), `ndpi_flow_udp_struct` (for UDP only), or `ndpi_flow_struct` (for both).
|
||||
4. Add a new entry for the search function for the new protocol in: `src/include/ndpi_protocols.h`
|
||||
5. Choose (do not change anything) a selection bitmask from: `src/include/ndpi_define.h`
|
||||
6. Set protocol default ports in `ndpi_init_protocol_defaults` in: `src/lib/ndpi_main.c`
|
||||
7. `./autogen.sh`
|
||||
8. `make`
|
||||
9. `make check`
|
||||
|
||||
### How to use nDPI to Block Selected Traffic
|
||||
|
||||
You can use nDPI to selectively block selected Internet traffic by embedding it onto an application (remember that nDPI is just a library). Both [ntopng](https://github.com/ntop/ntopng) and [nProbe cento](http://www.ntop.org/products/netflow/nprobe-cento/) can do this.
|
||||
|
||||
### nDPI Paper Citation
|
||||
@@ -57,9 +83,12 @@ You can use nDPI to selectively block selected Internet traffic by embedding it
|
||||
- Deri, Luca, et al. [nDPI: Open-source high-speed deep packet inspection](http://luca.ntop.org/nDPI.pdf) 2014 International Wireless Communications and Mobile Computing Conference (IWCMC). IEEE, 2014.
|
||||
|
||||
### nDPI-Related Projects
|
||||
|
||||
- [nfstream](https://github.com/aouinizied/nfstream)
|
||||
- [nDPId](https://github.com/utoni/nDPId)
|
||||
|
||||
### DISCLAIMER
|
||||
|
||||
While we do our best to detect network protocols, we cannot guarantee that our software is error free and 100% accurate in protocol detection. Please make sure that you respect the privacy of users and you have proper authorization to listen, capture and inspect network traffic.
|
||||
|
||||
nDPI is a registered trademark in the US and EU.
|
||||
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
Prerequisites for Compilation
|
||||
-----------------------------
|
||||
|
||||
Prerequisites
|
||||
- GNU autotools/libtool
|
||||
- libpcap or PF_RING (optional but recommended)
|
||||
- apt-get install libjson-c-dev (for JSON support)
|
||||
- libgcrypt20-dev (for QUIC support)
|
||||
|
||||
On Ubuntu/Debian
|
||||
- apt-get install build-essential
|
||||
- apt-get install git autoconf automake autogen libpcap-dev libtool libgcrypt20-dev
|
||||
|
||||
On Fedora/CentOS
|
||||
- yum groupinstall "Development tools"
|
||||
- yum install git autoconf automake autogen libpcap-devel libtool libgcrypt-devel
|
||||
|
||||
On MacOSX (using http://brew.sh)
|
||||
brew install autoconf automake libtool git libgcrypt
|
||||
|
||||
On FreeBSD
|
||||
- pkg install autoconf automake libtool gmake git libgcrypt
|
||||
+11
-5
@@ -8,32 +8,38 @@ LIBTOOL=$(command -v libtool)
|
||||
LIBTOOLIZE=$(command -v libtoolize)
|
||||
AUTORECONF=$(command -v autoreconf)
|
||||
PKG_CONFIG=$(command -v pkg-config)
|
||||
MAKE=$(command -v make)
|
||||
|
||||
if test -z $AUTOCONF; then
|
||||
if test -z "${AUTOCONF}"; then
|
||||
echo "autoconf is missing: please install it and try again"
|
||||
exit
|
||||
fi
|
||||
|
||||
if test -z $AUTOMAKE; then
|
||||
if test -z "${AUTOMAKE}"; then
|
||||
echo "automake is missing: please install it and try again"
|
||||
exit
|
||||
fi
|
||||
|
||||
if test -z $LIBTOOL && test -z $LIBTOOLIZE ; then
|
||||
if test -z "${LIBTOOL}" && test -z "${LIBTOOLIZE}"; then
|
||||
echo "libtool and libtoolize is missing: please install it and try again"
|
||||
exit
|
||||
fi
|
||||
|
||||
if test -z $AUTORECONF; then
|
||||
if test -z "${AUTORECONF}"; then
|
||||
echo "autoreconf is missing: please install it and try again"
|
||||
exit
|
||||
fi
|
||||
|
||||
if test -z $PKG_CONFIG; then
|
||||
if test -z "${PKG_CONFIG}"; then
|
||||
echo "pkg-config is missing: please install it (apt-get install pkg-config) and try again"
|
||||
exit
|
||||
fi
|
||||
|
||||
if test -z "${MAKE}"; then
|
||||
echo "make is missing; please install it (apt-get install make) and try again"
|
||||
exit
|
||||
fi
|
||||
|
||||
autoreconf -ivf
|
||||
|
||||
echo "./configure $@"
|
||||
|
||||
+97
-39
@@ -1,4 +1,4 @@
|
||||
AC_INIT([libndpi], [4.1.0])
|
||||
AC_INIT([libndpi],[4.4.0])
|
||||
|
||||
AC_CONFIG_AUX_DIR([.])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
@@ -7,36 +7,64 @@ AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
|
||||
AC_PREFIX_DEFAULT(/usr)
|
||||
|
||||
EXTRA_TARGETS="example tests tests/unit tests/dga"
|
||||
EXTRA_TARGETS="example tests tests/dga"
|
||||
AC_ARG_WITH(only-libndpi, AS_HELP_STRING([--with-only-libndpi], [Build only libndpi (no examples, tests etc)]))
|
||||
AS_IF([test "${with_only_libndpi+set}" = set],[
|
||||
EXTRA_TARGETS=""
|
||||
])
|
||||
|
||||
AC_ARG_WITH(sanitizer, AS_HELP_STRING([--with-sanitizer], [Build with support for address, undefined and leak sanitizer]))
|
||||
AC_ARG_WITH(thread-sanitizer, AS_HELP_STRING([--with-thread-sanitizer], [Build with support for thread sanitizer]))
|
||||
AC_ARG_ENABLE(fuzztargets, AS_HELP_STRING([--enable-fuzztargets], [Enable fuzz targets]),[enable_fuzztargets=$enableval],[enable_fuzztargets=no])
|
||||
AC_ARG_ENABLE(gprof, AS_HELP_STRING([--enable-gprof], [Enable CPU/HEAP profiling with gperftools]),[enable_gprof=$enableval],[enable_gprof=no])
|
||||
AC_ARG_ENABLE(code-coverage, AS_HELP_STRING([--enable-code-coverage], [Generate Code Coverage report]))
|
||||
AC_ARG_WITH(local-libgcrypt, AS_HELP_STRING([--with-local-libgcrypt], [Build with libgcrypt (if present) instead of the enclosed gcrypt light]))
|
||||
AC_ARG_ENABLE(tls-sigs, AS_HELP_STRING([--enable-tls-sigs], [Enable TLS Client signature algorithm dissection. Rarely used, but requires significantly more memory.]))
|
||||
AC_ARG_ENABLE(npcap, AS_HELP_STRING([--disable-npcap], [msys2 only: Disable linkage against the wpcap/npcap import library in windows/WpdPack/Lib.]))
|
||||
|
||||
AS_IF([test "x$enable_fuzztargets" = "xyes"], [BUILD_FUZZTARGETS=1], [BUILD_FUZZTARGETS=0])
|
||||
AM_CONDITIONAL([BUILD_FUZZTARGETS], [test "x$enable_fuzztargets" = "xyes"])
|
||||
|
||||
AS_IF([test "${with_sanitizer+set}" = set -a "${with_thread_sanitizer+set}" = set],[
|
||||
AC_MSG_ERROR([Configure options `--with-sanitizer' and `--with_thread_sanitizer' can not used at the same time.])
|
||||
])
|
||||
AS_IF([test "${with_sanitizer+set}" = set -o "${with_thread_sanitizer+set}" = set],[
|
||||
CFLAGS="${CFLAGS} -O0 -g3"
|
||||
],[
|
||||
CFLAGS="${CFLAGS} -g"
|
||||
])
|
||||
|
||||
AS_IF([test "${with_sanitizer+set}" = set],[
|
||||
CFLAGS="${CFLAGS} -g3 -O0 -fsanitize=address -fsanitize=undefined -fno-sanitize=alignment -fsanitize=leak -fno-omit-frame-pointer"
|
||||
CFLAGS="${CFLAGS} -fsanitize=address -fsanitize=undefined -fno-sanitize=alignment -fsanitize=leak -fno-omit-frame-pointer"
|
||||
LDFLAGS="${LDFLAGS} -fsanitize=address -fsanitize=undefined -fno-sanitize=alignment -fsanitize=leak"
|
||||
])
|
||||
|
||||
AS_IF([test "${with_thread_sanitizer+set}" = set],[
|
||||
CFLAGS="${CFLAGS} -fsanitize=thread -fno-omit-frame-pointer"
|
||||
LDFLAGS="${LDFLAGS} -fsanitize=thread"
|
||||
])
|
||||
|
||||
AS_IF([test "x${enable_code_coverage}" = "xyes"],[
|
||||
CFLAGS="${CFLAGS} -fprofile-arcs -ftest-coverage"
|
||||
LDFLAGS="${LDFLAGS} --coverage"
|
||||
])
|
||||
|
||||
AS_IF([test "${enable_npcap+set}" = set],[DISABLE_NPCAP=1],[DISABLE_NPCAP=0])
|
||||
|
||||
LT_INIT
|
||||
LT_LIB_M
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
AC_PROG_CC
|
||||
|
||||
SYSTEM=`uname -s`
|
||||
if test $SYSTEM = "Darwin"; then
|
||||
dnl> AC_PROG_CC(clang gcc)
|
||||
AM_PROG_CC_C_O(clang gcc)
|
||||
AC_PROG_CXX(clang++ g++)
|
||||
AC_PROG_CC_STDC(clang gcc)
|
||||
else
|
||||
AC_PROG_CC_C_O
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CC_STDC
|
||||
fi
|
||||
|
||||
dnl> Can't iuse AM_PROG_AR because not all of our Makefiles are automake (yet?)
|
||||
@@ -55,7 +83,7 @@ AC_DEFINE_UNQUOTED(NDPI_PATCH_LEVEL, "${NDPI_PATCH}", [nDPI patch level])
|
||||
|
||||
# .git as directory in a cloned repo
|
||||
# .git as file in submodule based integration
|
||||
if test -d ".git" || test -f ".git" ; then :
|
||||
if test -d ".git" || test -r ".git"; then
|
||||
GIT_TAG=`git log -1 --format=%h`
|
||||
GIT_DATE=`git log -1 --format=%cd`
|
||||
#
|
||||
@@ -75,24 +103,32 @@ else
|
||||
if test -z "$SOURCE_DATE_EPOCH" ; then :
|
||||
SOURCE_DATE_EPOCH=`date +%s`
|
||||
fi
|
||||
NDPI_API_VERSION=`echo $SOURCE_DATE_EPOCH | cut -c7-10`
|
||||
NDPI_API_VERSION=$((SOURCE_DATE_EPOCH % 65536))
|
||||
fi
|
||||
|
||||
NDPI_API_VERSION=`echo $NDPI_API_VERSION | sed 's/^0*//'`
|
||||
|
||||
echo "Setting API version to $NDPI_API_VERSION"
|
||||
AS_IF([test "x${NDPI_API_VERSION}" = "x"],[
|
||||
AC_MSG_WARN([Could not get NDPI_API_VERSION, defaulting to 0.])
|
||||
NDPI_API_VERSION=0
|
||||
])
|
||||
echo "Setting API version to ${NDPI_API_VERSION}"
|
||||
|
||||
AC_DEFINE_UNQUOTED(NDPI_GIT_RELEASE, "${GIT_RELEASE}", [GIT Release])
|
||||
AC_DEFINE_UNQUOTED(NDPI_GIT_DATE, "${GIT_DATE}", [Last GIT change])
|
||||
|
||||
if ! test "${with_only_libndpi+set}" = set; then :
|
||||
dnl> used by json-c for unit tests
|
||||
PKG_CHECK_MODULES([JSONC], [json-c], [JSONC_LIBS="${pkg_cv_JSONC_LIBS}" JSONC_CFLAGS="${pkg_cv_JSONC_CFLAGS}"])
|
||||
AC_CHECK_LIB([json-c], [json_object_put], [], [
|
||||
PKG_CHECK_MODULES([JSONC], [json-c], [
|
||||
AC_DEFINE(HAVE_LIBJSON_C, 1, [libjson-c is present])
|
||||
JSONC_LIBS="${pkg_cv_JSONC_LIBS}"
|
||||
JSONC_CFLAGS="${pkg_cv_JSONC_CFLAGS}"
|
||||
], [AC_MSG_WARN([JSON-C not available. Disabled unit test.])])
|
||||
AC_CHECK_LIB([json-c], [json_object_put], [
|
||||
EXTRA_TARGETS="$EXTRA_TARGETS tests/unit"
|
||||
build_unittests=yes
|
||||
],[
|
||||
AC_MSG_WARN([JSON-C not available. Disabled unit test.])
|
||||
JSONC_LIBS=""
|
||||
JSONC_CFLAGS=""
|
||||
EXTRA_TARGETS="example tests tests/dga"
|
||||
])
|
||||
AX_PTHREAD([],[
|
||||
AC_MSG_WARN([POSIX Threads not available. Building library only.])
|
||||
@@ -101,9 +137,14 @@ if ! test "${with_only_libndpi+set}" = set; then :
|
||||
EXTRA_TARGETS=""
|
||||
])
|
||||
fi
|
||||
AM_CONDITIONAL([BUILD_UNITTESTS], [test "x$build_unittests" = "xyes"])
|
||||
|
||||
LIBS="$LIBS $JSONC_LIBS"
|
||||
CFLAGS="-W -Wall -Wno-unused-parameter -Wno-unused-function $CFLAGS $JSONC_CFLAGS"
|
||||
HANDLE_TLS_SIGS="//"
|
||||
AS_IF([test "x${enable_tls_sigs}" = "xyes"],[
|
||||
HANDLE_TLS_SIGS=""
|
||||
])
|
||||
|
||||
CFLAGS="-W -Wall -Wno-unused-parameter -Wno-unused-function -Wno-address-of-packed-member ${CFLAGS}"
|
||||
|
||||
AC_CHECK_HEADERS([netinet/in.h stdint.h stdlib.h string.h unistd.h math.h float.h])
|
||||
AC_CHECK_LIB([m], [sqrt], [], [LIBM="-lm"])
|
||||
@@ -114,7 +155,7 @@ if test "x$ac_cv_lib_rrd_rrd_fetch_r" = xyes; then :
|
||||
EXTRA_TARGETS="$EXTRA_TARGETS rrdtool"
|
||||
fi
|
||||
|
||||
ADDITIONAL_LIBS="$LIBRRD $LIBM"
|
||||
ADDITIONAL_LIBS="$LIBM"
|
||||
PCAP_HOME=$HOME/PF_RING/userland
|
||||
|
||||
DPDK_TARGET=
|
||||
@@ -156,16 +197,22 @@ case "$host" in
|
||||
case "$host" in
|
||||
x86_64-*)
|
||||
BUILD_MINGW_X64=1
|
||||
LDFLAGS="${LDFLAGS} -L/mingw64/lib"
|
||||
;;
|
||||
i686-*)
|
||||
LDFLAGS="${LDFLAGS} -L/mingw32/lib"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unsupported MingW cross compiler.])
|
||||
;;
|
||||
esac
|
||||
CFLAGS="${CFLAGS}"
|
||||
CFLAGS="-D__USE_MINGW_ANSI_STDIO -D__STDC_FORMAT_MACROS ${CFLAGS}"
|
||||
LIBS="${LIBS} -lws2_32"
|
||||
BUILD_MINGW=1
|
||||
EXE_SUFFIX=".exe"
|
||||
AS_IF([test "${enable_npcap+set}" != set && test "${with_only_libndpi+set}" != set],,
|
||||
[PKG_CHECK_MODULES([PCAP], [libpcap], [PCAP_LIB="" PCAP_INC="${pkg_cv_PCAP_CFLAGS}"])
|
||||
AC_CHECK_LIB([pcap], [pcap_open_live],, [AC_MSG_ERROR([Missing msys2/mingw libpcap library. Install it with `pacman -S mingw-w64-x86_64-libpcap' (msys2).])])])
|
||||
;;
|
||||
*)
|
||||
if test -f $PCAP_HOME/libpcap/libpcap.a; then :
|
||||
@@ -190,6 +237,8 @@ case "$host" in
|
||||
AC_MSG_ERROR([Missing libpcap(-dev) library required to compile the example application.])
|
||||
fi
|
||||
fi
|
||||
EXE_SUFFIX=""
|
||||
AS_IF([test "${enable_npcap+set}" = set],AC_MSG_ERROR([--disable-npcap does only work with msys2/mingw CCs]))
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -228,27 +277,29 @@ return 0;
|
||||
])
|
||||
AM_CONDITIONAL([HAS_FUZZLDFLAGS], [test "x$has_sanitizefuzzer" = "xyes"])
|
||||
|
||||
GPROF_ENABLED=0
|
||||
AS_IF([test "x$enable_gprof" = "xyes"], [
|
||||
PKG_CHECK_MODULES([PROFILER], [libprofiler],,[
|
||||
AC_MSG_ERROR([libprofiler not available. Required for profiling support.])
|
||||
])
|
||||
PKG_CHECK_MODULES([TCMALLOC], [libtcmalloc],,[
|
||||
AC_MSG_ERROR([libtcmalloc not available. Required for profiling support.])
|
||||
])
|
||||
GPROF_ENABLED=1
|
||||
GPROF_LIBS="-ltcmalloc_and_profiler"
|
||||
GPROF_CFLAGS="${pkg_cv_PROFILER_CFLAGS} ${pkg_cv_TCMALLOC_CFLAGS}"
|
||||
])
|
||||
|
||||
AC_CHECK_LIB(pthread, pthread_setaffinity_np, AC_DEFINE_UNQUOTED(HAVE_PTHREAD_SETAFFINITY_NP, 1, [libc has pthread_setaffinity_np]))
|
||||
|
||||
dnl> GCRYPT
|
||||
GCRYPT_ENABLED=1
|
||||
AC_ARG_ENABLE([gcrypt],
|
||||
[AS_HELP_STRING([--disable-gcrypt], [Avoid compiling with libgcrypt/libgpg-error, even if they are present. QUIC sub-classification may be missing])],
|
||||
[GCRYPT_ENABLED=0],
|
||||
[AC_CHECK_LIB(gcrypt, gcry_cipher_checktag)])
|
||||
AS_IF([test ${GCRYPT_ENABLED} -eq 1], [
|
||||
if test "x$ac_cv_lib_gcrypt_gcry_cipher_checktag" = xyes; then :
|
||||
ADDITIONAL_LIBS="${ADDITIONAL_LIBS} -lgcrypt"
|
||||
else
|
||||
$as_unset ac_cv_lib_gcrypt_gcry_cipher_checktag
|
||||
AC_CHECK_LIB(gpg-error, gpg_strerror_r)
|
||||
AC_CHECK_LIB(gcrypt, gcry_cipher_checktag)
|
||||
if test "x$ac_cv_lib_gcrypt_gcry_cipher_checktag" = xyes -a "x$ac_cv_lib_gpg_error_gpg_strerror_r" = xyes; then :
|
||||
ADDITIONAL_LIBS="${ADDITIONAL_LIBS} -lgcrypt -lgpg-error"
|
||||
else
|
||||
GCRYPT_ENABLED=0
|
||||
fi
|
||||
fi
|
||||
dnl> libgcrypt (external)
|
||||
USE_HOST_LIBGCRYPT=0
|
||||
AS_IF([test "${with_local_libgcrypt+set}" = set],[
|
||||
USE_HOST_LIBGCRYPT=1
|
||||
AC_CHECK_LIB(gpg-error, gpg_strerror_r, [], AC_MSG_ERROR([libgpg-error required (because of --with-local-libgcrypt) but not found or too old.]))
|
||||
AC_CHECK_LIB(gcrypt, gcry_cipher_checktag, [], AC_MSG_ERROR([libgcrypt required (because of --with-local-libgcrypt) but not found or too old.]))
|
||||
ADDITIONAL_LIBS="${ADDITIONAL_LIBS} -lgcrypt -lgpg-error"
|
||||
AC_DEFINE_UNQUOTED(USE_HOST_LIBGCRYPT, 1, [Use locally installed libgcrypt instead of builtin gcrypt-light])
|
||||
])
|
||||
|
||||
dnl> PCRE
|
||||
@@ -266,7 +317,7 @@ dnl> GeoIP
|
||||
AC_ARG_WITH(maxminddb, [ --with-maxminddb Enable nDPI build with libmaxminddb])
|
||||
if test "${with_maxminddb+set}" = set; then :
|
||||
AC_CHECK_LIB([maxminddb], [MMDB_lookup_sockaddr])
|
||||
AC_HAVE_HEADERS(maxminddb.h)
|
||||
AC_CHECK_HEADERS([maxminddb.h])
|
||||
if test ".${ac_cv_lib_maxminddb_MMDB_lookup_sockaddr}" = ".yes" && test ".${ac_cv_header_maxminddb_h}" = ".yes"; then
|
||||
ADDITIONAL_LIBS="${ADDITIONAL_LIBS} -lmaxminddb"
|
||||
AC_DEFINE_UNQUOTED(HAVE_MAXMINDDB, 1, [MaxMind DB support])
|
||||
@@ -282,7 +333,7 @@ dnl> ADDITIONAL_LIBS="${ADDITIONAL_LIBS} -lcurl"
|
||||
dnl> AC_DEFINE_UNQUOTED(HAVE_CURL, 1, [curl is present])
|
||||
dnl> fi
|
||||
|
||||
AC_CONFIG_FILES([Makefile example/Makefile example/Makefile.dpdk tests/Makefile tests/unit/Makefile tests/performance/Makefile tests/dga/Makefile rrdtool/Makefile libndpi.pc src/include/ndpi_define.h src/lib/Makefile python/Makefile fuzz/Makefile src/include/ndpi_api.h])
|
||||
AC_CONFIG_FILES([Makefile example/Makefile example/Makefile.dpdk tests/Makefile tests/unit/Makefile tests/performance/Makefile tests/dga/Makefile rrdtool/Makefile influxdb/Makefile libndpi.pc src/include/ndpi_define.h src/lib/Makefile fuzz/Makefile src/include/ndpi_api.h doc/Doxyfile.cfg])
|
||||
AC_CONFIG_FILES([tests/do.sh], [chmod +x tests/do.sh])
|
||||
AC_CONFIG_HEADERS(src/include/ndpi_config.h)
|
||||
AC_SUBST(GIT_RELEASE)
|
||||
@@ -292,6 +343,7 @@ AC_SUBST(NDPI_PATCH)
|
||||
AC_SUBST(NDPI_VERSION_SHORT)
|
||||
AC_SUBST(PCAP_INC)
|
||||
AC_SUBST(PCAP_LIB)
|
||||
AC_SUBST(LIBRRD)
|
||||
AC_SUBST(ADDITIONAL_LIBS)
|
||||
AC_SUBST(DL_LIB)
|
||||
AC_SUBST(DPDK_TARGET)
|
||||
@@ -304,6 +356,12 @@ AC_SUBST(BUILD_MINGW_X64)
|
||||
AC_SUBST(BUILD_FUZZTARGETS)
|
||||
AC_SUBST(JSONC_CFLAGS)
|
||||
AC_SUBST(JSONC_LIBS)
|
||||
AC_SUBST(GCRYPT_ENABLED)
|
||||
AC_SUBST(GPROF_CFLAGS)
|
||||
AC_SUBST(GPROF_LIBS)
|
||||
AC_SUBST(GPROF_ENABLED)
|
||||
AC_SUBST(USE_HOST_LIBGCRYPT)
|
||||
AC_SUBST(PCRE_ENABLED)
|
||||
AC_SUBST(HANDLE_TLS_SIGS)
|
||||
AC_SUBST(DISABLE_NPCAP)
|
||||
AC_SUBST(EXE_SUFFIX)
|
||||
AC_OUTPUT
|
||||
|
||||
+2658
File diff suppressed because it is too large
Load Diff
+8
-5
@@ -22,8 +22,8 @@ I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||
.PHONY: help
|
||||
help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
@echo " release to make standalone HTML files for ntop documentation release"
|
||||
@echo " html to make standalone HTML files"
|
||||
@echo " release to make standalone Doxygen/HTML files for ntop documentation release"
|
||||
@echo " html to make standalone Doxygen/HTML files"
|
||||
@echo " dirhtml to make HTML files named index.html in directories"
|
||||
@echo " singlehtml to make a single large HTML file"
|
||||
@echo " pickle to make pickle files"
|
||||
@@ -50,12 +50,15 @@ help:
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf $(BUILDDIR)/*
|
||||
cd doxygen; make clean
|
||||
rm -rf $(BUILDDIR)/* api doxygen
|
||||
|
||||
.PHONY: html
|
||||
html:
|
||||
cd doxygen; make
|
||||
@test -r Doxyfile.cfg || { \
|
||||
echo 'Doxyfile.cfg does not exist; Please run $(realpath ..)/autogen.sh or $(realpath ..)/configure first.'; \
|
||||
false; \
|
||||
}
|
||||
doxygen Doxyfile.cfg
|
||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
nDPI Programming API
|
||||
####################
|
||||
|
||||
Placeholder
|
||||
+16
-3
@@ -21,7 +21,8 @@ sys.path.append( "breathe/" )
|
||||
# ones.
|
||||
extensions = [
|
||||
'sphinx.ext.intersphinx',
|
||||
'breathe'
|
||||
'breathe',
|
||||
'exhale'
|
||||
]
|
||||
|
||||
# Workaround for platforms where swaggerdoc is not available
|
||||
@@ -31,6 +32,18 @@ if not os.environ.get("PYTHON_SKIP_SWAGGERDOC"):
|
||||
breathe_projects = { "apidoc" : "doxygen/xml/" }
|
||||
breathe_default_project = "apidoc"
|
||||
|
||||
exhale_args = {
|
||||
"containmentFolder": "./api",
|
||||
"rootFileName": "library_root.rst",
|
||||
"rootFileTitle": "Library API",
|
||||
"doxygenStripFromPath": ".",
|
||||
"createTreeView": True,
|
||||
# "treeViewIsBootstrap": True,
|
||||
}
|
||||
|
||||
primary_domain = 'c'
|
||||
highlight_language = 'c'
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
@@ -139,7 +152,7 @@ html_logo = "img/logo.png"
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
#html_static_path = ['_static']
|
||||
|
||||
# Add any extra paths that contain custom files (such as robots.txt or
|
||||
# .htaccess) here, relative to this directory. These files are copied
|
||||
@@ -288,4 +301,4 @@ texinfo_documents = [
|
||||
intersphinx_mapping = {'https://docs.python.org/': None}
|
||||
|
||||
def setup(app):
|
||||
app.add_stylesheet('css/ntop.css')
|
||||
app.add_css_file('css/ntop.css')
|
||||
|
||||
+39
-7
@@ -45,25 +45,25 @@ TLS/QUIC only: this risk is triggered when a `self-signed certificate <https://e
|
||||
|
||||
NDPI_TLS_OBSOLETE_VERSION
|
||||
=========================
|
||||
Risk 0triggered when TLS version is older than 1.1.
|
||||
Risk triggered when TLS version is older than 1.1.
|
||||
|
||||
.. _Risk 008:
|
||||
|
||||
NDPI_TLS_WEAK_CIPHER
|
||||
====================
|
||||
Risk 0triggered when an unsafe TLS cipher is used. See `this page <https://community.qualys.com/thread/18212-how-does-qualys-determine-the-server-cipher-suites>`_ for a list of insecure ciphers.
|
||||
Risk triggered when an unsafe TLS cipher is used. See `this page <https://community.qualys.com/thread/18212-how-does-qualys-determine-the-server-cipher-suites>`_ for a list of insecure ciphers.
|
||||
|
||||
.. _Risk 009:
|
||||
|
||||
NDPI_TLS_CERTIFICATE_EXPIRED
|
||||
============================
|
||||
Risk 0triggered when a TLS certificate is expired, i.e. the current date falls outside of the certificate validity dates.
|
||||
Risk triggered when a TLS certificate is expired, i.e. the current date falls outside of the certificate validity dates.
|
||||
|
||||
.. _Risk 010:
|
||||
|
||||
NDPI_TLS_CERTIFICATE_MISMATCH
|
||||
=============================
|
||||
Risk 0triggered when a TLS certificate does not match the hostname we're accessing. Example you do http://www.aaa.com and the TLS certificate returned is for www.bbb.com.
|
||||
Risk triggered when a TLS certificate does not match the hostname we're accessing. Example you do http://www.aaa.com and the TLS certificate returned is for www.bbb.com.
|
||||
|
||||
.. _Risk 011:
|
||||
|
||||
@@ -195,13 +195,13 @@ This risk is set when the `ALPN <https://en.wikipedia.org/wiki/Application-Layer
|
||||
|
||||
NDPI_TLS_CERT_VALIDITY_TOO_LONG
|
||||
===============================
|
||||
From 01/09/2020 TLS certificates lifespan is limited to 13 months. This risk is triggered for certificates not respecting this directive.
|
||||
From 01/09/2020 TLS certificates lifespan is limited to `13 months <https://www.appviewx.com/blogs/tls-certificate-lifespans-now-capped-at-13-months/>`_. This risk is triggered for certificates not respecting this directive.
|
||||
|
||||
.. _Risk 033:
|
||||
|
||||
NDPI_TLS_SUSPICIOUS_EXTENSION
|
||||
=============================
|
||||
This risk is triggered when the domain name (SNI extension) is not printable and thus it is a problem.
|
||||
This risk is triggered when the domain name (SNI extension) is not printable and thus it is a problem. In TLS extensions can be dynamically specified by the client in the hello packet.
|
||||
|
||||
.. _Risk 034:
|
||||
|
||||
@@ -246,10 +246,42 @@ Additionally, some TLS protocol fields are checked for printable characters as w
|
||||
|
||||
NDPI_POSSIBLE_EXPLOIT
|
||||
=====================
|
||||
The risk is set whenever a possible exploit (e.g. Log4J/Log4Shell) is detected.
|
||||
The risk is set whenever a possible exploit (e.g. `Log4J/Log4Shell <https://en.wikipedia.org/wiki/Log4Shell>`_) is detected.
|
||||
|
||||
.. _Risk 041:
|
||||
|
||||
NDPI_TLS_CERTIFICATE_ABOUT_TO_EXPIRE
|
||||
===================================
|
||||
The risk is set whenever a TLS certificate is close to the expiration date.
|
||||
|
||||
.. _Risk 042:
|
||||
|
||||
NDPI_PUNYCODE_IDN
|
||||
===================================
|
||||
The risk is set whenever a domain name is specified in IDN format as they are sometimes used in `IDN homograph attacks <https://en.wikipedia.org/wiki/IDN_homograph_attack>`_.
|
||||
|
||||
.. _Risk 043:
|
||||
|
||||
NDPI_ERROR_CODE_DETECTED
|
||||
===================================
|
||||
The risk is set whenever an error code is detected in the underlying protocol (e.g. HTTP and DNS).
|
||||
|
||||
.. _Risk 044:
|
||||
|
||||
NDPI_HTTP_CRAWLER_BOT
|
||||
===================================
|
||||
The risk is set whenever a crawler/bot/robot has been detected
|
||||
|
||||
.. _Risk 045:
|
||||
|
||||
NDPI_ANONYMOUS_SUBSCRIBER
|
||||
===================================
|
||||
The risk is set whenever the (source) ip address has been anonymized and it can't be used to identify the subscriber.
|
||||
Example: the flow is generated by an iCloud-private-relay exit node.
|
||||
|
||||
.. _Risk 046:
|
||||
|
||||
NDPI_UNIDIRECTIONAL_TRAFFIC_SUBSCRIBER
|
||||
===================================
|
||||
The risk is set whenever the flow has unidirectional traffic (typically no traffic on the server to client direction). THis
|
||||
risk is not triggered for multicast/broadcast destinations.
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ nDPI is an open source DPI (Deep Packet Inspection) toolkit for traffic analysis
|
||||
:maxdepth: 2
|
||||
:caption: Developer's Guide
|
||||
|
||||
api
|
||||
api/library_root
|
||||
flow_risks
|
||||
|
||||
.. toctree::
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
breathe
|
||||
exhale
|
||||
sphinx-rtd-theme
|
||||
sphinxcontrib-swaggerdoc
|
||||
@@ -1,18 +0,0 @@
|
||||
# How to use?
|
||||
|
||||
You need to first compile the nDPI library as usual:
|
||||
|
||||
- ./autogen.sh
|
||||
- ./configure
|
||||
- make
|
||||
|
||||
Then open the Xcode project and you are ready to go. The default behavior is to analyze an embeded pcap file `capture.pcap`. You can change the behavior by changing command line input in `ViewController.m` file.
|
||||
|
||||
# What does the XCode project do?
|
||||
|
||||
It's a dummy Mac App project with a **Run** button. It doesn't modify any nDPI code except that it renamed the `main` function to `orginal_main` in `ndpiReader.c` (because the Mac App has it's own main function) and call the `orginal_main` with synthetic command line input from `ViewController.m` file when the **Run** button is clicked.
|
||||
|
||||
It also fixes some problems when compiling with Xcode. Some are listed below:
|
||||
- Add missed `NDPI_LOG_DEBUG2` macro definition implementation (defined as `NDPI_LOG_DEBUG2_XCODE_PROJ` in `ViewController.m`)
|
||||
- Add an empty ndpi_utils.h file to make `protocols/attic/ftp.c` and `protocols/attic/secondlife.c` can compile
|
||||
- Specially treat `ndpi_patricia.c` by not adding it into compilation source, since it's directly included in `ndpi_main.c`
|
||||
File diff suppressed because it is too large
Load Diff
Generated
-7
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:ndpiExample.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
-58
@@ -1,58 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "16x16",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "16x16",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "32x32",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "32x32",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "128x128",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "128x128",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "256x256",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "256x256",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "512x512",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "512x512",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@@ -1,732 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13771"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Application-->
|
||||
<scene sceneID="JPo-4y-FX3">
|
||||
<objects>
|
||||
<application id="hnw-xV-0zn" sceneMemberID="viewController">
|
||||
<menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
|
||||
<items>
|
||||
<menuItem title="ndpiExample" id="1Xt-HY-uBw">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="ndpiExample" systemMenu="apple" id="uQy-DD-JDr">
|
||||
<items>
|
||||
<menuItem title="About ndpiExample" id="5kV-Vb-QxS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
|
||||
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
|
||||
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
|
||||
<menuItem title="Services" id="NMo-om-nkz">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
|
||||
<menuItem title="Hide ndpiExample" keyEquivalent="h" id="Olw-nP-bQN">
|
||||
<connections>
|
||||
<action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="hideOtherApplications:" target="Ady-hI-5gd" id="VT4-aY-XCT"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Show All" id="Kd2-mp-pUS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="unhideAllApplications:" target="Ady-hI-5gd" id="Dhg-Le-xox"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
|
||||
<menuItem title="Quit ndpiExample" keyEquivalent="q" id="4sb-4s-VLi">
|
||||
<connections>
|
||||
<action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="File" id="dMs-cI-mzQ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="File" id="bib-Uj-vzu">
|
||||
<items>
|
||||
<menuItem title="New" keyEquivalent="n" id="Was-JA-tGl">
|
||||
<connections>
|
||||
<action selector="newDocument:" target="Ady-hI-5gd" id="4Si-XN-c54"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Open…" keyEquivalent="o" id="IAo-SY-fd9">
|
||||
<connections>
|
||||
<action selector="openDocument:" target="Ady-hI-5gd" id="bVn-NM-KNZ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Open Recent" id="tXI-mr-wws">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="oas-Oc-fiZ">
|
||||
<items>
|
||||
<menuItem title="Clear Menu" id="vNY-rz-j42">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="clearRecentDocuments:" target="Ady-hI-5gd" id="Daa-9d-B3U"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
|
||||
<menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
|
||||
<connections>
|
||||
<action selector="performClose:" target="Ady-hI-5gd" id="HmO-Ls-i7Q"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Save…" keyEquivalent="s" id="pxx-59-PXV">
|
||||
<connections>
|
||||
<action selector="saveDocument:" target="Ady-hI-5gd" id="teZ-XB-qJY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Save As…" keyEquivalent="S" id="Bw7-FT-i3A">
|
||||
<connections>
|
||||
<action selector="saveDocumentAs:" target="Ady-hI-5gd" id="mDf-zr-I0C"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Revert to Saved" keyEquivalent="r" id="KaW-ft-85H">
|
||||
<connections>
|
||||
<action selector="revertDocumentToSaved:" target="Ady-hI-5gd" id="iJ3-Pv-kwq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="aJh-i4-bef"/>
|
||||
<menuItem title="Page Setup…" keyEquivalent="P" id="qIS-W8-SiK">
|
||||
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="runPageLayout:" target="Ady-hI-5gd" id="Din-rz-gC5"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Print…" keyEquivalent="p" id="aTl-1u-JFS">
|
||||
<connections>
|
||||
<action selector="print:" target="Ady-hI-5gd" id="qaZ-4w-aoO"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Edit" id="5QF-Oa-p0T">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Edit" id="W48-6f-4Dl">
|
||||
<items>
|
||||
<menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
|
||||
<connections>
|
||||
<action selector="undo:" target="Ady-hI-5gd" id="M6e-cu-g7V"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
|
||||
<connections>
|
||||
<action selector="redo:" target="Ady-hI-5gd" id="oIA-Rs-6OD"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
|
||||
<menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
|
||||
<connections>
|
||||
<action selector="cut:" target="Ady-hI-5gd" id="YJe-68-I9s"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
|
||||
<connections>
|
||||
<action selector="copy:" target="Ady-hI-5gd" id="G1f-GL-Joy"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
|
||||
<connections>
|
||||
<action selector="paste:" target="Ady-hI-5gd" id="UvS-8e-Qdg"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteAsPlainText:" target="Ady-hI-5gd" id="cEh-KX-wJQ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Delete" id="pa3-QI-u2k">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="delete:" target="Ady-hI-5gd" id="0Mk-Ml-PaM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
|
||||
<connections>
|
||||
<action selector="selectAll:" target="Ady-hI-5gd" id="VNm-Mi-diN"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
|
||||
<menuItem title="Find" id="4EN-yA-p0u">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Find" id="1b7-l0-nxx">
|
||||
<items>
|
||||
<menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="cD7-Qs-BN4"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="WD3-Gg-5AJ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="NDo-RZ-v9R"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="HOh-sY-3ay"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="U76-nv-p5D"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
|
||||
<connections>
|
||||
<action selector="centerSelectionInVisibleArea:" target="Ady-hI-5gd" id="IOG-6D-g5B"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
|
||||
<items>
|
||||
<menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
|
||||
<connections>
|
||||
<action selector="showGuessPanel:" target="Ady-hI-5gd" id="vFj-Ks-hy3"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
|
||||
<connections>
|
||||
<action selector="checkSpelling:" target="Ady-hI-5gd" id="fz7-VC-reM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
|
||||
<menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleContinuousSpellChecking:" target="Ady-hI-5gd" id="7w6-Qz-0kB"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleGrammarChecking:" target="Ady-hI-5gd" id="muD-Qn-j4w"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticSpellingCorrection:" target="Ady-hI-5gd" id="2lM-Qi-WAP"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Substitutions" id="9ic-FL-obx">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
|
||||
<items>
|
||||
<menuItem title="Show Substitutions" id="z6F-FW-3nz">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontSubstitutionsPanel:" target="Ady-hI-5gd" id="oku-mr-iSq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
|
||||
<menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleSmartInsertDelete:" target="Ady-hI-5gd" id="3IJ-Se-DZD"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Quotes" id="hQb-2v-fYv">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticQuoteSubstitution:" target="Ady-hI-5gd" id="ptq-xd-QOA"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Dashes" id="rgM-f4-ycn">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticDashSubstitution:" target="Ady-hI-5gd" id="oCt-pO-9gS"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Links" id="cwL-P1-jid">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticLinkDetection:" target="Ady-hI-5gd" id="Gip-E3-Fov"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Data Detectors" id="tRr-pd-1PS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticDataDetection:" target="Ady-hI-5gd" id="R1I-Nq-Kbl"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Text Replacement" id="HFQ-gK-NFA">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticTextReplacement:" target="Ady-hI-5gd" id="DvP-Fe-Py6"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Transformations" id="2oI-Rn-ZJC">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Transformations" id="c8a-y6-VQd">
|
||||
<items>
|
||||
<menuItem title="Make Upper Case" id="vmV-6d-7jI">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="uppercaseWord:" target="Ady-hI-5gd" id="sPh-Tk-edu"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Make Lower Case" id="d9M-CD-aMd">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="lowercaseWord:" target="Ady-hI-5gd" id="iUZ-b5-hil"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Capitalize" id="UEZ-Bs-lqG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="capitalizeWord:" target="Ady-hI-5gd" id="26H-TL-nsh"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Speech" id="xrE-MZ-jX0">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Speech" id="3rS-ZA-NoH">
|
||||
<items>
|
||||
<menuItem title="Start Speaking" id="Ynk-f8-cLZ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="startSpeaking:" target="Ady-hI-5gd" id="654-Ng-kyl"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Stop Speaking" id="Oyz-dy-DGm">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="stopSpeaking:" target="Ady-hI-5gd" id="dX8-6p-jy9"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Format" id="jxT-CU-nIS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Format" id="GEO-Iw-cKr">
|
||||
<items>
|
||||
<menuItem title="Font" id="Gi5-1S-RQB">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Font" systemMenu="font" id="aXa-aM-Jaq">
|
||||
<items>
|
||||
<menuItem title="Show Fonts" keyEquivalent="t" id="Q5e-8K-NDq">
|
||||
<connections>
|
||||
<action selector="orderFrontFontPanel:" target="YLy-65-1bz" id="WHr-nq-2xA"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Bold" tag="2" keyEquivalent="b" id="GB9-OM-e27">
|
||||
<connections>
|
||||
<action selector="addFontTrait:" target="YLy-65-1bz" id="hqk-hr-sYV"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Italic" tag="1" keyEquivalent="i" id="Vjx-xi-njq">
|
||||
<connections>
|
||||
<action selector="addFontTrait:" target="YLy-65-1bz" id="IHV-OB-c03"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Underline" keyEquivalent="u" id="WRG-CD-K1S">
|
||||
<connections>
|
||||
<action selector="underline:" target="Ady-hI-5gd" id="FYS-2b-JAY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="5gT-KC-WSO"/>
|
||||
<menuItem title="Bigger" tag="3" keyEquivalent="+" id="Ptp-SP-VEL">
|
||||
<connections>
|
||||
<action selector="modifyFont:" target="YLy-65-1bz" id="Uc7-di-UnL"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smaller" tag="4" keyEquivalent="-" id="i1d-Er-qST">
|
||||
<connections>
|
||||
<action selector="modifyFont:" target="YLy-65-1bz" id="HcX-Lf-eNd"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="kx3-Dk-x3B"/>
|
||||
<menuItem title="Kern" id="jBQ-r6-VK2">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Kern" id="tlD-Oa-oAM">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="GUa-eO-cwY">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useStandardKerning:" target="Ady-hI-5gd" id="6dk-9l-Ckg"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use None" id="cDB-IK-hbR">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="turnOffKerning:" target="Ady-hI-5gd" id="U8a-gz-Maa"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Tighten" id="46P-cB-AYj">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="tightenKerning:" target="Ady-hI-5gd" id="hr7-Nz-8ro"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Loosen" id="ogc-rX-tC1">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="loosenKerning:" target="Ady-hI-5gd" id="8i4-f9-FKE"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Ligatures" id="o6e-r0-MWq">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Ligatures" id="w0m-vy-SC9">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="agt-UL-0e3">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useStandardLigatures:" target="Ady-hI-5gd" id="7uR-wd-Dx6"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use None" id="J7y-lM-qPV">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="turnOffLigatures:" target="Ady-hI-5gd" id="iX2-gA-Ilz"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use All" id="xQD-1f-W4t">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useAllLigatures:" target="Ady-hI-5gd" id="KcB-kA-TuK"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Baseline" id="OaQ-X3-Vso">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Baseline" id="ijk-EB-dga">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="3Om-Ey-2VK">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="unscript:" target="Ady-hI-5gd" id="0vZ-95-Ywn"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Superscript" id="Rqc-34-cIF">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="superscript:" target="Ady-hI-5gd" id="3qV-fo-wpU"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Subscript" id="I0S-gh-46l">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="subscript:" target="Ady-hI-5gd" id="Q6W-4W-IGz"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Raise" id="2h7-ER-AoG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="raiseBaseline:" target="Ady-hI-5gd" id="4sk-31-7Q9"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Lower" id="1tx-W0-xDw">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="lowerBaseline:" target="Ady-hI-5gd" id="OF1-bc-KW4"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="Ndw-q3-faq"/>
|
||||
<menuItem title="Show Colors" keyEquivalent="C" id="bgn-CT-cEk">
|
||||
<connections>
|
||||
<action selector="orderFrontColorPanel:" target="Ady-hI-5gd" id="mSX-Xz-DV3"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="iMs-zA-UFJ"/>
|
||||
<menuItem title="Copy Style" keyEquivalent="c" id="5Vv-lz-BsD">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="copyFont:" target="Ady-hI-5gd" id="GJO-xA-L4q"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste Style" keyEquivalent="v" id="vKC-jM-MkH">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteFont:" target="Ady-hI-5gd" id="JfD-CL-leO"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Text" id="Fal-I4-PZk">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Text" id="d9c-me-L2H">
|
||||
<items>
|
||||
<menuItem title="Align Left" keyEquivalent="{" id="ZM1-6Q-yy1">
|
||||
<connections>
|
||||
<action selector="alignLeft:" target="Ady-hI-5gd" id="zUv-R1-uAa"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Center" keyEquivalent="|" id="VIY-Ag-zcb">
|
||||
<connections>
|
||||
<action selector="alignCenter:" target="Ady-hI-5gd" id="spX-mk-kcS"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Justify" id="J5U-5w-g23">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="alignJustified:" target="Ady-hI-5gd" id="ljL-7U-jND"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Align Right" keyEquivalent="}" id="wb2-vD-lq4">
|
||||
<connections>
|
||||
<action selector="alignRight:" target="Ady-hI-5gd" id="r48-bG-YeY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="4s2-GY-VfK"/>
|
||||
<menuItem title="Writing Direction" id="H1b-Si-o9J">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Writing Direction" id="8mr-sm-Yjd">
|
||||
<items>
|
||||
<menuItem title="Paragraph" enabled="NO" id="ZvO-Gk-QUH">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem id="YGs-j5-SAR">
|
||||
<string key="title"> Default</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionNatural:" target="Ady-hI-5gd" id="qtV-5e-UBP"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="Lbh-J2-qVU">
|
||||
<string key="title"> Left to Right</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="S0X-9S-QSf"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="jFq-tB-4Kx">
|
||||
<string key="title"> Right to Left</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="5fk-qB-AqJ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="swp-gr-a21"/>
|
||||
<menuItem title="Selection" enabled="NO" id="cqv-fj-IhA">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem id="Nop-cj-93Q">
|
||||
<string key="title"> Default</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionNatural:" target="Ady-hI-5gd" id="lPI-Se-ZHp"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="BgM-ve-c93">
|
||||
<string key="title"> Left to Right</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="caW-Bv-w94"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="RB4-Sm-HuC">
|
||||
<string key="title"> Right to Left</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="EXD-6r-ZUu"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="fKy-g9-1gm"/>
|
||||
<menuItem title="Show Ruler" id="vLm-3I-IUL">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleRuler:" target="Ady-hI-5gd" id="FOx-HJ-KwY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Copy Ruler" keyEquivalent="c" id="MkV-Pr-PK5">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="copyRuler:" target="Ady-hI-5gd" id="71i-fW-3W2"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste Ruler" keyEquivalent="v" id="LVM-kO-fVI">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteRuler:" target="Ady-hI-5gd" id="cSh-wd-qM2"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="View" id="H8h-7b-M4v">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="View" id="HyV-fh-RgO">
|
||||
<items>
|
||||
<menuItem title="Show Toolbar" keyEquivalent="t" id="snW-S8-Cw5">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleToolbarShown:" target="Ady-hI-5gd" id="BXY-wc-z0C"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Customize Toolbar…" id="1UK-8n-QPP">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="runToolbarCustomizationPalette:" target="Ady-hI-5gd" id="pQI-g3-MTW"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="hB3-LF-h0Y"/>
|
||||
<menuItem title="Show Sidebar" keyEquivalent="s" id="kIP-vf-haE">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleSourceList:" target="Ady-hI-5gd" id="iwa-gc-5KM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleFullScreen:" target="Ady-hI-5gd" id="dU3-MA-1Rq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Window" id="aUF-d1-5bR">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
|
||||
<items>
|
||||
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
|
||||
<connections>
|
||||
<action selector="performMiniaturize:" target="Ady-hI-5gd" id="VwT-WD-YPe"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Zoom" id="R4o-n2-Eq4">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="performZoom:" target="Ady-hI-5gd" id="DIl-cC-cCs"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
|
||||
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="arrangeInFront:" target="Ady-hI-5gd" id="DRN-fu-gQh"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Help" id="wpr-3q-Mcd">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
|
||||
<items>
|
||||
<menuItem title="ndpiExample Help" keyEquivalent="?" id="FKE-Sm-Kum">
|
||||
<connections>
|
||||
<action selector="showHelp:" target="Ady-hI-5gd" id="y7X-2Q-9no"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
|
||||
</connections>
|
||||
</application>
|
||||
<customObject id="Voe-Tx-rLC" customClass="AppDelegate"/>
|
||||
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
|
||||
<customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="75" y="0.0"/>
|
||||
</scene>
|
||||
<!--Window Controller-->
|
||||
<scene sceneID="R2V-B0-nI4">
|
||||
<objects>
|
||||
<windowController id="B8D-0N-5wS" sceneMemberID="viewController">
|
||||
<window key="window" title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="196" y="240" width="480" height="270"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="B8D-0N-5wS" id="98r-iN-zZc"/>
|
||||
</connections>
|
||||
</window>
|
||||
<connections>
|
||||
<segue destination="XfG-lQ-9wD" kind="relationship" relationship="window.shadowedContentViewController" id="cq2-FE-JQM"/>
|
||||
</connections>
|
||||
</windowController>
|
||||
<customObject id="Oky-zY-oP4" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="75" y="250"/>
|
||||
</scene>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="hIz-AP-VOD">
|
||||
<objects>
|
||||
<viewController id="XfG-lQ-9wD" customClass="ViewController" sceneMemberID="viewController">
|
||||
<view key="view" wantsLayer="YES" id="m2S-Jp-Qdl">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Jdf-YK-4JB">
|
||||
<rect key="frame" x="23" y="173" width="64" height="32"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="push" title="Run" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="1eG-Fb-Ybk">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="onRunButtonClicked:" target="XfG-lQ-9wD" id="zyK-t7-vwt"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
</view>
|
||||
</viewController>
|
||||
<customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="75" y="655"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2018年 ZengYingpei. All rights reserved.</string>
|
||||
<key>NSMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,106 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (C) 2011-18 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#import "ViewController.h"
|
||||
#include "ndpi_api.h"
|
||||
|
||||
// Declare the orginal_main defined in ndpiReader.c here
|
||||
extern int orginal_main(int argc, char **argv);
|
||||
|
||||
@implementation ViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
// Do any additional setup after loading the view.
|
||||
}
|
||||
|
||||
|
||||
- (void)setRepresentedObject:(id)representedObject {
|
||||
[super setRepresentedObject:representedObject];
|
||||
|
||||
// Update the view, if already loaded.
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)onRunButtonClicked:(id)sender
|
||||
{
|
||||
char* args[10];
|
||||
|
||||
extern int optind;
|
||||
optind = 1; // reset the parse of getopt_long
|
||||
|
||||
// Check the "nDPI_QuickStartGuide.pdf" for comand option explanation.
|
||||
|
||||
/* Following code it to execute below command (remember to change args[2] to
|
||||
* absolute path):
|
||||
* ./ndpiReader -i capture.pcap
|
||||
*/
|
||||
args[0] = (char*)"ndpiReader";
|
||||
args[1] = (char*)"-i";
|
||||
NSString* pcap_file = [[NSBundle mainBundle]pathForResource:@"capture" ofType:@"pcap"];
|
||||
args[2] = (char*)[pcap_file cStringUsingEncoding:NSUTF8StringEncoding];
|
||||
// Change to you pcap file path if you want.
|
||||
//args[2] = (char*)"/Users/zengyingpei/Documents/code/nDPI/example/MacOS/ndpiExample/ndpiExample/capture.pcap";
|
||||
// Remember to change below number of args when you change to other command inputs.
|
||||
orginal_main(3, args);
|
||||
|
||||
|
||||
|
||||
/* Following code it to execute below command:
|
||||
* ./ndpiReader -i en1 -s 10 -p protos.txt
|
||||
* The process seems to be not support re-entering. You may have to re-run the App.
|
||||
*/
|
||||
/*
|
||||
args[0] = (char*)"ndpiReader";
|
||||
args[1] = (char*)"-i";
|
||||
args[2] = (char*)"en0";
|
||||
args[3] = (char*)"-s";
|
||||
args[4] = (char*)"10";
|
||||
args[5] = (char*)"-p";
|
||||
NSString* proto_file = [[NSBundle mainBundle]pathForResource:@"protos" ofType:@"txt"];
|
||||
args[6] = (char*)[proto_file cStringUsingEncoding:NSUTF8StringEncoding];
|
||||
//args[6] = (char*)"/Users/zengyingpei/Documents/code/nDPI/example/protos.txt";
|
||||
orginal_main(7, args);
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
// In order to fix the missing of NDPI_LOG_DEBUG2 (used in ndpi_main.c), we define
|
||||
// NDPI_LOG_DEBUG2 as NDPI_LOG_DEBUG2_XCODE_PROJ.
|
||||
|
||||
void vNDPI_LOG_DEBUG2_XCODE_PROJ(struct ndpi_detection_module_struct * ndpi_struct,
|
||||
const char *format, va_list ap)
|
||||
{
|
||||
vprintf(format, ap);
|
||||
}
|
||||
|
||||
void NDPI_LOG_DEBUG2_XCODE_PROJ(struct ndpi_detection_module_struct * ndpi_struct,
|
||||
const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start (ap, format);
|
||||
vNDPI_LOG_DEBUG2_XCODE_PROJ(ndpi_struct, format, ap);
|
||||
va_end (ap);
|
||||
}
|
||||
|
||||
@end
|
||||
Binary file not shown.
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (C) 2011-18 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
int main(int argc, const char * argv[]) {
|
||||
return NSApplicationMain(argc, argv);
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict/>
|
||||
</plist>
|
||||
@@ -17,7 +17,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
|
||||
APP = ndpiReader.dpdk
|
||||
LIBNDPI = $(PWD)/../src/lib/libndpi.a
|
||||
|
||||
SRCS-y := reader_util.c intrusion_detection.c ndpiReader.c
|
||||
SRCS-y := reader_util.c ndpiReader.c
|
||||
|
||||
CFLAGS += -g
|
||||
CFLAGS += -Wno-strict-prototypes -Wno-missing-prototypes -Wno-missing-declarations -Wno-unused-parameter -I $(PWD)/../src/include @CFLAGS@ -DUSE_DPDK
|
||||
|
||||
+38
-19
@@ -3,20 +3,29 @@ CC=@CC@
|
||||
CXX=@CXX@
|
||||
BUILD_MINGW=@BUILD_MINGW@
|
||||
BUILD_MINGW_X64=@BUILD_MINGW_X64@
|
||||
DISABLE_NPCAP=@DISABLE_NPCAP@
|
||||
EXE_SUFFIX=@EXE_SUFFIX@
|
||||
SRCHOME=../src
|
||||
CFLAGS=-g -fPIC -DPIC -I$(SRCHOME)/include @PCAP_INC@ @CFLAGS@
|
||||
ifneq ($(OS),Windows_NT)
|
||||
CFLAGS+=-fPIC -DPIC
|
||||
endif
|
||||
CFLAGS+=-I$(SRCHOME)/include @PCAP_INC@ @CFLAGS@ @GPROF_CFLAGS@
|
||||
LDFLAGS=@LDFLAGS@
|
||||
LIBNDPI=$(SRCHOME)/lib/libndpi.a
|
||||
LIBS=$(LIBNDPI) @PCAP_LIB@ @LIBS@ @ADDITIONAL_LIBS@
|
||||
HEADERS=intrusion_detection.h reader_util.h $(SRCHOME)/include/ndpi_api.h \
|
||||
LIBS=$(LIBNDPI) @PCAP_LIB@ @ADDITIONAL_LIBS@ @LIBS@ @GPROF_LIBS@
|
||||
HEADERS=reader_util.h $(SRCHOME)/include/ndpi_api.h \
|
||||
$(SRCHOME)/include/ndpi_typedefs.h $(SRCHOME)/include/ndpi_protocol_ids.h
|
||||
OBJS=ndpiReader.o reader_util.o intrusion_detection.o
|
||||
PREFIX?=@prefix@
|
||||
|
||||
ifneq ($(BUILD_MINGW),)
|
||||
SUFFIX:=.exe
|
||||
|
||||
ifeq ($(DISABLE_NPCAP),0)
|
||||
CFLAGS+=-I@srcdir@/../windows/WpdPack/Include -I@srcdir@/../windows/WpdPack/Include/pcap
|
||||
LIBS+=-Wl,-Bstatic -lpthread -Wl,-Bdynamic
|
||||
else
|
||||
CFLAGS+=-DDISABLE_NPCAP
|
||||
endif
|
||||
|
||||
ifeq ($(DISABLE_NPCAP),0)
|
||||
|
||||
ifneq ($(BUILD_MINGW_X64),)
|
||||
LIBS+=@srcdir@/../windows/WpdPack/Lib/x64/wpcap.lib
|
||||
@@ -24,13 +33,16 @@ else
|
||||
LIBS+=@srcdir@/../windows/WpdPack/Lib/wpcap.lib
|
||||
endif
|
||||
|
||||
else
|
||||
|
||||
LIBS+=-lpthread
|
||||
|
||||
endif
|
||||
|
||||
all: ndpiReader$(SUFFIX) @DPDK_TARGET@
|
||||
LIBS+=-Wl,-Bstatic -lpthread -Wl,-Bdynamic
|
||||
else
|
||||
LIBS+=-pthread
|
||||
endif
|
||||
|
||||
CFLAGS+=-pthread
|
||||
|
||||
all: ndpiReader$(EXE_SUFFIX) @DPDK_TARGET@
|
||||
|
||||
EXECUTABLE_SOURCES := ndpiReader.c ndpiSimpleIntegration.c
|
||||
COMMON_SOURCES := $(filter-out $(EXECUTABLE_SOURCES),$(wildcard *.c ))
|
||||
@@ -38,22 +50,22 @@ COMMON_SOURCES := $(filter-out $(EXECUTABLE_SOURCES),$(wildcard *.c ))
|
||||
libndpiReader.a: $(COMMON_SOURCES:%.c=%.o) $(LIBNDPI)
|
||||
$(AR) rsv libndpiReader.a $(COMMON_SOURCES:%.c=%.o)
|
||||
|
||||
ndpiReader$(SUFFIX): libndpiReader.a $(LIBNDPI) ndpiReader.o
|
||||
ndpiReader$(EXE_SUFFIX): libndpiReader.a $(LIBNDPI) ndpiReader.o
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) ndpiReader.o libndpiReader.a $(LIBS) -o $@
|
||||
|
||||
ndpiSimpleIntegration$(SUFFIX): ndpiSimpleIntegration.o
|
||||
ndpiSimpleIntegration$(EXE_SUFFIX): ndpiSimpleIntegration.o
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
|
||||
|
||||
%.o: %.c $(HEADERS) Makefile
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
||||
|
||||
install: ndpiReader$(SUFFIX)
|
||||
install: ndpiReader$(EXE_SUFFIX)
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin/
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/share/ndpi
|
||||
cp ndpiReader$(SUFFIX) $(DESTDIR)$(PREFIX)/bin/
|
||||
cp ndpiReader$(EXE_SUFFIX) $(DESTDIR)$(PREFIX)/bin/
|
||||
cp protos.txt $(DESTDIR)$(PREFIX)/share/ndpi/ndpiProtos.txt
|
||||
cp mining_hosts.txt $(DESTDIR)$(PREFIX)/share/ndpi/ndpiCustomCategory.txt
|
||||
[ -f ndpiSimpleIntegration$(SUFFIX) ] && cp ndpiSimpleIntegration$(SUFFIX) $(DESTDIR)$(PREFIX)/bin/ndpiSimpleIntegration$(SUFFIX) || true
|
||||
[ -f ndpiSimpleIntegration$(EXE_SUFFIX) ] && cp ndpiSimpleIntegration$(EXE_SUFFIX) $(DESTDIR)$(PREFIX)/bin/ndpiSimpleIntegration$(EXE_SUFFIX) || true
|
||||
[ -f build/app/ndpiReader.dpdk ] && cp build/app/ndpiReader.dpdk $(DESTDIR)$(PREFIX)/bin/ || true
|
||||
[ -f ndpiReader.dpdk ] && cp ndpiReader.dpdk $(DESTDIR)$(PREFIX)/bin/ || true
|
||||
|
||||
@@ -61,17 +73,24 @@ dpdk:
|
||||
$(MAKE) -f Makefile.dpdk
|
||||
|
||||
check:
|
||||
true # nothing to do here
|
||||
|
||||
cppcheck:
|
||||
cppcheck --template='{file}:{line}:{severity}:{message}' --quiet --enable=all --force -I$(SRCHOME)/include *.c
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o ndpiReader ndpiSimpleIntegration ndpiReader$(SUFFIX) ndpiSimpleIntegration$(SUFFIX) ndpiReader.dpdk
|
||||
/bin/rm -f *.o ndpiReader ndpiSimpleIntegration ndpiReader$(EXE_SUFFIX) ndpiSimpleIntegration$(EXE_SUFFIX) ndpiReader.dpdk
|
||||
/bin/rm -f .*.dpdk.cmd .*.o.cmd *.dpdk.map .*.o.d
|
||||
/bin/rm -f _install _postbuild _postinstall _preinstall
|
||||
/bin/rm -rf build
|
||||
|
||||
distdir:
|
||||
cp categories.txt mining_hosts.txt protos.txt README.DPDK '$(distdir)/'
|
||||
find . -maxdepth 1 -type f -name '*.c' -o -name '*.h' -o -name '*.py' | xargs -I'{}' cp '{}' '$(distdir)/{}'
|
||||
cp README.DPDK '$(distdir)/'
|
||||
find . -maxdepth 1 -type f -name '*.c' \
|
||||
-o -name '*.h' \
|
||||
-o -name '*.py' \
|
||||
-o -name '*.txt' \
|
||||
-o -name '*.csv' | xargs -I'{}' cp '{}' '$(distdir)/{}'
|
||||
|
||||
distclean: clean
|
||||
/bin/rm -f Makefile.dpdk
|
||||
|
||||
+108
-109
@@ -1,109 +1,108 @@
|
||||
################################################################
|
||||
# abuse.ch Suricata JA3 Fingerprint Blacklist (CSV) #
|
||||
# For Suricata 4.1.0 or newer #
|
||||
# Last updated: 2020-04-09 06:48:14 UTC #
|
||||
# #
|
||||
# Terms Of Use: https://sslbl.abuse.ch/blacklist/ #
|
||||
# For questions please contact sslbl [at] abuse.ch #
|
||||
################################################################
|
||||
#
|
||||
# ja3_md5,Firstseen,Lastseen,Listingreason
|
||||
b386946a5a44d1ddcc843bc75336dfce,2017-07-14 18:08:15,2019-07-27 20:42:54,Dridex
|
||||
8991a387e4cc841740f25d6f5139f92d,2017-07-14 19:02:03,2019-07-28 00:34:38,Adware
|
||||
cb98a24ee4b9134448ffb5714fd870ac,2017-07-14 19:48:28,2019-05-22 03:22:38,Dridex
|
||||
1aa7bf8b97e540ca5edd75f7b8384bfa,2017-07-14 20:23:38,2019-07-28 01:38:22,TrickBot
|
||||
3d89c0dfb1fa44911b8fa7523ef8dedb,2017-07-15 04:23:45,2021-02-01 18:23:25,Adware
|
||||
bc6c386f480ee97b9d9e52d472b772d8,2017-07-15 10:57:38,2021-02-21 13:13:30,Adware
|
||||
8f52d1ce303fb4a6515836aec3cc16b1,2017-07-15 19:05:11,2019-07-27 20:00:57,TrickBot
|
||||
d6f04b5a910115f4b50ecec09d40a1df,2017-07-15 19:42:24,2018-10-14 08:12:51,Dridex
|
||||
35c0a31c481927f022a3b530255ac080,2017-07-15 19:43:19,2021-02-06 03:21:55,Tofsee
|
||||
d551fafc4f40f1dec2bb45980bfa9492,2017-07-15 19:59:29,2020-11-16 13:06:20,Adware
|
||||
e330bca99c8a5256ae126a55c4c725c5,2017-07-15 19:59:29,2021-01-13 00:29:37,Adware
|
||||
b8f81673c0e1d29908346f3bab892b9b,2017-07-16 01:32:03,2018-12-17 06:08:03,Adware
|
||||
83e04bc58d402f9633983cbf22724b02,2017-07-16 01:32:03,2021-01-14 14:23:42,Adware
|
||||
70722097d1fe1d78d8c2164640ab6df4,2017-07-16 02:39:08,2021-02-22 04:56:57,Tofsee
|
||||
9c2589e1c0e9f533a022c6205f9719e1,2017-07-16 08:37:17,2021-02-19 08:46:32,Adware
|
||||
849b04bdbd1d2b983f6e8a457e0632a8,2017-07-16 08:37:17,2021-02-19 08:46:32,Adware
|
||||
16efcf0e00504ddfedde13bfea997952,2017-07-16 19:45:45,2020-12-23 15:10:32,Adware
|
||||
4d7a28d6f2263ed61de88ca66eb011e3,2017-07-16 21:20:29,2020-12-08 18:10:55,Tofsee
|
||||
550dce18de1bb143e69d6dd9413b8355,2017-07-16 22:17:20,2018-12-21 07:04:50,Adware
|
||||
c50f6a8b9173676b47ba6085bd0c6cee,2017-07-16 22:38:41,2019-05-21 09:42:17,TrickBot
|
||||
20dd18bdd3209ea718989030a6f93364,2017-07-18 10:22:58,2019-04-28 09:23:31,Adware
|
||||
8498fe4268764dbf926a38283e9d3d8f,2017-07-18 10:22:58,2020-12-31 02:06:27,Adware
|
||||
590a232d04d56409fab72e752a8a2634,2017-07-18 18:53:24,2020-10-11 20:48:33,Tofsee
|
||||
51a7ad14509fd614c7bb3a50c4982b8c,2017-07-19 07:28:19,2019-07-14 11:58:32,JBifrost
|
||||
96eba628dcb2b47607192ba74a3b55ba,2017-07-19 18:53:48,2021-01-04 12:45:08,Tofsee
|
||||
df5c30e670dba99f9270ed36060cf054,2017-07-20 17:44:07,2018-04-11 15:57:59,Tofsee
|
||||
098f55e27d8c4b0a590102cbdb3a5f3a,2017-07-21 09:52:01,2019-04-08 01:09:54,Adware
|
||||
46efd49abcca8ea9baa932da68fdb529,2017-07-22 14:07:36,2021-02-20 20:45:32,Adware
|
||||
29085f03f8e8a03f0b399c5c7cf0b0b8,2017-07-22 14:07:36,2021-02-21 20:56:01,Adware
|
||||
d7150af4514b868defb854db0f62a441,2017-07-23 09:39:24,2018-07-24 01:04:58,Tofsee
|
||||
03e186a7f83285e93341de478334006e,2017-07-24 18:17:14,2021-02-13 23:55:58,Tofsee
|
||||
3cda52da4ade09f1f781ad2e82dcfa20,2017-07-30 18:41:36,2019-05-21 17:34:18,Quakbot
|
||||
b13d01846ad7a14a70bf030a16775c78,2017-08-08 07:12:49,2021-02-21 01:32:12,Adware
|
||||
1543a7c46633acf71e8401baccbd0568,2017-08-08 21:32:28,2020-11-10 05:30:17,Tofsee
|
||||
1d095e68489d3c535297cd8dffb06cb9,2017-08-12 19:56:28,2020-10-28 11:06:23,Tofsee
|
||||
93d056782d649deb51cda44ecb714bb0,2017-08-28 12:20:47,2019-04-15 23:47:27,Adware
|
||||
698e36219f3979420fa2581b21dac7ec,2017-08-28 12:20:47,2020-12-31 02:06:31,Adware
|
||||
1712287800ac91b34cadd5884ce85568,2017-08-28 16:01:59,2021-01-23 09:36:32,TorrentLocker
|
||||
5e573c9c9f8ba720ef9b18e9fce2e2f7,2017-08-30 13:44:56,2021-02-17 17:11:34,Adware
|
||||
f6fd83a21f9f3c5f9ff7b5c63bbc179d,2017-10-20 08:03:21,2018-11-06 06:42:12,Adware
|
||||
92579701f145605e9edc0b01a901c6d5,2017-10-23 00:10:48,2021-02-18 22:56:49,Adware
|
||||
a61299f9b501adcf680b9275d79d4ac6,2017-11-04 18:03:59,2020-04-21 17:08:24,Tofsee
|
||||
b2b61db7b9490a60d270ccb20b462826,2017-11-14 20:12:03,2021-02-18 22:56:49,Adware
|
||||
7dcce5b76c8b17472d024758970a406b,2017-11-22 12:42:46,2020-12-22 15:15:49,Tofsee
|
||||
534ce2dbc413c68e908363b5df0ae5e0,2017-12-22 09:36:21,2019-07-27 15:22:33,TrickBot
|
||||
fb00055a1196aeea8d1bc609885ba953,2018-01-01 22:49:25,2019-04-09 06:58:58,TrickBot
|
||||
a50a861119aceb0ccc74902e8fddb618,2018-01-02 08:16:23,2018-07-05 02:33:08,Tofsee
|
||||
e7643725fcff971e3051fe0e47fc2c71,2018-01-31 08:06:13,2020-03-25 16:19:48,Tofsee
|
||||
7c410ce832e848a3321432c9a82e972b,2018-01-31 20:04:25,2021-02-21 22:51:31,Tofsee
|
||||
da949afd9bd6df820730f8f171584a71,2018-02-03 05:19:37,2021-02-21 05:20:43,Tofsee
|
||||
906004246f3ba5e755b043c057254a29,2018-03-11 08:25:38,2018-04-14 00:59:16,Tofsee
|
||||
fd80fa9c6120cdeea8520510f3c644ac,2018-03-11 09:34:30,2021-02-21 22:16:39,Tofsee
|
||||
b90bdbe961a648f0427db21aaa6ccb59,2018-03-11 10:37:43,2020-05-29 23:39:01,Tofsee
|
||||
1fe4c7a3544eb27afec2adfb3a3dbf60,2018-03-11 19:23:08,2021-02-20 11:19:52,Tofsee
|
||||
c201b92f8b483fa388be174d6689f534,2018-03-12 13:43:52,2021-01-28 06:17:06,Gozi
|
||||
9f62c4f26b90d3d757bea609e82f2eaf,2018-03-13 06:23:41,2020-12-18 16:07:31,Tofsee
|
||||
1be3ecebe5aa9d3654e6e703d81f6928,2018-03-13 11:50:02,2021-02-14 23:03:13,Ransomware.Troldesh
|
||||
e3b2ab1f9a56f2fb4c9248f2f41631fa,2018-03-15 01:06:34,2021-02-22 10:36:48,Tofsee
|
||||
dff8a0aa1c904aaea76c5bf624e88333,2018-03-18 09:41:15,2020-10-27 09:50:24,Tofsee
|
||||
17fd49722f8d11f3d76dce84f8e099a7,2018-03-19 23:02:27,2020-12-09 11:32:21,Tofsee
|
||||
911479ac8a0813ed1241b3686ccdade9,2018-03-19 23:24:59,2020-03-30 04:09:18,Tofsee
|
||||
c5deb9465d47232dd48772f9c4d14679,2018-03-22 15:42:48,2021-02-17 07:39:32,Tofsee
|
||||
f22bdd57e3a52de86cda40da2d84e83b,2018-03-27 13:40:19,2019-01-20 14:31:39,Tofsee
|
||||
d18a4da84af59e1108862a39bae7c9d4,2018-04-03 00:40:51,2021-02-06 01:53:12,Tofsee
|
||||
2d8794cb7b52b777bee2695e79c15760,2018-04-04 06:56:37,2021-02-10 08:22:31,Ransomware
|
||||
40adfd923eb82b89d8836ba37a19bca1,2018-04-15 15:49:08,2021-02-21 22:22:56,CoinMiner
|
||||
1aee0238942d453d679fc1e37a303387,2018-05-13 01:59:49,2021-02-10 13:19:24,Tofsee
|
||||
2092e1fffb45d7e4a19a57f9bc5e203a,2018-05-16 21:59:36,2018-09-05 01:58:33,Adware
|
||||
bffa4501966196d3d6e90cee1f88fc89,2018-06-07 15:08:04,2020-03-16 00:03:44,Tofsee
|
||||
807fca46d9d0cf63adf4e5e80e414bbe,2018-06-07 16:51:03,2021-02-20 03:15:38,Tofsee
|
||||
fb58831f892190644fe44e25bc830b45,2018-06-08 12:07:59,2019-05-31 21:02:37,Adware
|
||||
0cc1e84568e471aa1d62ad4158ade6b5,2018-06-24 10:50:47,2021-02-10 21:48:57,Tofsee
|
||||
d2935c58fe676744fecc8614ee5356c7,2018-08-14 21:48:41,2021-02-21 21:44:55,Adwind
|
||||
8916410db85077a5460817142dcbc8de,2018-08-21 12:32:28,2021-02-21 20:02:19,TrickBot
|
||||
c5235d3a8b9934b7fbbd204d50bc058d,2018-08-23 17:36:08,2019-10-13 05:11:09,Gootkit
|
||||
57f3642b4e37e28f5cbe3020c9331b4c,2018-08-28 15:54:53,2021-02-22 11:09:43,Gozi
|
||||
e62a5f4d538cbf169c2af71bec2399b4,2018-08-30 15:45:40,2021-02-21 20:36:55,TrickBot
|
||||
51c64c77e60f3980eea90869b68c58a8,2018-08-30 21:04:57,2021-02-21 22:09:16,Dridex
|
||||
7691297bcb20a41233fd0a0baa0a3628,2018-09-17 02:50:05,2021-02-21 17:05:57,Adware
|
||||
7dd50e112cd23734a310b90f6f44a7cd,2018-09-17 17:54:58,2021-02-22 11:14:04,Quakbot
|
||||
52c7396a501e4fecbdfa99c5408334ac,2018-09-18 00:29:04,2019-12-03 17:24:02,Tofsee
|
||||
f735bbc6b69723b9df7b0e7ef27872af,2018-10-02 18:04:16,2021-02-19 06:55:39,TrickBot
|
||||
49ed2ef3f1321e5f044f1e71b0e6fdd5,2018-10-02 18:04:17,2021-02-19 06:55:39,TrickBot
|
||||
d76ee64fb7273733cbe455ac81c292e6,2018-11-16 13:26:39,2018-11-18 19:19:36,Tofsee
|
||||
8f6c918dcb585ebbea05e2cc94530e3d,2018-11-16 13:26:41,2020-05-06 15:45:21,Tofsee
|
||||
34f14a69ad7009ca5863379218af17f3,2018-11-17 05:17:22,2021-01-28 08:19:18,Tofsee
|
||||
c2b4710c6888a5d47befe865c8e6fb19,2018-11-29 20:46:04,2020-12-16 15:08:09,Tofsee
|
||||
decfb48a53789ebe081b88aabb58ee34,2018-12-21 09:06:16,2021-02-16 12:28:53,Adwind
|
||||
08a8a4e85b25ac42e1490bc85cfdb5ce,2019-01-30 02:48:34,2020-10-27 09:50:19,Tofsee
|
||||
c0220cd64849a629397a9cb68f78a0ea,2019-03-24 00:12:32,2021-02-13 05:13:33,Tofsee
|
||||
7a29c223fb122ec64d10f0a159e07996,2019-06-09 22:55:29,2020-10-27 09:50:26,Tofsee
|
||||
44dab16d680ef93487bc16ad23b3ffb1,2019-06-09 22:55:29,2020-10-27 09:50:25,Tofsee
|
||||
70a04365be5bbd4653698bebeb43ce68,2019-07-02 06:26:56,2020-05-30 04:19:00,Tofsee
|
||||
d81d654effb94714a4086734fa0adad9,2019-07-16 23:29:02,2020-10-27 09:50:21,Tofsee
|
||||
25d74b7b4b779eb1efd4b31d26d651c6,2019-08-03 20:15:33,2020-07-14 21:43:25,Tofsee
|
||||
fc2299d5b2964cd242c5a2c8c531a5f0,2019-08-09 23:56:32,2021-02-22 08:49:18,Tofsee
|
||||
32926ca3e59f0413d0b98725454594f5,2019-09-12 06:56:10,2020-10-27 21:49:31,Tofsee
|
||||
ffefafdb86336d057eda5fdf02b3d5ce,2019-10-26 07:31:49,2020-07-25 00:14:09,Tofsee
|
||||
# END (98) entries
|
||||
################################################################
|
||||
# abuse.ch Suricata JA3 Fingerprint Blacklist (CSV) #
|
||||
# For Suricata 4.1.0 or newer #
|
||||
# Last updated: 2021-08-03 14:33:44 UTC #
|
||||
# #
|
||||
# Terms Of Use: https://sslbl.abuse.ch/blacklist/ #
|
||||
# For questions please contact sslbl [at] abuse.ch #
|
||||
################################################################
|
||||
#
|
||||
# ja3_md5,Firstseen,Lastseen,Listingreason
|
||||
b386946a5a44d1ddcc843bc75336dfce,2017-07-14 18:08:15,2019-07-27 20:42:54,Dridex
|
||||
8991a387e4cc841740f25d6f5139f92d,2017-07-14 19:02:03,2019-07-28 00:34:38,Adware
|
||||
cb98a24ee4b9134448ffb5714fd870ac,2017-07-14 19:48:28,2019-05-22 03:22:38,Dridex
|
||||
1aa7bf8b97e540ca5edd75f7b8384bfa,2017-07-14 20:23:38,2019-07-28 01:38:22,TrickBot
|
||||
3d89c0dfb1fa44911b8fa7523ef8dedb,2017-07-15 04:23:45,2021-02-01 18:23:25,Adware
|
||||
bc6c386f480ee97b9d9e52d472b772d8,2017-07-15 10:57:38,2021-03-13 07:33:39,Adware
|
||||
8f52d1ce303fb4a6515836aec3cc16b1,2017-07-15 19:05:11,2019-07-27 20:00:57,TrickBot
|
||||
d6f04b5a910115f4b50ecec09d40a1df,2017-07-15 19:42:24,2018-10-14 08:12:51,Dridex
|
||||
35c0a31c481927f022a3b530255ac080,2017-07-15 19:43:19,2021-04-10 12:54:04,Tofsee
|
||||
e330bca99c8a5256ae126a55c4c725c5,2017-07-15 19:59:29,2021-01-13 00:29:37,Adware
|
||||
d551fafc4f40f1dec2bb45980bfa9492,2017-07-15 19:59:29,2020-11-16 13:06:20,Adware
|
||||
83e04bc58d402f9633983cbf22724b02,2017-07-16 01:32:03,2021-03-02 04:07:43,Adware
|
||||
b8f81673c0e1d29908346f3bab892b9b,2017-07-16 01:32:03,2021-03-02 04:07:36,Adware
|
||||
70722097d1fe1d78d8c2164640ab6df4,2017-07-16 02:39:08,2021-05-04 09:52:20,Tofsee
|
||||
9c2589e1c0e9f533a022c6205f9719e1,2017-07-16 08:37:17,2021-07-25 08:33:18,Adware
|
||||
849b04bdbd1d2b983f6e8a457e0632a8,2017-07-16 08:37:17,2021-07-25 08:33:18,Adware
|
||||
16efcf0e00504ddfedde13bfea997952,2017-07-16 19:45:45,2020-12-23 15:10:32,Adware
|
||||
4d7a28d6f2263ed61de88ca66eb011e3,2017-07-16 21:20:29,2020-12-08 18:10:55,Tofsee
|
||||
550dce18de1bb143e69d6dd9413b8355,2017-07-16 22:17:20,2018-12-21 07:04:50,Adware
|
||||
c50f6a8b9173676b47ba6085bd0c6cee,2017-07-16 22:38:41,2019-05-21 09:42:17,TrickBot
|
||||
590a232d04d56409fab72e752a8a2634,2017-07-18 18:53:24,2020-10-11 20:48:33,Tofsee
|
||||
51a7ad14509fd614c7bb3a50c4982b8c,2017-07-19 07:28:19,2019-07-14 11:58:32,JBifrost
|
||||
96eba628dcb2b47607192ba74a3b55ba,2017-07-19 18:53:48,2021-07-31 01:48:32,Tofsee
|
||||
df5c30e670dba99f9270ed36060cf054,2017-07-20 17:44:07,2018-04-11 15:57:59,Tofsee
|
||||
098f55e27d8c4b0a590102cbdb3a5f3a,2017-07-21 09:52:01,2019-04-08 01:09:54,Adware
|
||||
29085f03f8e8a03f0b399c5c7cf0b0b8,2017-07-22 14:07:36,2021-04-11 06:42:45,Adware
|
||||
46efd49abcca8ea9baa932da68fdb529,2017-07-22 14:07:36,2021-04-11 05:54:57,Adware
|
||||
d7150af4514b868defb854db0f62a441,2017-07-23 09:39:24,2018-07-24 01:04:58,Tofsee
|
||||
03e186a7f83285e93341de478334006e,2017-07-24 18:17:14,2021-03-20 07:45:40,Tofsee
|
||||
3cda52da4ade09f1f781ad2e82dcfa20,2017-07-30 18:41:36,2019-05-21 17:34:18,Quakbot
|
||||
b13d01846ad7a14a70bf030a16775c78,2017-08-08 07:12:49,2021-04-10 00:03:33,Adware
|
||||
1543a7c46633acf71e8401baccbd0568,2017-08-08 21:32:28,2021-04-08 19:50:46,Tofsee
|
||||
1d095e68489d3c535297cd8dffb06cb9,2017-08-12 19:56:28,2020-10-28 11:06:23,Tofsee
|
||||
698e36219f3979420fa2581b21dac7ec,2017-08-28 12:20:47,2020-12-31 02:06:31,Adware
|
||||
93d056782d649deb51cda44ecb714bb0,2017-08-28 12:20:47,2019-04-15 23:47:27,Adware
|
||||
1712287800ac91b34cadd5884ce85568,2017-08-28 16:01:59,2021-07-28 14:16:00,TorrentLocker
|
||||
5e573c9c9f8ba720ef9b18e9fce2e2f7,2017-08-30 13:44:56,2021-03-13 07:33:38,Adware
|
||||
f6fd83a21f9f3c5f9ff7b5c63bbc179d,2017-10-20 08:03:21,2018-11-06 06:42:12,Adware
|
||||
92579701f145605e9edc0b01a901c6d5,2017-10-23 00:10:48,2021-07-25 17:07:34,Adware
|
||||
a61299f9b501adcf680b9275d79d4ac6,2017-11-04 18:03:59,2020-04-21 17:08:24,Tofsee
|
||||
b2b61db7b9490a60d270ccb20b462826,2017-11-14 20:12:03,2021-06-06 20:27:10,Adware
|
||||
7dcce5b76c8b17472d024758970a406b,2017-11-22 12:42:46,2021-03-16 12:53:35,Tofsee
|
||||
534ce2dbc413c68e908363b5df0ae5e0,2017-12-22 09:36:21,2019-07-27 15:22:33,TrickBot
|
||||
fb00055a1196aeea8d1bc609885ba953,2018-01-01 22:49:25,2019-04-09 06:58:58,TrickBot
|
||||
a50a861119aceb0ccc74902e8fddb618,2018-01-02 08:16:23,2018-07-05 02:33:08,Tofsee
|
||||
e7643725fcff971e3051fe0e47fc2c71,2018-01-31 08:06:13,2020-03-25 16:19:48,Tofsee
|
||||
7c410ce832e848a3321432c9a82e972b,2018-01-31 20:04:25,2021-08-01 06:13:14,Tofsee
|
||||
da949afd9bd6df820730f8f171584a71,2018-02-03 05:19:37,2021-03-08 22:10:10,Tofsee
|
||||
906004246f3ba5e755b043c057254a29,2018-03-11 08:25:38,2018-04-14 00:59:16,Tofsee
|
||||
fd80fa9c6120cdeea8520510f3c644ac,2018-03-11 09:34:30,2021-08-11 12:34:00,Tofsee
|
||||
b90bdbe961a648f0427db21aaa6ccb59,2018-03-11 10:37:43,2020-05-29 23:39:01,Tofsee
|
||||
1fe4c7a3544eb27afec2adfb3a3dbf60,2018-03-11 19:23:08,2021-08-09 11:42:58,Tofsee
|
||||
c201b92f8b483fa388be174d6689f534,2018-03-12 13:43:52,2021-01-28 06:17:06,Gozi
|
||||
9f62c4f26b90d3d757bea609e82f2eaf,2018-03-13 06:23:41,2021-05-20 23:01:06,Tofsee
|
||||
1be3ecebe5aa9d3654e6e703d81f6928,2018-03-13 11:50:02,2021-08-11 13:02:35,Ransomware.Troldesh
|
||||
e3b2ab1f9a56f2fb4c9248f2f41631fa,2018-03-15 01:06:34,2021-07-02 21:51:49,Tofsee
|
||||
dff8a0aa1c904aaea76c5bf624e88333,2018-03-18 09:41:15,2020-10-27 09:50:24,Tofsee
|
||||
17fd49722f8d11f3d76dce84f8e099a7,2018-03-19 23:02:27,2021-08-01 00:40:52,Tofsee
|
||||
911479ac8a0813ed1241b3686ccdade9,2018-03-19 23:24:59,2020-03-30 04:09:18,Tofsee
|
||||
c5deb9465d47232dd48772f9c4d14679,2018-03-22 15:42:48,2021-03-23 00:34:25,Tofsee
|
||||
f22bdd57e3a52de86cda40da2d84e83b,2018-03-27 13:40:19,2019-01-20 14:31:39,Tofsee
|
||||
d18a4da84af59e1108862a39bae7c9d4,2018-04-03 00:40:51,2021-02-06 01:53:12,Tofsee
|
||||
2d8794cb7b52b777bee2695e79c15760,2018-04-04 06:56:37,2021-07-26 08:07:00,Ransomware
|
||||
40adfd923eb82b89d8836ba37a19bca1,2018-04-15 15:49:08,2021-04-11 04:42:47,CoinMiner
|
||||
1aee0238942d453d679fc1e37a303387,2018-05-13 01:59:49,2021-07-30 12:27:07,Tofsee
|
||||
2092e1fffb45d7e4a19a57f9bc5e203a,2018-05-16 21:59:36,2018-09-05 01:58:33,Adware
|
||||
bffa4501966196d3d6e90cee1f88fc89,2018-06-07 15:08:04,2020-03-16 00:03:44,Tofsee
|
||||
807fca46d9d0cf63adf4e5e80e414bbe,2018-06-07 16:51:03,2021-08-07 03:15:42,Tofsee
|
||||
fb58831f892190644fe44e25bc830b45,2018-06-08 12:07:59,2021-07-20 01:39:05,Adware
|
||||
0cc1e84568e471aa1d62ad4158ade6b5,2018-06-24 10:50:47,2021-06-21 02:35:57,Tofsee
|
||||
d2935c58fe676744fecc8614ee5356c7,2018-08-14 21:48:41,2021-08-11 11:54:42,Adwind
|
||||
8916410db85077a5460817142dcbc8de,2018-08-21 12:32:28,2021-08-11 15:00:50,TrickBot
|
||||
c5235d3a8b9934b7fbbd204d50bc058d,2018-08-23 17:36:08,2019-10-13 05:11:09,Gootkit
|
||||
57f3642b4e37e28f5cbe3020c9331b4c,2018-08-28 15:54:53,2021-08-11 13:05:18,Gozi
|
||||
e62a5f4d538cbf169c2af71bec2399b4,2018-08-30 15:45:40,2021-08-11 09:48:52,TrickBot
|
||||
51c64c77e60f3980eea90869b68c58a8,2018-08-30 21:04:57,2021-08-11 08:13:08,Dridex
|
||||
7691297bcb20a41233fd0a0baa0a3628,2018-09-17 02:50:05,2021-08-11 12:20:33,Adware
|
||||
7dd50e112cd23734a310b90f6f44a7cd,2018-09-17 17:54:58,2021-08-01 11:28:46,Quakbot
|
||||
52c7396a501e4fecbdfa99c5408334ac,2018-09-18 00:29:04,2019-12-03 17:24:02,Tofsee
|
||||
fc54e0d16d9764783542f0146a98b300,2018-09-24 12:33:44,2021-08-11 12:51:10,AsyncRAT
|
||||
f735bbc6b69723b9df7b0e7ef27872af,2018-10-02 18:04:16,2021-08-11 07:25:14,TrickBot
|
||||
49ed2ef3f1321e5f044f1e71b0e6fdd5,2018-10-02 18:04:17,2021-08-08 22:08:01,TrickBot
|
||||
d76ee64fb7273733cbe455ac81c292e6,2018-11-16 13:26:39,2018-11-18 19:19:36,Tofsee
|
||||
8f6c918dcb585ebbea05e2cc94530e3d,2018-11-16 13:26:41,2020-05-06 15:45:21,Tofsee
|
||||
34f14a69ad7009ca5863379218af17f3,2018-11-17 05:17:22,2021-01-28 08:19:18,Tofsee
|
||||
c2b4710c6888a5d47befe865c8e6fb19,2018-11-29 20:46:04,2021-08-03 23:37:22,Tofsee
|
||||
decfb48a53789ebe081b88aabb58ee34,2018-12-21 09:06:16,2021-06-14 05:27:16,Adwind
|
||||
08a8a4e85b25ac42e1490bc85cfdb5ce,2019-01-30 02:48:34,2020-10-27 09:50:19,Tofsee
|
||||
c0220cd64849a629397a9cb68f78a0ea,2019-03-24 00:12:32,2021-07-31 00:26:06,Tofsee
|
||||
7a29c223fb122ec64d10f0a159e07996,2019-06-09 22:55:29,2020-10-27 09:50:26,None
|
||||
70a04365be5bbd4653698bebeb43ce68,2019-07-02 06:26:56,2020-05-30 04:19:00,Tofsee
|
||||
d81d654effb94714a4086734fa0adad9,2019-07-16 23:29:02,2020-10-27 09:50:21,Tofsee
|
||||
25d74b7b4b779eb1efd4b31d26d651c6,2019-08-03 20:15:33,2020-07-14 21:43:25,Tofsee
|
||||
fc2299d5b2964cd242c5a2c8c531a5f0,2019-08-09 23:56:32,2021-08-11 02:20:22,Tofsee
|
||||
32926ca3e59f0413d0b98725454594f5,2019-09-12 06:56:10,2021-04-08 19:50:43,Tofsee
|
||||
ffefafdb86336d057eda5fdf02b3d5ce,2019-10-26 07:31:49,2020-07-25 00:14:09,Tofsee
|
||||
8515076cbbca9dce33151b798f782456,2020-12-27 16:53:04,2021-08-11 15:06:36,BitRAT
|
||||
# END (97) entries
|
||||
|
+1541
-915
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,25 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (C) 2011-22 - ntop.org
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef WIN32
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#else
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
#include <ndpi_api.h>
|
||||
@@ -16,6 +33,10 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
//#define VERBOSE 1
|
||||
#define MAX_FLOW_ROOTS_PER_THREAD 2048
|
||||
#define MAX_IDLE_FLOWS_PER_THREAD 64
|
||||
@@ -90,7 +111,7 @@ struct nDPI_flow_info {
|
||||
struct nDPI_workflow {
|
||||
pcap_t * pcap_handle;
|
||||
|
||||
uint8_t error_or_eof;
|
||||
volatile long int error_or_eof;
|
||||
|
||||
unsigned long long int packets_captured;
|
||||
unsigned long long int packets_processed;
|
||||
@@ -121,8 +142,8 @@ struct nDPI_reader_thread {
|
||||
|
||||
static struct nDPI_reader_thread reader_threads[MAX_READER_THREADS] = {};
|
||||
static int reader_thread_count = MAX_READER_THREADS;
|
||||
static int main_thread_shutdown = 0;
|
||||
static uint32_t flow_id = 0;
|
||||
static volatile long int main_thread_shutdown = 0;
|
||||
static volatile long int flow_id = 0;
|
||||
|
||||
static void free_workflow(struct nDPI_workflow ** const workflow);
|
||||
|
||||
@@ -130,7 +151,10 @@ static struct nDPI_workflow * init_workflow(char const * const file_or_device)
|
||||
{
|
||||
char pcap_error_buffer[PCAP_ERRBUF_SIZE];
|
||||
struct nDPI_workflow * workflow = (struct nDPI_workflow *)ndpi_calloc(1, sizeof(*workflow));
|
||||
|
||||
const char *bpfFilter = "ip or ip6";
|
||||
static struct bpf_program bpf_code;
|
||||
static struct bpf_program *bpf_cfilter = NULL;
|
||||
|
||||
if (workflow == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -153,6 +177,17 @@ static struct nDPI_workflow * init_workflow(char const * const file_or_device)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(pcap_compile(workflow->pcap_handle, &bpf_code, bpfFilter, 1, 0xFFFFFF00) < 0) {
|
||||
printf("pcap_compile error: '%s'\n", pcap_geterr(workflow->pcap_handle));
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
bpf_cfilter = &bpf_code;
|
||||
|
||||
if(pcap_setfilter(workflow->pcap_handle, bpf_cfilter) < 0) {
|
||||
printf("pcap_setfilter error: '%s'\n", pcap_geterr(workflow->pcap_handle));
|
||||
}
|
||||
|
||||
ndpi_init_prefs init_prefs = ndpi_no_prefs;
|
||||
workflow->ndpi_struct = ndpi_init_detection_module(init_prefs);
|
||||
if (workflow->ndpi_struct == NULL) {
|
||||
@@ -300,7 +335,7 @@ static void print_packet_info(struct nDPI_reader_thread const * const reader_thr
|
||||
char buf[256];
|
||||
int used = 0, ret;
|
||||
|
||||
ret = snprintf(buf, sizeof(buf), "[%8llu, %d, %4u] %4u bytes: ",
|
||||
ret = ndpi_snprintf(buf, sizeof(buf), "[%8llu, %d, %4u] %4u bytes: ",
|
||||
workflow->packets_captured, reader_thread->array_index,
|
||||
flow->flow_id, header->caplen);
|
||||
if (ret > 0) {
|
||||
@@ -308,9 +343,9 @@ static void print_packet_info(struct nDPI_reader_thread const * const reader_thr
|
||||
}
|
||||
|
||||
if (ip_tuple_to_string(flow, src_addr_str, sizeof(src_addr_str), dst_addr_str, sizeof(dst_addr_str)) != 0) {
|
||||
ret = snprintf(buf + used, sizeof(buf) - used, "IP[%s -> %s]", src_addr_str, dst_addr_str);
|
||||
ret = ndpi_snprintf(buf + used, sizeof(buf) - used, "IP[%s -> %s]", src_addr_str, dst_addr_str);
|
||||
} else {
|
||||
ret = snprintf(buf + used, sizeof(buf) - used, "IP[ERROR]");
|
||||
ret = ndpi_snprintf(buf + used, sizeof(buf) - used, "IP[ERROR]");
|
||||
}
|
||||
if (ret > 0) {
|
||||
used += ret;
|
||||
@@ -318,24 +353,24 @@ static void print_packet_info(struct nDPI_reader_thread const * const reader_thr
|
||||
|
||||
switch (flow->l4_protocol) {
|
||||
case IPPROTO_UDP:
|
||||
ret = snprintf(buf + used, sizeof(buf) - used, " -> UDP[%u -> %u, %u bytes]",
|
||||
ret = ndpi_snprintf(buf + used, sizeof(buf) - used, " -> UDP[%u -> %u, %u bytes]",
|
||||
flow->src_port, flow->dst_port, l4_data_len);
|
||||
break;
|
||||
case IPPROTO_TCP:
|
||||
ret = snprintf(buf + used, sizeof(buf) - used, " -> TCP[%u -> %u, %u bytes]",
|
||||
ret = ndpi_snprintf(buf + used, sizeof(buf) - used, " -> TCP[%u -> %u, %u bytes]",
|
||||
flow->src_port, flow->dst_port, l4_data_len);
|
||||
break;
|
||||
case IPPROTO_ICMP:
|
||||
ret = snprintf(buf + used, sizeof(buf) - used, " -> ICMP");
|
||||
ret = ndpi_snprintf(buf + used, sizeof(buf) - used, " -> ICMP");
|
||||
break;
|
||||
case IPPROTO_ICMPV6:
|
||||
ret = snprintf(buf + used, sizeof(buf) - used, " -> ICMP6");
|
||||
ret = ndpi_snprintf(buf + used, sizeof(buf) - used, " -> ICMP6");
|
||||
break;
|
||||
case IPPROTO_HOPOPTS:
|
||||
ret = snprintf(buf + used, sizeof(buf) - used, " -> ICMP6 Hop-By-Hop");
|
||||
ret = ndpi_snprintf(buf + used, sizeof(buf) - used, " -> ICMP6 Hop-By-Hop");
|
||||
break;
|
||||
default:
|
||||
ret = snprintf(buf + used, sizeof(buf) - used, " -> Unknown[0x%X]", flow->l4_protocol);
|
||||
ret = ndpi_snprintf(buf + used, sizeof(buf) - used, " -> Unknown[0x%X]", flow->l4_protocol);
|
||||
break;
|
||||
}
|
||||
if (ret > 0) {
|
||||
@@ -776,8 +811,6 @@ static void ndpi_process_packet(uint8_t * const args,
|
||||
return;
|
||||
}
|
||||
|
||||
workflow->cur_active_flows++;
|
||||
workflow->total_active_flows++;
|
||||
memcpy(flow_to_process, &flow, sizeof(*flow_to_process));
|
||||
flow_to_process->flow_id = __sync_fetch_and_add(&flow_id, 1);
|
||||
|
||||
@@ -796,6 +829,9 @@ static void ndpi_process_packet(uint8_t * const args,
|
||||
/* Possible Leak, but should not happen as we'd abort earlier. */
|
||||
return;
|
||||
}
|
||||
|
||||
workflow->cur_active_flows++;
|
||||
workflow->total_active_flows++;
|
||||
} else {
|
||||
flow_to_process = *(struct nDPI_flow_info **)tree_result;
|
||||
}
|
||||
@@ -1101,9 +1137,10 @@ static void sighandler(int signum)
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
if (argc == 0) {
|
||||
printf("usage: ndpiSimpleIntegration Mdevice name>\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
printf("usage: %s [PCAP-FILE-OR-INTERFACE]\n"
|
||||
"----------------------------------\n"
|
||||
"nDPI version: %s\n"
|
||||
|
||||
+165
-127
@@ -21,9 +21,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "ndpi_config.h"
|
||||
#endif
|
||||
#include "ndpi_api.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
@@ -31,9 +30,13 @@
|
||||
|
||||
#ifdef WIN32
|
||||
#include <winsock2.h> /* winsock.h is included automatically */
|
||||
#include <windows.h>
|
||||
#include <ws2tcpip.h>
|
||||
#include <process.h>
|
||||
#include <io.h>
|
||||
#ifndef DISABLE_NPCAP
|
||||
#include <ip6_misc.h>
|
||||
#endif
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <netinet/in.h>
|
||||
@@ -391,7 +394,8 @@ extern char *_debug_protocols;
|
||||
static int _debug_protocols_ok = 0;
|
||||
|
||||
struct ndpi_workflow* ndpi_workflow_init(const struct ndpi_workflow_prefs * prefs,
|
||||
pcap_t * pcap_handle) {
|
||||
pcap_t * pcap_handle, int do_init_flows_root,
|
||||
ndpi_serialization_format serialization_format) {
|
||||
struct ndpi_detection_module_struct * module;
|
||||
struct ndpi_workflow * workflow;
|
||||
|
||||
@@ -427,7 +431,16 @@ struct ndpi_workflow* ndpi_workflow_init(const struct ndpi_workflow_prefs * pref
|
||||
if(_debug_protocols_ok)
|
||||
ndpi_set_debug_bitmask(module, debug_bitmask);
|
||||
|
||||
workflow->ndpi_flows_root = ndpi_calloc(workflow->prefs.num_roots, sizeof(void *));
|
||||
if(do_init_flows_root)
|
||||
workflow->ndpi_flows_root = ndpi_calloc(workflow->prefs.num_roots, sizeof(void *));
|
||||
|
||||
if (serialization_format != ndpi_serialization_format_unknown &&
|
||||
ndpi_init_serializer(&workflow->ndpi_serializer,
|
||||
serialization_format) != 0)
|
||||
{
|
||||
LOG(NDPI_LOG_ERROR, "serializer initialization failed\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
return workflow;
|
||||
}
|
||||
@@ -528,6 +541,8 @@ void ndpi_flow_info_free_data(struct ndpi_flow_info *flow) {
|
||||
#else
|
||||
ndpi_free_bin(&flow->payload_len_bin);
|
||||
#endif
|
||||
|
||||
if(flow->risk_str) ndpi_free(flow->risk_str);
|
||||
}
|
||||
|
||||
/* ***************************************************** */
|
||||
@@ -535,6 +550,8 @@ void ndpi_flow_info_free_data(struct ndpi_flow_info *flow) {
|
||||
void ndpi_workflow_free(struct ndpi_workflow * workflow) {
|
||||
u_int i;
|
||||
|
||||
ndpi_term_serializer(&workflow->ndpi_serializer);
|
||||
|
||||
for(i=0; i<workflow->prefs.num_roots; i++)
|
||||
ndpi_tdestroy(workflow->ndpi_flows_root[i], ndpi_flow_info_freer);
|
||||
|
||||
@@ -543,6 +560,13 @@ void ndpi_workflow_free(struct ndpi_workflow * workflow) {
|
||||
ndpi_free(workflow);
|
||||
}
|
||||
|
||||
static inline int cmp_n32(uint32_t a,uint32_t b) {
|
||||
return a == b ? 0 : ntohl(a) < ntohl(b) ? -1:1;
|
||||
}
|
||||
static inline int cmp_n16(uint16_t a,uint16_t b) {
|
||||
return a == b ? 0 : ntohs(a) < ntohs(b) ? -1:1;
|
||||
}
|
||||
|
||||
/* ***************************************************** */
|
||||
|
||||
int ndpi_workflow_node_cmp(const void *a, const void *b) {
|
||||
@@ -556,29 +580,13 @@ int ndpi_workflow_node_cmp(const void *a, const void *b) {
|
||||
if(fa->vlan_id < fb->vlan_id ) return(-1); else { if(fa->vlan_id > fb->vlan_id ) return(1); }
|
||||
if(fa->protocol < fb->protocol ) return(-1); else { if(fa->protocol > fb->protocol ) return(1); }
|
||||
|
||||
if(
|
||||
(
|
||||
(fa->src_ip == fb->src_ip )
|
||||
&& (fa->src_port == fb->src_port)
|
||||
&& (fa->dst_ip == fb->dst_ip )
|
||||
&& (fa->dst_port == fb->dst_port)
|
||||
)
|
||||
||
|
||||
(
|
||||
(fa->src_ip == fb->dst_ip )
|
||||
&& (fa->src_port == fb->dst_port)
|
||||
&& (fa->dst_ip == fb->src_ip )
|
||||
&& (fa->dst_port == fb->src_port)
|
||||
)
|
||||
)
|
||||
return(0);
|
||||
int r;
|
||||
r = cmp_n32(fa->src_ip, fb->src_ip); if(r) return r;
|
||||
r = cmp_n16(fa->src_port, fb->src_port) ; if(r) return r;
|
||||
r = cmp_n32(fa->dst_ip, fb->dst_ip); if(r) return r;
|
||||
r = cmp_n16(fa->dst_port, fb->dst_port);
|
||||
|
||||
if(fa->src_ip < fb->src_ip ) return(-1); else { if(fa->src_ip > fb->src_ip ) return(1); }
|
||||
if(fa->src_port < fb->src_port) return(-1); else { if(fa->src_port > fb->src_port) return(1); }
|
||||
if(fa->dst_ip < fb->dst_ip ) return(-1); else { if(fa->dst_ip > fb->dst_ip ) return(1); }
|
||||
if(fa->dst_port < fb->dst_port) return(-1); else { if(fa->dst_port > fb->dst_port) return(1); }
|
||||
|
||||
return(0); /* notreached */
|
||||
return(r);
|
||||
}
|
||||
|
||||
/* ***************************************************** */
|
||||
@@ -788,11 +796,17 @@ static struct ndpi_flow_info *get_ndpi_flow_info(struct ndpi_workflow * workflow
|
||||
flow.protocol = iph->protocol, flow.vlan_id = vlan_id;
|
||||
flow.src_ip = iph->saddr, flow.dst_ip = iph->daddr;
|
||||
flow.src_port = htons(*sport), flow.dst_port = htons(*dport);
|
||||
flow.hashval = hashval = flow.protocol + flow.src_ip + flow.dst_ip + flow.src_port + flow.dst_port;
|
||||
flow.hashval = hashval = flow.protocol + ntohl(flow.src_ip) + ntohl(flow.dst_ip)
|
||||
+ ntohs(flow.src_port) + ntohs(flow.dst_port);
|
||||
|
||||
#if 0
|
||||
printf("hashval=%u [%u][%u][%u:%u][%u:%u]\n", hashval, flow.protocol, flow.vlan_id,
|
||||
flow.src_ip, flow.src_port, ntohs(flow.dst_ip), ntohs(flow.dst_port));
|
||||
{
|
||||
char ip1[48],ip2[48];
|
||||
inet_ntop(AF_INET, &flow.src_ip, ip1, sizeof(ip1));
|
||||
inet_ntop(AF_INET, &flow.dst_ip, ip2, sizeof(ip2));
|
||||
printf("hashval=%u [%u][%u][%s:%u][%s:%u]\n", hashval, flow.protocol, flow.vlan_id,
|
||||
ip1, ntohs(flow.src_port), ip2, ntohs(flow.dst_port));
|
||||
}
|
||||
#endif
|
||||
|
||||
idx = hashval % workflow->prefs.num_roots;
|
||||
@@ -856,10 +870,14 @@ static struct ndpi_flow_info *get_ndpi_flow_info(struct ndpi_workflow * workflow
|
||||
inet_ntop(AF_INET, &newflow->src_ip, newflow->src_name, sizeof(newflow->src_name));
|
||||
inet_ntop(AF_INET, &newflow->dst_ip, newflow->dst_name, sizeof(newflow->dst_name));
|
||||
} else {
|
||||
inet_ntop(AF_INET6, &iph6->ip6_src, newflow->src_name, sizeof(newflow->src_name));
|
||||
inet_ntop(AF_INET6, &iph6->ip6_dst, newflow->dst_name, sizeof(newflow->dst_name));
|
||||
/* For consistency across platforms replace :0: with :: */
|
||||
ndpi_patchIPv6Address(newflow->src_name), ndpi_patchIPv6Address(newflow->dst_name);
|
||||
newflow->src_ip6 = *(struct ndpi_in6_addr *)&iph6->ip6_src;
|
||||
inet_ntop(AF_INET6, &newflow->src_ip6,
|
||||
newflow->src_name, sizeof(newflow->src_name));
|
||||
newflow->dst_ip6 = *(struct ndpi_in6_addr *)&iph6->ip6_dst;
|
||||
inet_ntop(AF_INET6, &newflow->dst_ip6,
|
||||
newflow->dst_name, sizeof(newflow->dst_name));
|
||||
/* For consistency across platforms replace :0: with :: */
|
||||
ndpi_patchIPv6Address(newflow->src_name), ndpi_patchIPv6Address(newflow->dst_name);
|
||||
}
|
||||
|
||||
if((newflow->ndpi_flow = ndpi_flow_malloc(SIZEOF_FLOW_STRUCT)) == NULL) {
|
||||
@@ -904,24 +922,10 @@ static struct ndpi_flow_info *get_ndpi_flow_info(struct ndpi_workflow * workflow
|
||||
struct ndpi_flow_info *rflow = *(struct ndpi_flow_info**)ret;
|
||||
|
||||
if(is_changed) {
|
||||
if(rflow->src_ip == iph->saddr
|
||||
&& rflow->dst_ip == iph->daddr
|
||||
&& rflow->src_port == htons(*sport)
|
||||
&& rflow->dst_port == htons(*dport)
|
||||
)
|
||||
*src_to_dst_direction = 0, rflow->bidirectional = 1;
|
||||
else
|
||||
*src_to_dst_direction = 1;
|
||||
*src_to_dst_direction = 0, rflow->bidirectional |= 1;
|
||||
}
|
||||
else {
|
||||
if(rflow->src_ip == iph->saddr
|
||||
&& rflow->dst_ip == iph->daddr
|
||||
&& rflow->src_port == htons(*sport)
|
||||
&& rflow->dst_port == htons(*dport)
|
||||
)
|
||||
*src_to_dst_direction = 1;
|
||||
else
|
||||
*src_to_dst_direction = 0, rflow->bidirectional = 1;
|
||||
}
|
||||
if(enable_flow_stats) {
|
||||
if(src_to_dst_direction) {
|
||||
@@ -983,6 +987,8 @@ static struct ndpi_flow_info *get_ndpi_flow_info6(struct ndpi_workflow * workflo
|
||||
u_int8_t l4proto = iph6->ip6_hdr.ip6_un1_nxt;
|
||||
u_int16_t ip_len = ntohs(iph6->ip6_hdr.ip6_un1_plen);
|
||||
const u_int8_t *l4ptr = (((const u_int8_t *) iph6) + sizeof(struct ndpi_ipv6hdr));
|
||||
if(ipsize < sizeof(struct ndpi_ipv6hdr) + ip_len)
|
||||
return(NULL);
|
||||
if(ndpi_handle_ipv6_extension_headers(ipsize - sizeof(struct ndpi_ipv6hdr), &l4ptr, &ip_len, &l4proto) != 0) {
|
||||
return(NULL);
|
||||
}
|
||||
@@ -1030,17 +1036,25 @@ u_int8_t plen2slot(u_int16_t plen) {
|
||||
|
||||
/* ****************************************************** */
|
||||
|
||||
void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_flow_info *flow, FILE * csv_fp) {
|
||||
void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_flow_info *flow) {
|
||||
u_int i, is_quic = 0;
|
||||
|
||||
char out[128], *s;
|
||||
|
||||
if(!flow->ndpi_flow) return;
|
||||
|
||||
flow->info_type = INFO_INVALID;
|
||||
|
||||
s = ndpi_get_flow_risk_info(flow->ndpi_flow, out, sizeof(out), 0 /* text */);
|
||||
|
||||
if(s != NULL)
|
||||
flow->risk_str = ndpi_strdup(s);
|
||||
|
||||
flow->confidence = flow->ndpi_flow->confidence;
|
||||
|
||||
snprintf(flow->host_server_name, sizeof(flow->host_server_name), "%s",
|
||||
ndpi_snprintf(flow->host_server_name, sizeof(flow->host_server_name), "%s",
|
||||
flow->ndpi_flow->host_server_name);
|
||||
|
||||
snprintf(flow->flow_extra_info, sizeof(flow->flow_extra_info), "%s",
|
||||
ndpi_snprintf(flow->flow_extra_info, sizeof(flow->flow_extra_info), "%s",
|
||||
flow->ndpi_flow->flow_extra_info);
|
||||
|
||||
flow->risk = flow->ndpi_flow->risk;
|
||||
@@ -1068,8 +1082,11 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
|
||||
/* DNS */
|
||||
else if(is_ndpi_proto(flow, NDPI_PROTOCOL_DNS)) {
|
||||
if(flow->ndpi_flow->protos.dns.rsp_type == 0x1)
|
||||
{
|
||||
flow->info_type = INFO_GENERIC;
|
||||
inet_ntop(AF_INET, &flow->ndpi_flow->protos.dns.rsp_addr.ipv4, flow->info, sizeof(flow->info));
|
||||
else {
|
||||
} else {
|
||||
flow->info_type = INFO_GENERIC;
|
||||
inet_ntop(AF_INET6, &flow->ndpi_flow->protos.dns.rsp_addr.ipv6, flow->info, sizeof(flow->info));
|
||||
|
||||
/* For consistency across platforms replace :0: with :: */
|
||||
@@ -1078,89 +1095,101 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
|
||||
}
|
||||
/* MDNS */
|
||||
else if(is_ndpi_proto(flow, NDPI_PROTOCOL_MDNS)) {
|
||||
snprintf(flow->info, sizeof(flow->info), "%s", flow->ndpi_flow->host_server_name);
|
||||
flow->info_type = INFO_GENERIC;
|
||||
ndpi_snprintf(flow->info, sizeof(flow->info), "%s", flow->ndpi_flow->host_server_name);
|
||||
}
|
||||
/* UBNTAC2 */
|
||||
else if(is_ndpi_proto(flow, NDPI_PROTOCOL_UBNTAC2)) {
|
||||
snprintf(flow->info, sizeof(flow->info), "%s", flow->ndpi_flow->protos.ubntac2.version);
|
||||
flow->info_type = INFO_GENERIC;
|
||||
ndpi_snprintf(flow->info, sizeof(flow->info), "%s", flow->ndpi_flow->protos.ubntac2.version);
|
||||
}
|
||||
/* FTP */
|
||||
else if((is_ndpi_proto(flow, NDPI_PROTOCOL_FTP_CONTROL))
|
||||
|| /* IMAP */ is_ndpi_proto(flow, NDPI_PROTOCOL_MAIL_IMAP)
|
||||
|| /* POP */ is_ndpi_proto(flow, NDPI_PROTOCOL_MAIL_POP)
|
||||
|| /* SMTP */ is_ndpi_proto(flow, NDPI_PROTOCOL_MAIL_SMTP)) {
|
||||
if(flow->ndpi_flow->l4.tcp.ftp_imap_pop_smtp.username[0] != '\0')
|
||||
snprintf(flow->info, sizeof(flow->info), "User: %s][Pwd: %s%s",
|
||||
flow->ndpi_flow->l4.tcp.ftp_imap_pop_smtp.username,
|
||||
flow->ndpi_flow->l4.tcp.ftp_imap_pop_smtp.password,
|
||||
flow->ndpi_flow->l4.tcp.ftp_imap_pop_smtp.auth_failed ? "][Auth Failed" : "");
|
||||
flow->info_type = INFO_FTP_IMAP_POP_SMTP;
|
||||
ndpi_snprintf(flow->ftp_imap_pop_smtp.username,
|
||||
sizeof(flow->ftp_imap_pop_smtp.username),
|
||||
"%s", flow->ndpi_flow->l4.tcp.ftp_imap_pop_smtp.username);
|
||||
ndpi_snprintf(flow->ftp_imap_pop_smtp.password,
|
||||
sizeof(flow->ftp_imap_pop_smtp.password),
|
||||
"%s", flow->ndpi_flow->l4.tcp.ftp_imap_pop_smtp.password);
|
||||
flow->ftp_imap_pop_smtp.auth_failed =
|
||||
flow->ndpi_flow->l4.tcp.ftp_imap_pop_smtp.auth_failed;
|
||||
}
|
||||
/* TFTP */
|
||||
else if(is_ndpi_proto(flow, NDPI_PROTOCOL_TFTP)) {
|
||||
flow->info_type = INFO_GENERIC;
|
||||
if(flow->ndpi_flow->protos.tftp.filename[0] != '\0')
|
||||
ndpi_snprintf(flow->info, sizeof(flow->info), "Filename: %s",
|
||||
flow->ndpi_flow->protos.tftp.filename);
|
||||
}
|
||||
/* KERBEROS */
|
||||
else if(is_ndpi_proto(flow, NDPI_PROTOCOL_KERBEROS)) {
|
||||
if((flow->ndpi_flow->protos.kerberos.hostname[0] != '\0')
|
||||
|| (flow->ndpi_flow->protos.kerberos.username[0] != '\0')) {
|
||||
snprintf(flow->info, sizeof(flow->info), "%s%s%s%s",
|
||||
flow->ndpi_flow->protos.kerberos.domain /* = realm */,
|
||||
flow->ndpi_flow->protos.kerberos.domain[0] != '\0' ? "\\" : "",
|
||||
flow->ndpi_flow->protos.kerberos.hostname,
|
||||
flow->ndpi_flow->protos.kerberos.username);
|
||||
} else if(flow->ndpi_flow->protos.kerberos.domain[0] != '\0')
|
||||
snprintf(flow->info, sizeof(flow->info), "%s",
|
||||
flow->ndpi_flow->protos.kerberos.domain);
|
||||
|
||||
#if 0
|
||||
if(flow->info[0] != '\0')
|
||||
printf("->> (%d) [%s][%s][%s]<<--\n",
|
||||
htons(flow->src_port),
|
||||
flow->ndpi_flow->protos.kerberos.domain,
|
||||
flow->ndpi_flow->protos.kerberos.hostname,
|
||||
flow->ndpi_flow->protos.kerberos.username);
|
||||
#endif
|
||||
flow->info_type = INFO_KERBEROS;
|
||||
ndpi_snprintf(flow->kerberos.domain,
|
||||
sizeof(flow->kerberos.domain),
|
||||
"%s", flow->ndpi_flow->protos.kerberos.domain);
|
||||
ndpi_snprintf(flow->kerberos.hostname,
|
||||
sizeof(flow->kerberos.hostname),
|
||||
"%s", flow->ndpi_flow->protos.kerberos.hostname);
|
||||
ndpi_snprintf(flow->kerberos.username,
|
||||
sizeof(flow->kerberos.username),
|
||||
"%s", flow->ndpi_flow->protos.kerberos.username);
|
||||
}
|
||||
/* HTTP */
|
||||
else if((flow->detected_protocol.master_protocol == NDPI_PROTOCOL_HTTP)
|
||||
|| is_ndpi_proto(flow, NDPI_PROTOCOL_HTTP)) {
|
||||
if(flow->ndpi_flow->http.url != NULL) {
|
||||
snprintf(flow->http.url, sizeof(flow->http.url), "%s", flow->ndpi_flow->http.url);
|
||||
ndpi_snprintf(flow->http.url, sizeof(flow->http.url), "%s", flow->ndpi_flow->http.url);
|
||||
flow->http.response_status_code = flow->ndpi_flow->http.response_status_code;
|
||||
snprintf(flow->http.content_type, sizeof(flow->http.content_type), "%s", flow->ndpi_flow->http.content_type ? flow->ndpi_flow->http.content_type : "");
|
||||
snprintf(flow->http.request_content_type, sizeof(flow->http.request_content_type), "%s", flow->ndpi_flow->http.request_content_type ? flow->ndpi_flow->http.request_content_type : "");
|
||||
snprintf(flow->http.user_agent, sizeof(flow->http.user_agent), "%s", flow->ndpi_flow->http.user_agent ? flow->ndpi_flow->http.user_agent : "");
|
||||
ndpi_snprintf(flow->http.content_type, sizeof(flow->http.content_type), "%s", flow->ndpi_flow->http.content_type ? flow->ndpi_flow->http.content_type : "");
|
||||
ndpi_snprintf(flow->http.request_content_type, sizeof(flow->http.request_content_type), "%s", flow->ndpi_flow->http.request_content_type ? flow->ndpi_flow->http.request_content_type : "");
|
||||
}
|
||||
} else if(is_ndpi_proto(flow, NDPI_PROTOCOL_TELNET)) {
|
||||
}
|
||||
/* COLLECTD */
|
||||
else if(is_ndpi_proto(flow, NDPI_PROTOCOL_COLLECTD)) {
|
||||
flow->info_type = INFO_GENERIC;
|
||||
if(flow->ndpi_flow->protos.collectd.client_username[0] != '\0')
|
||||
ndpi_snprintf(flow->info, sizeof(flow->info), "Username: %s",
|
||||
flow->ndpi_flow->protos.collectd.client_username);
|
||||
}
|
||||
/* TELNET */
|
||||
else if(is_ndpi_proto(flow, NDPI_PROTOCOL_TELNET)) {
|
||||
if(flow->ndpi_flow->protos.telnet.username[0] != '\0')
|
||||
flow->telnet.username = ndpi_strdup(flow->ndpi_flow->protos.telnet.username);
|
||||
if(flow->ndpi_flow->protos.telnet.password[0] != '\0')
|
||||
flow->telnet.password = ndpi_strdup(flow->ndpi_flow->protos.telnet.password);
|
||||
} else if(is_ndpi_proto(flow, NDPI_PROTOCOL_SSH)) {
|
||||
snprintf(flow->host_server_name,
|
||||
ndpi_snprintf(flow->host_server_name,
|
||||
sizeof(flow->host_server_name), "%s",
|
||||
flow->ndpi_flow->protos.ssh.client_signature);
|
||||
snprintf(flow->ssh_tls.server_info, sizeof(flow->ssh_tls.server_info), "%s",
|
||||
ndpi_snprintf(flow->ssh_tls.server_info, sizeof(flow->ssh_tls.server_info), "%s",
|
||||
flow->ndpi_flow->protos.ssh.server_signature);
|
||||
snprintf(flow->ssh_tls.client_hassh, sizeof(flow->ssh_tls.client_hassh), "%s",
|
||||
ndpi_snprintf(flow->ssh_tls.client_hassh, sizeof(flow->ssh_tls.client_hassh), "%s",
|
||||
flow->ndpi_flow->protos.ssh.hassh_client);
|
||||
snprintf(flow->ssh_tls.server_hassh, sizeof(flow->ssh_tls.server_hassh), "%s",
|
||||
ndpi_snprintf(flow->ssh_tls.server_hassh, sizeof(flow->ssh_tls.server_hassh), "%s",
|
||||
flow->ndpi_flow->protos.ssh.hassh_server);
|
||||
}
|
||||
/* TLS */
|
||||
else if((is_ndpi_proto(flow, NDPI_PROTOCOL_TLS))
|
||||
else if(is_ndpi_proto(flow, NDPI_PROTOCOL_TLS)
|
||||
|| is_ndpi_proto(flow, NDPI_PROTOCOL_DTLS)
|
||||
|| is_ndpi_proto(flow, NDPI_PROTOCOL_MAIL_SMTPS)
|
||||
|| is_ndpi_proto(flow, NDPI_PROTOCOL_MAIL_IMAPS)
|
||||
|| is_ndpi_proto(flow, NDPI_PROTOCOL_MAIL_POPS)
|
||||
|| ((is_quic = is_ndpi_proto(flow, NDPI_PROTOCOL_QUIC)))
|
||||
|| (flow->detected_protocol.master_protocol == NDPI_PROTOCOL_TLS)
|
||||
|| (flow->ndpi_flow->protos.tls_quic.ja3_client[0] != '\0')
|
||||
) {
|
||||
flow->ssh_tls.ssl_version = flow->ndpi_flow->protos.tls_quic.ssl_version;
|
||||
|
||||
snprintf(flow->http.user_agent, sizeof(flow->http.user_agent), "%s", flow->ndpi_flow->http.user_agent ? flow->ndpi_flow->http.user_agent : "");
|
||||
|
||||
if(flow->ndpi_flow->protos.tls_quic.server_names_len > 0 && flow->ndpi_flow->protos.tls_quic.server_names)
|
||||
flow->ssh_tls.server_names = ndpi_strdup(flow->ndpi_flow->protos.tls_quic.server_names);
|
||||
|
||||
flow->ssh_tls.notBefore = flow->ndpi_flow->protos.tls_quic.notBefore;
|
||||
flow->ssh_tls.notAfter = flow->ndpi_flow->protos.tls_quic.notAfter;
|
||||
snprintf(flow->ssh_tls.ja3_client, sizeof(flow->ssh_tls.ja3_client), "%s",
|
||||
ndpi_snprintf(flow->ssh_tls.ja3_client, sizeof(flow->ssh_tls.ja3_client), "%s",
|
||||
flow->ndpi_flow->protos.tls_quic.ja3_client);
|
||||
snprintf(flow->ssh_tls.ja3_server, sizeof(flow->ssh_tls.ja3_server), "%s",
|
||||
ndpi_snprintf(flow->ssh_tls.ja3_server, sizeof(flow->ssh_tls.ja3_server), "%s",
|
||||
flow->ndpi_flow->protos.tls_quic.ja3_server);
|
||||
flow->ssh_tls.server_unsafe_cipher = flow->ndpi_flow->protos.tls_quic.server_unsafe_cipher;
|
||||
flow->ssh_tls.server_cipher = flow->ndpi_flow->protos.tls_quic.server_cipher;
|
||||
@@ -1199,22 +1228,18 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
|
||||
correct_csv_data_field(flow->ndpi_flow->protos.tls_quic.alpn);
|
||||
correct_csv_data_field(flow->ndpi_flow->protos.tls_quic.tls_supported_versions);
|
||||
|
||||
if(csv_fp)
|
||||
snprintf(flow->info, sizeof(flow->info), "%s",
|
||||
flow->ndpi_flow->protos.tls_quic.alpn);
|
||||
else
|
||||
snprintf(flow->info, sizeof(flow->info), "ALPN: %s][TLS Supported Versions: %s",
|
||||
flow->ndpi_flow->protos.tls_quic.alpn,
|
||||
flow->ndpi_flow->protos.tls_quic.tls_supported_versions);
|
||||
flow->info_type = INFO_TLS_QUIC_ALPN_VERSION;
|
||||
ndpi_snprintf(flow->tls_quic.alpn, sizeof(flow->tls_quic.alpn), "%s",
|
||||
flow->ndpi_flow->protos.tls_quic.alpn);
|
||||
ndpi_snprintf(flow->tls_quic.tls_supported_versions,
|
||||
sizeof(flow->tls_quic.tls_supported_versions),
|
||||
"%s", flow->ndpi_flow->protos.tls_quic.tls_supported_versions);
|
||||
} else if(flow->ndpi_flow->protos.tls_quic.alpn) {
|
||||
correct_csv_data_field(flow->ndpi_flow->protos.tls_quic.alpn);
|
||||
|
||||
if(csv_fp)
|
||||
snprintf(flow->info, sizeof(flow->info), "%s,",
|
||||
flow->ndpi_flow->protos.tls_quic.alpn);
|
||||
else
|
||||
snprintf(flow->info, sizeof(flow->info), "ALPN: %s",
|
||||
flow->ndpi_flow->protos.tls_quic.alpn);
|
||||
flow->info_type = INFO_TLS_QUIC_ALPN_ONLY;
|
||||
ndpi_snprintf(flow->tls_quic.alpn, sizeof(flow->tls_quic.alpn), "%s",
|
||||
flow->ndpi_flow->protos.tls_quic.alpn);
|
||||
}
|
||||
|
||||
if(enable_doh_dot_detection) {
|
||||
@@ -1230,6 +1255,10 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
|
||||
}
|
||||
}
|
||||
|
||||
ndpi_snprintf(flow->http.user_agent,
|
||||
sizeof(flow->http.user_agent),
|
||||
"%s", (flow->ndpi_flow->http.user_agent ? flow->ndpi_flow->http.user_agent : ""));
|
||||
|
||||
if(flow->detection_completed && (!flow->check_extra_packets)) {
|
||||
if(is_ndpi_proto(flow, NDPI_PROTOCOL_UNKNOWN)) {
|
||||
if(workflow->__flow_giveup_callback != NULL)
|
||||
@@ -1313,8 +1342,7 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow,
|
||||
const struct pcap_pkthdr *header,
|
||||
const u_char *packet,
|
||||
pkt_timeval when,
|
||||
ndpi_risk *flow_risk,
|
||||
FILE * csv_fp) {
|
||||
ndpi_risk *flow_risk) {
|
||||
struct ndpi_flow_info *flow = NULL;
|
||||
struct ndpi_flow_struct *ndpi_flow = NULL;
|
||||
u_int8_t proto;
|
||||
@@ -1413,6 +1441,7 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow,
|
||||
}
|
||||
ndpi_data_add_value(flow->pktlen_s_to_c, rawsize);
|
||||
flow->dst2src_packets++, flow->dst2src_bytes += rawsize, flow->dst2src_goodput_bytes += payload_len;
|
||||
flow->risk &= ~(1ULL << NDPI_UNIDIRECTIONAL_TRAFFIC); /* Clear bit */
|
||||
memcpy(&flow->dst2src_last_pkt_time, &when, sizeof(when));
|
||||
|
||||
#ifdef DIRECTION_BINS
|
||||
@@ -1554,11 +1583,11 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow,
|
||||
if(enable_protocol_guess) workflow->stats.guessed_flow_protocols++;
|
||||
}
|
||||
|
||||
process_ndpi_collected_info(workflow, flow, csv_fp);
|
||||
process_ndpi_collected_info(workflow, flow);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
if(flow->risk != 0) {
|
||||
FILE *r = fopen("/tmp/e", "a");
|
||||
@@ -1594,6 +1623,7 @@ int ndpi_is_datalink_supported(int datalink_type) {
|
||||
case DLT_LINUX_SLL:
|
||||
case DLT_IEEE802_11_RADIO:
|
||||
case DLT_RAW:
|
||||
case DLT_PPI:
|
||||
return 1;
|
||||
default:
|
||||
return 0;
|
||||
@@ -1605,8 +1635,7 @@ int ndpi_is_datalink_supported(int datalink_type) {
|
||||
struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
|
||||
const struct pcap_pkthdr *header,
|
||||
const u_char *packet,
|
||||
ndpi_risk *flow_risk,
|
||||
FILE * csv_fp) {
|
||||
ndpi_risk *flow_risk) {
|
||||
/*
|
||||
* Declare pointers to packet headers
|
||||
*/
|
||||
@@ -1638,8 +1667,8 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
|
||||
ndpi_packet_tunnel tunnel_type = ndpi_no_tunnel;
|
||||
|
||||
/* lengths and offsets */
|
||||
u_int32_t eth_offset = 0;
|
||||
u_int16_t radio_len;
|
||||
u_int32_t eth_offset = 0, dlt;
|
||||
u_int16_t radio_len, header_length;
|
||||
u_int16_t fc;
|
||||
u_int16_t type = 0;
|
||||
int wifi_len = 0;
|
||||
@@ -1718,14 +1747,14 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
|
||||
#ifdef DLT_IPV4
|
||||
case DLT_IPV4:
|
||||
type = ETH_P_IP;
|
||||
ip_offset = 0;
|
||||
ip_offset = eth_offset;
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef DLT_IPV6
|
||||
case DLT_IPV6:
|
||||
type = ETH_P_IPV6;
|
||||
ip_offset = 0;
|
||||
ip_offset = eth_offset;
|
||||
break;
|
||||
#endif
|
||||
|
||||
@@ -1784,7 +1813,7 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
|
||||
(FCF_TO_DS(fc) == 0x0 && FCF_FROM_DS(fc)))
|
||||
wifi_len = 26; /* + 4 byte fcs */
|
||||
} else /* no data frames */
|
||||
break;
|
||||
return(nproto);
|
||||
|
||||
/* Check ether_type from LLC */
|
||||
if(header->caplen < (eth_offset + wifi_len + radio_len + sizeof(struct ndpi_llc_header_snap)))
|
||||
@@ -1798,9 +1827,18 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
|
||||
break;
|
||||
|
||||
case DLT_RAW:
|
||||
ip_offset = eth_offset = 0;
|
||||
ip_offset = eth_offset;
|
||||
break;
|
||||
|
||||
case DLT_PPI:
|
||||
header_length = le16toh(*(u_int16_t *)&packet[eth_offset + 2]);
|
||||
dlt = le32toh(*(u_int32_t *)&packet[eth_offset + 4]);
|
||||
if(dlt != DLT_EN10MB) /* Handle only standard ethernet, for the time being */
|
||||
return(nproto);
|
||||
datalink_type = DLT_EN10MB;
|
||||
eth_offset += header_length;
|
||||
goto datalink_check;
|
||||
|
||||
default:
|
||||
/*
|
||||
* We shoudn't be here, because we already checked that this datalink is supported.
|
||||
@@ -1834,6 +1872,8 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
|
||||
|
||||
case ETH_P_MPLS_UNI:
|
||||
case ETH_P_MPLS_MULTI:
|
||||
if(ip_offset+4 >= (int)header->caplen)
|
||||
return(nproto);
|
||||
mpls.u32 = *((uint32_t *) &packet[ip_offset]);
|
||||
mpls.u32 = ntohl(mpls.u32);
|
||||
workflow->stats.mpls_count++;
|
||||
@@ -1892,9 +1932,7 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
|
||||
iph6 = NULL;
|
||||
|
||||
if(iph->protocol == IPPROTO_IPV6
|
||||
#ifdef IPPROTO_IPIP
|
||||
|| iph->protocol == IPPROTO_IPIP
|
||||
#endif
|
||||
|| iph->protocol == NDPI_IPIP_PROTOCOL_TYPE
|
||||
) {
|
||||
ip_offset += ip_len;
|
||||
if(ip_len > 0)
|
||||
@@ -1933,9 +1971,7 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
|
||||
}
|
||||
|
||||
if(proto == IPPROTO_IPV6
|
||||
#ifdef IPPROTO_IPIP
|
||||
|| proto == IPPROTO_IPIP
|
||||
#endif
|
||||
|| proto == NDPI_IPIP_PROTOCOL_TYPE
|
||||
) {
|
||||
if(l4ptr > packet) { /* Better safe than sorry */
|
||||
ip_offset = (l4ptr - packet);
|
||||
@@ -2044,6 +2080,8 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
|
||||
tag_len = 1, stop = 1;
|
||||
break;
|
||||
default:
|
||||
if(offset + 1 >= header->caplen)
|
||||
return(nproto); /* Invalid packet */
|
||||
tag_len = packet[offset+1];
|
||||
break;
|
||||
}
|
||||
@@ -2091,7 +2129,7 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
|
||||
return(packet_processing(workflow, time_ms, vlan_id, tunnel_type, iph, iph6,
|
||||
ip_offset, header->caplen - ip_offset,
|
||||
header->caplen, header, packet, header->ts,
|
||||
flow_risk, csv_fp));
|
||||
flow_risk));
|
||||
}
|
||||
|
||||
/* ********************************************************** */
|
||||
|
||||
+38
-5
@@ -90,6 +90,7 @@ extern int dpdk_port_deinit(int port);
|
||||
#define MAX_TABLE_SIZE_1 4096
|
||||
#define MAX_TABLE_SIZE_2 8192
|
||||
#define INIT_VAL -1
|
||||
#define SERIALIZATION_BUFSIZ (8192 * 2)
|
||||
|
||||
|
||||
// inner hash table (ja3 -> security state)
|
||||
@@ -157,12 +158,23 @@ struct ndpi_entropy {
|
||||
float score;
|
||||
};
|
||||
|
||||
enum info_type {
|
||||
INFO_INVALID = 0,
|
||||
INFO_GENERIC,
|
||||
INFO_KERBEROS,
|
||||
INFO_FTP_IMAP_POP_SMTP,
|
||||
INFO_TLS_QUIC_ALPN_VERSION,
|
||||
INFO_TLS_QUIC_ALPN_ONLY,
|
||||
};
|
||||
|
||||
// flow tracking
|
||||
typedef struct ndpi_flow_info {
|
||||
u_int32_t flow_id;
|
||||
u_int32_t hashval;
|
||||
u_int32_t src_ip; /* network order */
|
||||
u_int32_t dst_ip; /* network order */
|
||||
struct ndpi_in6_addr src_ip6; /* network order */
|
||||
struct ndpi_in6_addr dst_ip6; /* network order */
|
||||
u_int16_t src_port; /* network order */
|
||||
u_int16_t dst_port; /* network order */
|
||||
u_int8_t detection_completed, protocol, bidirectional, check_extra_packets;
|
||||
@@ -186,6 +198,7 @@ typedef struct ndpi_flow_info {
|
||||
u_int32_t src2dst_packets, dst2src_packets;
|
||||
u_int32_t has_human_readeable_strings;
|
||||
char human_readeable_string_buffer[32];
|
||||
char *risk_str;
|
||||
|
||||
// result only, not used for flow identification
|
||||
ndpi_protocol detected_protocol;
|
||||
@@ -196,7 +209,25 @@ typedef struct ndpi_flow_info {
|
||||
struct ndpi_analyze_struct *iat_c_to_s, *iat_s_to_c, *iat_flow,
|
||||
*pktlen_c_to_s, *pktlen_s_to_c;
|
||||
|
||||
char info[255];
|
||||
enum info_type info_type;
|
||||
union {
|
||||
char info[256];
|
||||
struct {
|
||||
char alpn[128];
|
||||
char tls_supported_versions[128];
|
||||
} tls_quic;
|
||||
struct {
|
||||
unsigned char auth_failed;
|
||||
char username[127];
|
||||
char password[128];
|
||||
} ftp_imap_pop_smtp;
|
||||
struct {
|
||||
char domain[85];
|
||||
char hostname[85];
|
||||
char username[86];
|
||||
} kerberos;
|
||||
};
|
||||
|
||||
char flow_extra_info[16];
|
||||
char host_server_name[80]; /* Hostname/SNI */
|
||||
char *bittorent_hash;
|
||||
@@ -302,11 +333,14 @@ typedef struct ndpi_workflow {
|
||||
void **ndpi_flows_root;
|
||||
struct ndpi_detection_module_struct *ndpi_struct;
|
||||
u_int32_t num_allocated_flows;
|
||||
|
||||
/* CSV,TLV,JSON serialization interface */
|
||||
ndpi_serializer ndpi_serializer;
|
||||
} ndpi_workflow_t;
|
||||
|
||||
|
||||
/* TODO: remove wrappers parameters and use ndpi global, when their initialization will be fixed... */
|
||||
struct ndpi_workflow * ndpi_workflow_init(const struct ndpi_workflow_prefs * prefs, pcap_t * pcap_handle);
|
||||
struct ndpi_workflow * ndpi_workflow_init(const struct ndpi_workflow_prefs * prefs, pcap_t * pcap_handle, int do_init_flows_root, ndpi_serialization_format serialization_format);
|
||||
|
||||
|
||||
/* workflow main free function */
|
||||
@@ -324,8 +358,7 @@ void ndpi_free_flow_info_half(struct ndpi_flow_info *flow);
|
||||
struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
|
||||
const struct pcap_pkthdr *header,
|
||||
const u_char *packet,
|
||||
ndpi_risk *flow_risk,
|
||||
FILE * csv_fp);
|
||||
ndpi_risk *flow_risk);
|
||||
|
||||
int ndpi_is_datalink_supported(int datalink_type);
|
||||
|
||||
@@ -345,7 +378,7 @@ static inline void ndpi_workflow_set_flow_giveup_callback(struct ndpi_workflow *
|
||||
|
||||
/* compare two nodes in workflow */
|
||||
int ndpi_workflow_node_cmp(const void *a, const void *b);
|
||||
void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_flow_info *flow, FILE * csv_fp);
|
||||
void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_flow_info *flow);
|
||||
u_int32_t ethernet_crc32(const void* data, size_t n_bytes);
|
||||
void ndpi_flow_info_free_data(struct ndpi_flow_info *flow);
|
||||
void ndpi_flow_info_freer(void *node);
|
||||
|
||||
+1104
-2
File diff suppressed because it is too large
Load Diff
+35
-23
@@ -8,6 +8,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
struct ndpi_workflow_prefs *prefs = NULL;
|
||||
struct ndpi_workflow *workflow = NULL;
|
||||
|
||||
int nDPI_LogLevel = 0;
|
||||
char *_debug_protocols = NULL;
|
||||
@@ -46,6 +47,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
char errbuf[PCAP_ERRBUF_SIZE];
|
||||
NDPI_PROTOCOL_BITMASK all;
|
||||
char * pcap_path = tempnam("/tmp", "fuzz-ndpi-reader");
|
||||
u_int i;
|
||||
|
||||
if (prefs == NULL) {
|
||||
prefs = calloc(sizeof(struct ndpi_workflow_prefs), 1);
|
||||
@@ -55,15 +57,29 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
}
|
||||
prefs->decode_tunnels = 1;
|
||||
prefs->num_roots = 16;
|
||||
prefs->max_ndpi_flows = 1024;
|
||||
prefs->max_ndpi_flows = 16 * 1024 * 1024;
|
||||
prefs->quiet_mode = 0;
|
||||
|
||||
workflow = ndpi_workflow_init(prefs, NULL /* pcap handler will be set later */, 0, ndpi_serialization_format_json);
|
||||
// enable all protocols
|
||||
NDPI_BITMASK_SET_ALL(all);
|
||||
ndpi_set_protocol_detection_bitmask2(workflow->ndpi_struct, &all);
|
||||
memset(workflow->stats.protocol_counter, 0,
|
||||
sizeof(workflow->stats.protocol_counter));
|
||||
memset(workflow->stats.protocol_counter_bytes, 0,
|
||||
sizeof(workflow->stats.protocol_counter_bytes));
|
||||
memset(workflow->stats.protocol_flows, 0,
|
||||
sizeof(workflow->stats.protocol_flows));
|
||||
ndpi_finalize_initialization(workflow->ndpi_struct);
|
||||
}
|
||||
|
||||
bufferToFile(pcap_path, Data, Size);
|
||||
|
||||
pkts = pcap_open_offline(pcap_path, errbuf);
|
||||
if (pkts == NULL) {
|
||||
remove(pcap_path);
|
||||
free(pcap_path);
|
||||
ndpi_term_serializer(&workflow->ndpi_serializer);
|
||||
return 0;
|
||||
}
|
||||
if (ndpi_is_datalink_supported(pcap_datalink(pkts)) == 0)
|
||||
@@ -72,41 +88,37 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
pcap_close(pkts);
|
||||
remove(pcap_path);
|
||||
free(pcap_path);
|
||||
ndpi_term_serializer(&workflow->ndpi_serializer);
|
||||
return 0;
|
||||
}
|
||||
struct ndpi_workflow * workflow = ndpi_workflow_init(prefs, pkts);
|
||||
// enable all protocols
|
||||
NDPI_BITMASK_SET_ALL(all);
|
||||
ndpi_set_protocol_detection_bitmask2(workflow->ndpi_struct, &all);
|
||||
memset(workflow->stats.protocol_counter, 0,
|
||||
sizeof(workflow->stats.protocol_counter));
|
||||
memset(workflow->stats.protocol_counter_bytes, 0,
|
||||
sizeof(workflow->stats.protocol_counter_bytes));
|
||||
memset(workflow->stats.protocol_flows, 0,
|
||||
sizeof(workflow->stats.protocol_flows));
|
||||
ndpi_finalize_initialization(workflow->ndpi_struct);
|
||||
|
||||
workflow->pcap_handle = pkts;
|
||||
/* Init flow tree */
|
||||
workflow->ndpi_flows_root = ndpi_calloc(workflow->prefs.num_roots, sizeof(void *));
|
||||
|
||||
header = NULL;
|
||||
r = pcap_next_ex(pkts, &header, &pkt);
|
||||
while (r > 0) {
|
||||
if(header->caplen >= 42 /* ARP+ size */) {
|
||||
/* allocate an exact size buffer to check overflows */
|
||||
uint8_t *packet_checked = malloc(header->caplen);
|
||||
/* allocate an exact size buffer to check overflows */
|
||||
uint8_t *packet_checked = malloc(header->caplen);
|
||||
|
||||
if(packet_checked) {
|
||||
ndpi_risk flow_risk;
|
||||
|
||||
memcpy(packet_checked, pkt, header->caplen);
|
||||
ndpi_workflow_process_packet(workflow, header, packet_checked, &flow_risk, NULL);
|
||||
free(packet_checked);
|
||||
}
|
||||
if(packet_checked) {
|
||||
ndpi_risk flow_risk;
|
||||
|
||||
memcpy(packet_checked, pkt, header->caplen);
|
||||
ndpi_workflow_process_packet(workflow, header, packet_checked, &flow_risk);
|
||||
free(packet_checked);
|
||||
}
|
||||
|
||||
r = pcap_next_ex(pkts, &header, &pkt);
|
||||
}
|
||||
ndpi_workflow_free(workflow);
|
||||
pcap_close(pkts);
|
||||
|
||||
/* Free flow trees */
|
||||
for(i = 0; i < workflow->prefs.num_roots; i++)
|
||||
ndpi_tdestroy(workflow->ndpi_flows_root[i], ndpi_flow_info_freer);
|
||||
ndpi_free(workflow->ndpi_flows_root);
|
||||
|
||||
remove(pcap_path);
|
||||
free(pcap_path);
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include <stdio.h>
|
||||
|
||||
struct ndpi_detection_module_struct *ndpi_info_mod = NULL;
|
||||
static ndpi_serializer json_serializer = {};
|
||||
static ndpi_serializer csv_serializer = {};
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
uint8_t protocol_was_guessed;
|
||||
@@ -17,12 +19,27 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
ndpi_set_log_level(ndpi_info_mod, 4);
|
||||
ndpi_set_debug_bitmask(ndpi_info_mod, debug_bitmask);
|
||||
ndpi_finalize_initialization(ndpi_info_mod);
|
||||
ndpi_init_serializer(&json_serializer, ndpi_serialization_format_json);
|
||||
ndpi_init_serializer(&csv_serializer, ndpi_serialization_format_csv);
|
||||
}
|
||||
|
||||
struct ndpi_flow_struct *ndpi_flow = ndpi_flow_malloc(SIZEOF_FLOW_STRUCT);
|
||||
memset(ndpi_flow, 0, SIZEOF_FLOW_STRUCT);
|
||||
ndpi_detection_process_packet(ndpi_info_mod, ndpi_flow, Data, Size, 0);
|
||||
ndpi_detection_giveup(ndpi_info_mod, ndpi_flow, 1, &protocol_was_guessed);
|
||||
ndpi_protocol detected_protocol =
|
||||
ndpi_detection_process_packet(ndpi_info_mod, ndpi_flow, Data, Size, 0);
|
||||
ndpi_protocol guessed_protocol =
|
||||
ndpi_detection_giveup(ndpi_info_mod, ndpi_flow, 1, &protocol_was_guessed);
|
||||
|
||||
ndpi_reset_serializer(&json_serializer);
|
||||
ndpi_reset_serializer(&csv_serializer);
|
||||
if (protocol_was_guessed == 0)
|
||||
{
|
||||
ndpi_dpi2json(ndpi_info_mod, ndpi_flow, detected_protocol, &json_serializer);
|
||||
ndpi_dpi2json(ndpi_info_mod, ndpi_flow, detected_protocol, &csv_serializer);
|
||||
} else {
|
||||
ndpi_dpi2json(ndpi_info_mod, ndpi_flow, guessed_protocol, &json_serializer);
|
||||
ndpi_dpi2json(ndpi_info_mod, ndpi_flow, guessed_protocol, &csv_serializer);
|
||||
}
|
||||
ndpi_free_flow(ndpi_flow);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
CC=@CC@
|
||||
INC=-I ../src/include -I/usr/local/include
|
||||
LIBDPI=../src/lib/libndpi.a
|
||||
LDFLAGS=@LDFLAGS@
|
||||
LIB=$(LIBDPI) -lm @ADDITIONAL_LIBS@ @LIBS@
|
||||
|
||||
TOOLS=metric_anomaly
|
||||
|
||||
all: $(TOOLS)
|
||||
|
||||
metric_anomaly: metric_anomaly.c Makefile $(LIBDPI)
|
||||
$(CC) $(CPPFLAGS) -g $(INC) $(LDFLAGS) metric_anomaly.c -o metric_anomaly $(LIB)
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o $(TOOLS) *~
|
||||
|
||||
distclean: clean
|
||||
/bin/rm -f Makefile
|
||||
|
||||
distdir:
|
||||
find . -type f -name '*.c' \
|
||||
-o -name '*.txt' | xargs -I'{}' cp '{}' '$(distdir)/{}'
|
||||
|
||||
install:
|
||||
@echo -n ""
|
||||
|
||||
check:
|
||||
true # nothing to do here
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
This directory contains a tool that allows anomalies to be identified with InfluxDB
|
||||
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
/*
|
||||
* metric_anomaly.c
|
||||
*
|
||||
* Copyright (C) 2011-22 - ntop.org
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <getopt.h>
|
||||
#include "ndpi_api.h"
|
||||
|
||||
#define DEFAULT_ALPHA 0.5
|
||||
#define DEFAULT_RO 0.05
|
||||
|
||||
/* *************************************************** */
|
||||
|
||||
static void help() {
|
||||
printf("Usage: metric_anomaly [-Q][-v][-z][-a <alpha>][-q] -d <database> -q <query>\n"
|
||||
"-a | Set alpha. Valid range >0 .. <1. Default %.2f\n"
|
||||
"-Q | Quick output (only anomalies are reported)\n"
|
||||
"-d <database> | InfluxDB database name\n"
|
||||
"-q <query> | InfluxQL query\n"
|
||||
"-v | Verbose\n"
|
||||
"-z | Bottom metric value set to zero\n"
|
||||
,
|
||||
DEFAULT_ALPHA);
|
||||
|
||||
printf("\n\nExample: metric_anomaly -d ntopng -q \"%s\"\n",
|
||||
"SELECT mean(\"cpu0\") FROM \"cpu_load\" WHERE time > 1648634807000000000 GROUP BY time(60s) fill(previous)");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/* *************************************************** */
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
char *database = NULL, *query = NULL, cmd[512], buf[256];
|
||||
u_int i, j, first = 1, quick_mode = 0, verbose = 0;
|
||||
struct ndpi_ses_struct ses;
|
||||
float alpha, ro;
|
||||
char c;
|
||||
FILE *fd;
|
||||
bool go_below_zero = true;
|
||||
|
||||
/* Defaults */
|
||||
alpha = DEFAULT_ALPHA;
|
||||
ro = DEFAULT_RO;
|
||||
|
||||
while((c = getopt(argc, argv, "a:Qd:q:vz")) != '?') {
|
||||
if(c == -1) break;
|
||||
|
||||
switch(c) {
|
||||
case 'a':
|
||||
{
|
||||
float f = atof(optarg);
|
||||
|
||||
if((f > 0) && (f < 1))
|
||||
alpha = f;
|
||||
else
|
||||
printf("Discarding -a: valid range is >0 .. <1\n");
|
||||
}
|
||||
break;
|
||||
|
||||
case 'Q':
|
||||
quick_mode = 1;
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
database = optarg;
|
||||
break;
|
||||
|
||||
case 'q':
|
||||
query = optarg;
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
verbose = 1;
|
||||
break;
|
||||
|
||||
case 'z':
|
||||
go_below_zero = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
help();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if((database == NULL) || (query == NULL))
|
||||
help();
|
||||
|
||||
ndpi_snprintf(cmd, sizeof(cmd), "influx -database '%s' -precision s -execute '%s'", database, query);
|
||||
|
||||
if(verbose) printf("%s\n", cmd);
|
||||
|
||||
if ((fd = popen(cmd, "r")) == NULL) {
|
||||
printf("Unable to execute '%s'\n", cmd);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
ndpi_ses_init(&ses, alpha, ro);
|
||||
|
||||
while(fgets(buf, sizeof(buf), fd) != NULL) {
|
||||
u_int32_t epoch;
|
||||
float value;
|
||||
double prediction, confidence_band;
|
||||
double lower, upper;
|
||||
int rc;
|
||||
bool is_anomaly;
|
||||
|
||||
if(sscanf(buf, "%u %f", &epoch, &value) != 2)
|
||||
continue;
|
||||
|
||||
// printf("->>> '%s'", buf);
|
||||
|
||||
value *= 100; /* trick to avoid dealing with floats */
|
||||
rc = ndpi_ses_add_value(&ses, value, &prediction, &confidence_band);
|
||||
lower = prediction - confidence_band, upper = prediction + confidence_band;
|
||||
|
||||
if(!go_below_zero) lower = ndpi_max(lower, 0), upper = ndpi_max(upper, 0);
|
||||
|
||||
is_anomaly = ((rc == 0) || (confidence_band == 0) || ((value >= lower) && (value <= upper))) ? false : true;
|
||||
|
||||
if(verbose || is_anomaly) {
|
||||
const time_t _t = epoch;
|
||||
struct tm *t_info = localtime((const time_t*)&_t);
|
||||
|
||||
strftime(buf, sizeof(buf), "%d/%b/%Y %H:%M:%S", t_info);
|
||||
|
||||
if(quick_mode) {
|
||||
if(is_anomaly) {
|
||||
printf("%u [%s]\n", epoch, buf);
|
||||
}
|
||||
} else {
|
||||
if(first) {
|
||||
first = 0;
|
||||
printf("%s %s\t%s %s %s\t %s [%s]\n",
|
||||
"When", "Value", "Prediction", "Lower", "Upper", "Out", "Band");
|
||||
}
|
||||
|
||||
printf("%s %12.3f\t%.3f\t%12.3f\t%12.3f\t %s [%.3f][rc: %d]\n",
|
||||
buf, value/100., prediction/100., lower/100., upper/100., is_anomaly? "ANOMALY" : "OK",
|
||||
confidence_band/100., rc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
(void)pclose(fd);
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -28,8 +28,8 @@ PKG_BUILD_PARALLEL:=1
|
||||
include $(INCLUDE_DIR)/uclibc++.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
ifeq ($(CONFIG_LIBNDPI_GCRYPT),)
|
||||
CONFIGURE_ARGS += --disable-gcrypt
|
||||
ifneq ($(CONFIG_LIBNDPI_GCRYPT),)
|
||||
CONFIGURE_ARGS += --with-local-libgcrypt
|
||||
endif
|
||||
|
||||
define Package/libndpi
|
||||
@@ -47,11 +47,12 @@ endef
|
||||
|
||||
define Package/libndpi/config
|
||||
config LIBNDPI_GCRYPT
|
||||
bool "GCrypt support"
|
||||
bool "Use external libgcrypt"
|
||||
depends on PACKAGE_libndpi
|
||||
default n
|
||||
help
|
||||
This option enables QUIC client hello decryption.
|
||||
This option enables QUIC client hello decryption through
|
||||
an external libgcrypt instead of a lightweight builtin version.
|
||||
Disabled by default.
|
||||
endef
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@ PKG_BUILD_PARALLEL:=1
|
||||
include $(INCLUDE_DIR)/uclibc++.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
ifeq ($(CONFIG_LIBNDPI_GCRYPT),)
|
||||
CONFIGURE_ARGS += --disable-gcrypt
|
||||
ifneq ($(CONFIG_LIBNDPI_GCRYPT),)
|
||||
CONFIGURE_ARGS += --with-local-libgcrypt
|
||||
endif
|
||||
|
||||
define Package/libndpi
|
||||
@@ -46,11 +46,12 @@ endef
|
||||
|
||||
define Package/libndpi/config
|
||||
config LIBNDPI_GCRYPT
|
||||
bool "GCrypt support"
|
||||
bool "Use external libgcrypt"
|
||||
depends on PACKAGE_libndpi
|
||||
default n
|
||||
help
|
||||
This option enables QUIC client hello decryption.
|
||||
This option enables QUIC client hello decryption through
|
||||
an external libgcrypt instead of a lightweight builtin version.
|
||||
Disabled by default.
|
||||
endef
|
||||
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPTPATH="$(cd "$(dirname "$0")"; pwd -P)"
|
||||
RELEASE="$(cd ${SCRIPTPATH}; cat ../configure.ac|grep C_INIT|cut -c 21-|rev|cut -c 3-|rev)"
|
||||
MAJOR_RELEASE="$(cd ${SCRIPTPATH}; cat ../configure.ac|grep C_INIT|cut -c 21-|rev|cut -c 3-|rev|cut -d. -f1)"
|
||||
RELEASE="$(cd ${SCRIPTPATH}; cat ../configure.ac|grep C_INIT|cut -c 20-|rev|cut -c 3-|rev)"
|
||||
MAJOR_RELEASE="$(cd ${SCRIPTPATH}; cat ../configure.ac|grep C_INIT|cut -c 20-|rev|cut -c 3-|rev|cut -d. -f1)"
|
||||
REVISION="$(cd ${SCRIPTPATH}; git rev-list --all |wc -l | tr -d '[[:space:]]')"
|
||||
|
||||
get_release() {
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# Python Bindings Development Guide
|
||||
|
||||
The aim of this document is to guide when extending these bindings with additional nDPI API.
|
||||
In the following we suppose that we want to add the following API to ndpi python package.
|
||||
|
||||
``` c
|
||||
int ndpi_des_init(struct ndpi_des_struct *des, double alpha, double beta, float significance);
|
||||
```
|
||||
|
||||
## Add it to NDPI_APIS Python definition
|
||||
|
||||
|
||||
[**NDPI_APIS**][py_ndpi_api] must be updated with the this new API your want to add.
|
||||
|
||||
## Regenerate bindings
|
||||
|
||||
``` bash
|
||||
python3 setup.py install
|
||||
```
|
||||
|
||||
## That's it!
|
||||
|
||||
Now this API can be called and used on python side
|
||||
|
||||
``` python
|
||||
from ndpi import lib, ffi
|
||||
|
||||
des = ffi.new("struct ndpi_des_struct *")
|
||||
alpha = 0.9
|
||||
beta = 0.5
|
||||
lib.ndpi_des_init(des, alpha, beta, 0.05)
|
||||
```
|
||||
|
||||
[py_ndpi_api]: https://github.com/ntop/nDPI/blob/c47d710d8e5281fff2f1f90ff5462c16ac91d50c/python/ndpi/ndpi_build.py#L49
|
||||
@@ -1,27 +0,0 @@
|
||||
CC=@CC@
|
||||
CFLAGS=-I. -I../src/include -I./src/lib/third_party/include @CFLAGS@ @CUSTOM_NDPI@ -shared
|
||||
#LIBNDPI=../src/lib/libndpi.so.@NDPI_VERSION_SHORT@
|
||||
LIBNDPI=../src/lib/libndpi.a
|
||||
LDFLAGS=@LDFLAGS@
|
||||
LIBS=$(CFILE) $(LIBNDPI) -lpcap @LIBS@ @ADDITIONAL_LIBS@
|
||||
SHARE = -soname,ndpi_wrap
|
||||
SO=ndpi_wrap.so
|
||||
OBJS = ndpi_wrap.o
|
||||
CFILE = ndpi_wrap.c
|
||||
PIC = -fPIC
|
||||
PREFIX?=/usr/local
|
||||
.PHONY: all
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Darwin)#do something for linux
|
||||
SHARE=-install_name,ndpiReader.so
|
||||
endif
|
||||
|
||||
all: $(SO)
|
||||
|
||||
$(SO): $(CFILE) $(LIBNDPI) Makefile
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(PIC) -Wl,$(SHARE) -o $@ $(LIBS)
|
||||
# ln -s $(LIBNDPI) .
|
||||
|
||||
clean:
|
||||
/bin/rm -f $(SO)
|
||||
@@ -0,0 +1,81 @@
|
||||
# ndpi
|
||||
|
||||
This package contains Python bindings for nDPI. nDPI is an Open and Extensible LGPLv3 Deep Packet Inspection Library.
|
||||
|
||||
**ndpi** is implemented using [**CFFI**][cffi] (out-of-line API mode). Consequently, it is fast and [**PyPy**][pypy]
|
||||
compliant.
|
||||
|
||||
## Installation
|
||||
|
||||
### Build nDPI
|
||||
|
||||
``` bash
|
||||
git clone --branch dev https://github.com/ntop/nDPI.git
|
||||
cd nDPI
|
||||
./autogen.sh
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
### Install ndpi package
|
||||
|
||||
``` bash
|
||||
cd python
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m install -r dev_requirements.txt
|
||||
python3 -m pip install .
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### API
|
||||
``` python
|
||||
from ndpi import NDPI, NDPIFlow
|
||||
|
||||
nDPI = NDPI()
|
||||
|
||||
# You per flow processing here
|
||||
# ...
|
||||
|
||||
ndpi_flow = NDPIFlow()
|
||||
nDPI.process_packet(ndpi_flow, ip_bytes, time_ms)
|
||||
nDPI.giveup(ndpi_flow) # If you want to guess it instead (DPI fallback)
|
||||
```
|
||||
|
||||
### Example Application
|
||||
|
||||
[ndpi_example.py][ndpi_example] is provided to demonstrate how **ndpi** can be integrated within your Python application.
|
||||
|
||||
``` bash
|
||||
Using nDPI 4.3.0-3532-8dd70b70
|
||||
usage: ndpi_example.py [-h] [-u] input
|
||||
|
||||
positional arguments:
|
||||
input input pcap file path
|
||||
|
||||
optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
-u, --include-unknowns
|
||||
```
|
||||
|
||||
Example with a Skype capture file
|
||||
|
||||
``` bash
|
||||
python3 ndpi_example.py -u ../tests/pcap/skype.pcap
|
||||
```
|
||||
|
||||
## Related projects
|
||||
|
||||
The provided example is for demo purposes only, For additional features (live capture, multiplatform support,
|
||||
multiprocessing, ML based classification, system visibility, etc.), please check nDPI based
|
||||
framework, [**NFStream**][nfstream].
|
||||
## License
|
||||
|
||||
This project is licensed under the LGPLv3 License - see the [**License**][license] file for details.
|
||||
|
||||
[license]: https://github.com/ntop/nDPI/blob/dev/COPYING
|
||||
[cffi]: https://cffi.readthedocs.io/en/latest/
|
||||
[pypy]: https://www.pypy.org/
|
||||
[nfstream]: https://github.com/nfstream/nfstream
|
||||
[ndpi_example]: https://github.com/ntop/nDPI/blob/dev/python/ndpi_example.py
|
||||
@@ -1,43 +0,0 @@
|
||||
nDPI Python bindings
|
||||
--------------------
|
||||
|
||||
This directory contains the Python3 bindings for nDPI. We provide both cffi and ctypes based bindings.
|
||||
|
||||
**cffi bindings**
|
||||
|
||||
Files:
|
||||
|
||||
* ndpi.py
|
||||
|
||||
Example (using `nfstream <https://github.com/aouinizied/nfstream>`_ package):
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pip3 install nfstream
|
||||
python3 flow_printer.py <interface>
|
||||
python3 flow_printer.py <pcap_file>
|
||||
|
||||
Code courtesy:
|
||||
|
||||
* Zied Aouini
|
||||
|
||||
**ctypes bindings**
|
||||
|
||||
Files:
|
||||
|
||||
* ndpi_typestruct.py
|
||||
* ndpi_wrap.c
|
||||
* Makefile.in
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pip3 install scapy
|
||||
python3 ndpi_example.py <interface>
|
||||
python3 ndpi_example.py <pcap_file>
|
||||
|
||||
Code courtesy:
|
||||
|
||||
* Massimo Puddu
|
||||
* Zied Aouini
|
||||
@@ -0,0 +1,2 @@
|
||||
cffi>=1.15.0
|
||||
dpkt>=1.9.7.2
|
||||
@@ -1,38 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
flow_printer.py
|
||||
Copyright (C) 2019-20 - NFStream Developers
|
||||
This file is part of NFStream, a Flexible Network Data Analysis Framework (https://www.nfstream.org/).
|
||||
NFStream 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.
|
||||
NFStream 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 NFStream.
|
||||
If not, see <http://www.gnu.org/licenses/>.
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
"""
|
||||
|
||||
from nfstream import NFStreamer
|
||||
import sys
|
||||
|
||||
# Example must run with nfstream >= 6.1.1
|
||||
path = sys.argv[1]
|
||||
flow_streamer = NFStreamer(source=path, statistical_analysis=False, performance_report=1)
|
||||
result = {}
|
||||
try:
|
||||
for flow in flow_streamer:
|
||||
print(flow)
|
||||
try:
|
||||
result[flow.application_name] += flow.bidirectional_packets
|
||||
except KeyError:
|
||||
result[flow.application_name] = flow.bidirectional_packets
|
||||
print("\nSummary (Application Name: Packets):")
|
||||
print(result)
|
||||
except KeyboardInterrupt:
|
||||
print("\nSummary (Application Name: Packets):")
|
||||
print(result)
|
||||
print("Terminated.")
|
||||
-1363
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,21 @@
|
||||
"""
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
__init__.py
|
||||
Copyright (C) 2011-22 - ntop.org
|
||||
This file is part of nDPI, an open source deep packet inspection library.
|
||||
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 NFStream.
|
||||
If not, see <http://www.gnu.org/licenses/>.
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
"""
|
||||
|
||||
from .ndpi import *
|
||||
|
||||
|
||||
__author__ = """Zied Aouini"""
|
||||
__email__ = 'aouinizied@gmail.com'
|
||||
__version__ = '4.3.0'
|
||||
@@ -0,0 +1,101 @@
|
||||
"""
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
ndpi.py
|
||||
Copyright (C) 2011-22 - ntop.org
|
||||
This file is part of nDPI, an open source deep packet inspection library.
|
||||
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 NFStream.
|
||||
If not, see <http://www.gnu.org/licenses/>.
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
"""
|
||||
|
||||
from collections import namedtuple
|
||||
from _ndpi import ffi, lib
|
||||
|
||||
|
||||
ndpi_protocol = namedtuple('NDPIProtocol', ['C',
|
||||
'master_protocol',
|
||||
'app_protocol',
|
||||
'category'])
|
||||
|
||||
ndpi_confidence = namedtuple('NDPIConfidence', ['id',
|
||||
'name'])
|
||||
|
||||
|
||||
class NDPI(object):
|
||||
__slots__ = ("_api_version",
|
||||
"_revision",
|
||||
"_detection_module")
|
||||
|
||||
def __init__(self):
|
||||
self._detection_module = lib.ndpi_init_detection_module(0)
|
||||
if self._detection_module == ffi.NULL:
|
||||
raise MemoryError("Unable to instantiate NDPI object")
|
||||
lib.ndpi_py_setup_detection_module(self._detection_module)
|
||||
|
||||
@property
|
||||
def api_version(self):
|
||||
return lib.ndpi_get_api_version()
|
||||
|
||||
@property
|
||||
def revision(self):
|
||||
return ffi.string(lib.ndpi_revision()).decode('utf-8', errors='ignore')
|
||||
|
||||
def process_packet(self, flow, packet, packet_time_ms):
|
||||
p = lib.ndpi_detection_process_packet(self._detection_module,
|
||||
flow.C,
|
||||
packet,
|
||||
len(packet),
|
||||
int(packet_time_ms))
|
||||
return ndpi_protocol(C=p,
|
||||
master_protocol=p.master_protocol,
|
||||
app_protocol=p.app_protocol,
|
||||
category=p.category)
|
||||
|
||||
def giveup(self, flow, enable_guess=True):
|
||||
p = lib.ndpi_detection_giveup(self._detection_module,
|
||||
flow.C,
|
||||
enable_guess,
|
||||
ffi.new("uint8_t*", 0))
|
||||
return ndpi_protocol(C=p,
|
||||
master_protocol=p.master_protocol,
|
||||
app_protocol=p.app_protocol,
|
||||
category=p.category)
|
||||
|
||||
def protocol_name(self, protocol):
|
||||
buf = ffi.new("char[40]")
|
||||
lib.ndpi_protocol2name(self._detection_module, protocol.C, buf, ffi.sizeof(buf))
|
||||
return ffi.string(buf).decode('utf-8', errors='ignore')
|
||||
|
||||
def protocol_category_name(self, protocol):
|
||||
return ffi.string(lib.ndpi_category_get_name(self._detection_module,
|
||||
protocol.C.category)).decode('utf-8',
|
||||
errors='ignore')
|
||||
|
||||
def __del__(self):
|
||||
if self._detection_module != ffi.NULL:
|
||||
lib.ndpi_exit_detection_module(self._detection_module)
|
||||
|
||||
|
||||
class NDPIFlow(object):
|
||||
__slots__ = "C"
|
||||
|
||||
@property
|
||||
def confidence(self):
|
||||
confidence = self.C.confidence
|
||||
return ndpi_confidence(id=confidence,
|
||||
name=ffi.string(lib.ndpi_confidence_get_name(confidence)).decode('utf-8',
|
||||
errors='ignore'))
|
||||
|
||||
def __init__(self):
|
||||
self.C = lib.ndpi_py_initialize_flow()
|
||||
|
||||
def __del__(self):
|
||||
if self.C != ffi.NULL:
|
||||
lib.ndpi_flow_free(self.C)
|
||||
self.C = ffi.NULL
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
"""
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
ndpi_build.py
|
||||
Copyright (C) 2011-22 - ntop.org
|
||||
This file is part of nDPI, an open source deep packet inspection library.
|
||||
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 NFStream.
|
||||
If not, see <http://www.gnu.org/licenses/>.
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
"""
|
||||
|
||||
from cffi import FFI
|
||||
import subprocess
|
||||
import pathlib
|
||||
|
||||
NDPI_INCLUDES = """
|
||||
#include "ndpi_main.h"
|
||||
#include "ndpi_typedefs.h"
|
||||
#include "ndpi_api.h"
|
||||
"""
|
||||
|
||||
NDPI_HELPERS = """
|
||||
// nDPI cffi helper functions (function naming convention ndpi_py_*)
|
||||
|
||||
void ndpi_py_setup_detection_module(struct ndpi_detection_module_struct *mod) {
|
||||
if (mod == NULL) {
|
||||
return;
|
||||
} else {
|
||||
NDPI_PROTOCOL_BITMASK protos;
|
||||
NDPI_BITMASK_SET_ALL(protos); // Set bitmask for ALL protocols
|
||||
ndpi_set_protocol_detection_bitmask2(mod, &protos);
|
||||
ndpi_finalize_initialization(mod);
|
||||
}
|
||||
};
|
||||
|
||||
struct ndpi_flow_struct * ndpi_py_initialize_flow(void) {
|
||||
struct ndpi_flow_struct * ndpi_flow = NULL;
|
||||
ndpi_flow = (struct ndpi_flow_struct *)ndpi_flow_malloc(SIZEOF_FLOW_STRUCT);
|
||||
memset(ndpi_flow, 0, SIZEOF_FLOW_STRUCT);
|
||||
return ndpi_flow;
|
||||
};
|
||||
"""
|
||||
|
||||
|
||||
NDPI_APIS = """
|
||||
u_int16_t ndpi_get_api_version(void);
|
||||
char* ndpi_revision(void);
|
||||
struct ndpi_detection_module_struct *ndpi_init_detection_module(ndpi_init_prefs prefs);
|
||||
void ndpi_exit_detection_module(struct ndpi_detection_module_struct *ndpi_struct);
|
||||
void ndpi_flow_free(void *ptr);
|
||||
ndpi_protocol ndpi_detection_process_packet(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
const unsigned char *packet,
|
||||
const unsigned short packetlen,
|
||||
const u_int64_t packet_time_ms);
|
||||
ndpi_protocol ndpi_detection_giveup(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
u_int8_t enable_guess,
|
||||
u_int8_t *protocol_was_guessed);
|
||||
void ndpi_py_setup_detection_module(struct ndpi_detection_module_struct *mod);
|
||||
struct ndpi_flow_struct * ndpi_py_initialize_flow(void);
|
||||
char* ndpi_protocol2name(struct ndpi_detection_module_struct *ndpi_mod, ndpi_protocol proto, char *buf, u_int buf_len);
|
||||
const char* ndpi_category_get_name(struct ndpi_detection_module_struct *ndpi_mod, ndpi_protocol_category_t category);
|
||||
const char* ndpi_confidence_get_name(ndpi_confidence_t confidence);
|
||||
"""
|
||||
|
||||
ffi_builder = FFI()
|
||||
|
||||
|
||||
INCLUDE_DIR = pathlib.Path(__file__)\
|
||||
.parent.resolve().parent.resolve().parent.resolve().\
|
||||
joinpath("src").joinpath("include")
|
||||
|
||||
LIBRARY_DIR = pathlib.Path(__file__)\
|
||||
.parent.resolve().parent.resolve().parent.resolve().\
|
||||
joinpath("src").joinpath("lib")
|
||||
|
||||
|
||||
NDPI_CDEF = subprocess.run(["gcc",
|
||||
"-DNDPI_LIB_COMPILATION",
|
||||
"-DNDPI_CFFI_PREPROCESSING",
|
||||
"-DNDPI_CFFI_PREPROCESSING_EXCLUDE_PACKED",
|
||||
"-E", "-x", "c", "-P", "-C",
|
||||
str(INCLUDE_DIR.joinpath("ndpi_typedefs.h"))],
|
||||
capture_output=True
|
||||
).stdout.decode('utf-8',
|
||||
errors='ignore')
|
||||
|
||||
NDPI_MODULE_STRUCT_CDEF = NDPI_CDEF.split("//CFFI.NDPI_MODULE_STRUCT")[1]
|
||||
|
||||
|
||||
NDPI_PACKED = subprocess.run(["gcc",
|
||||
"-DNDPI_LIB_COMPILATION", "-DNDPI_CFFI_PREPROCESSING",
|
||||
"-E", "-x", "c", "-P", "-C",
|
||||
str(INCLUDE_DIR.joinpath("ndpi_typedefs.h"))],
|
||||
capture_output=True
|
||||
).stdout.decode('utf-8',
|
||||
errors='ignore')
|
||||
|
||||
NDPI_PACKED_STRUCTURES = NDPI_PACKED.split("//CFFI.NDPI_PACKED_STRUCTURES")[1]
|
||||
|
||||
NDPI_SOURCE = NDPI_INCLUDES + NDPI_MODULE_STRUCT_CDEF + NDPI_HELPERS
|
||||
|
||||
|
||||
ffi_builder.set_source("_ndpi",
|
||||
NDPI_SOURCE,
|
||||
libraries=["ndpi"],
|
||||
library_dirs=[str(LIBRARY_DIR)],
|
||||
include_dirs=[str(INCLUDE_DIR)])
|
||||
|
||||
|
||||
ffi_builder.cdef("""
|
||||
typedef uint64_t u_int64_t;
|
||||
typedef uint32_t u_int32_t;
|
||||
typedef uint16_t u_int16_t;
|
||||
typedef uint8_t u_int8_t;
|
||||
typedef uint8_t u_char;
|
||||
typedef unsigned u_int;
|
||||
struct in_addr {
|
||||
unsigned long s_addr;
|
||||
};
|
||||
struct in6_addr {
|
||||
unsigned char s6_addr[16];
|
||||
};
|
||||
""")
|
||||
|
||||
ffi_builder.cdef(NDPI_PACKED_STRUCTURES, packed=True)
|
||||
ffi_builder.cdef(NDPI_CDEF)
|
||||
ffi_builder.cdef(NDPI_APIS)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
ffi_builder.compile(verbose=True)
|
||||
Executable → Regular
+144
-250
@@ -1,273 +1,167 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
file: ndpi_example.py
|
||||
This file is part of nDPI.
|
||||
|
||||
Copyright (C) 2011-19 - ntop.org
|
||||
Copyright (C) 2019 - Zied Aouini <aouinizied@gmail.com> (Incremental improvements)
|
||||
|
||||
nDPI is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
ndpi_example.py
|
||||
Copyright (C) 2011-22 - ntop.org
|
||||
This file is part of nDPI, an open source deep packet inspection library.
|
||||
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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with nDPI.
|
||||
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 NFStream.
|
||||
If not, see <http://www.gnu.org/licenses/>.
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
"""
|
||||
|
||||
from ndpi_typestruct import *
|
||||
from ctypes import *
|
||||
from scapy.all import *
|
||||
import sys
|
||||
|
||||
# ------- return type & pcapstruct to declare -------
|
||||
from collections import namedtuple
|
||||
from ndpi import NDPI, NDPIFlow
|
||||
import argparse
|
||||
import socket
|
||||
import dpkt
|
||||
|
||||
|
||||
class WorkFlow(Structure):
|
||||
_fields_ = [("src_ip", c_uint32),
|
||||
("dst_ip", c_uint32),
|
||||
("src_port", c_uint16),
|
||||
("dst_port", c_uint16),
|
||||
("protocol", c_uint8),
|
||||
("packets", c_uint32),
|
||||
("detected_protocol", NDPIProtocol),
|
||||
("detection_completed", c_uint8),
|
||||
("id", c_uint32),
|
||||
("src_id", POINTER(NDPIIdStruct)),
|
||||
("dst_id", POINTER(NDPIIdStruct)),
|
||||
("flow", POINTER(NDPIFlowStruct))]
|
||||
FLOW_KEY = "{} {}:{} <-> {}:{}"
|
||||
FLOW_STR = " {} {} [protocol:{}] [category:{}] [confidence:{}] [{} packets/{} bytes]"
|
||||
|
||||
|
||||
CMCFUN = CFUNCTYPE(c_int, c_void_p, c_void_p)
|
||||
GUESS = CFUNCTYPE(None, c_void_p, c_int32, c_int, c_void_p)
|
||||
FREE = CFUNCTYPE(None, c_void_p)
|
||||
PROTOCOL_UNKNWON = 0
|
||||
|
||||
|
||||
def node_proto_guess_walker(nodo, which, depth, user_data):
|
||||
global ndpi_info_mod
|
||||
class Flow(object):
|
||||
__slots__ = ("index",
|
||||
"pkts",
|
||||
"bytes",
|
||||
"detected_protocol",
|
||||
"ndpi_flow")
|
||||
|
||||
flow = cast(nodo, POINTER(POINTER(WorkFlow))).contents.contents
|
||||
if which == 0 or which == 3: # execute only preorder operation of the tree
|
||||
if flow.detection_completed == 0: # order for tree operation
|
||||
flow.detected_protocol = ndpi.ndpi_detection_giveup(ndpi_info_mod,
|
||||
flow.flow,
|
||||
1,
|
||||
cast(addressof(c_uint8(0)), POINTER(c_uint8)))
|
||||
count_protocol[flow.detected_protocol.app_protocol] += flow.packets
|
||||
def __init__(self):
|
||||
self.pkts = 0
|
||||
self.detected_protocol = None
|
||||
self.bytes = 0
|
||||
self.ndpi_flow = None
|
||||
|
||||
|
||||
def py_cmp_fun(a, b):
|
||||
fa = cast(a, POINTER(WorkFlow))
|
||||
fb = cast(b, POINTER(WorkFlow))
|
||||
|
||||
if fa.contents.src_ip < fb.contents.src_ip: return -1
|
||||
elif fa.contents.src_ip > fb.contents.src_ip: return 1
|
||||
if fa.contents.src_port < fb.contents.src_port: return -1
|
||||
elif fa.contents.src_port > fb.contents.src_port: return 1
|
||||
if fa.contents.dst_ip < fb.contents.dst_ip: return -1
|
||||
elif fa.contents.dst_ip > fb.contents.dst_ip: return 1
|
||||
if fa.contents.dst_port < fb.contents.dst_port: return -1
|
||||
elif fa.contents.dst_port > fb.contents.dst_port: return 1
|
||||
if fa.contents.protocol < fb.contents.protocol: return -1
|
||||
elif fa.contents.protocol > fb.contents.protocol: return 1
|
||||
return 0
|
||||
ppacket = namedtuple('ParsedPacket', ['src_ip',
|
||||
'src_port',
|
||||
'dst_ip',
|
||||
'dst_port',
|
||||
'protocol',
|
||||
'ip_version',
|
||||
'ip_bytes'])
|
||||
|
||||
|
||||
def freer(a):
|
||||
pass
|
||||
|
||||
|
||||
cmp_func = CMCFUN(py_cmp_fun)
|
||||
guess_walker = GUESS(node_proto_guess_walker)
|
||||
free_walk = FREE(freer)
|
||||
|
||||
# --------------------------------------
|
||||
|
||||
# number of analyzed packet
|
||||
packet_number = 0
|
||||
flow_count = 0
|
||||
max_num_udp_dissected_pkts = 16
|
||||
max_num_tcp_dissected_pkts = 10
|
||||
flows_root = c_void_p(None)
|
||||
flows_root_ref = pointer(flows_root)
|
||||
count_protocol = (c_int32 * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + ndpi.ndpi_wrap_ndpi_max_num_custom_protocols() + 1))()
|
||||
lista = [] # used to avoid impropriate memory deallocation from python
|
||||
|
||||
|
||||
# check ndpi version
|
||||
if ndpi.ndpi_get_api_version() != ndpi.ndpi_wrap_get_api_version():
|
||||
print("nDPI Library version mismatch: please make sure this code and the nDPI library are in sync\n")
|
||||
sys.exit(-1)
|
||||
|
||||
# create data structure of ndpi
|
||||
ndpi_info_mod = ndpi.ndpi_init_detection_module()
|
||||
if ndpi_info_mod is None:
|
||||
sys.exit(-1)
|
||||
else:
|
||||
ndpi_ndpi_finalize_initalization(ndpi_info_mod)
|
||||
|
||||
|
||||
def ip2int(ip):
|
||||
"""
|
||||
Convert an IP string to long and then c_uint32
|
||||
"""
|
||||
packedIP = socket.inet_aton(ip)
|
||||
return int(struct.unpack("!I", packedIP)[0])
|
||||
|
||||
|
||||
def get_flow(pkt):
|
||||
global flows_root
|
||||
global flows_root_ref
|
||||
global flow_count
|
||||
|
||||
ip_packet = pkt[1]
|
||||
ip_protocol = ip_packet.proto
|
||||
transport_packet = None
|
||||
|
||||
if ip_protocol == 6 or ip_protocol == 17:
|
||||
transport_packet = pkt[2]
|
||||
if transport_packet is not None:
|
||||
# to avoid two nodes in one binary tree for a flow
|
||||
ip_src = ip2int(ip_packet.src)
|
||||
ip_dst = ip2int(ip_packet.dst)
|
||||
src_port = transport_packet.sport
|
||||
dst_port = transport_packet.dport
|
||||
else:
|
||||
return None
|
||||
# set flows to correct type and data
|
||||
ndpi_flow = pointer(NDPIFlowStruct())
|
||||
memset(ndpi_flow, 0, sizeof(NDPIFlowStruct))
|
||||
if ip_src > ip_dst:
|
||||
flow = WorkFlow(ip_src, ip_dst, src_port, dst_port, int(ip_packet.proto), 0, NDPIProtocol(), 0, 0,
|
||||
pointer(NDPIIdStruct()), pointer(NDPIIdStruct()), ndpi_flow)
|
||||
else:
|
||||
flow = WorkFlow(ip_dst, ip_src, dst_port, src_port, int(ip_packet.proto), 0, NDPIProtocol(), 0, 0,
|
||||
pointer(NDPIIdStruct()), pointer(NDPIIdStruct()), ndpi_flow)
|
||||
flow_ref = pointer(flow)
|
||||
res = ndpi.ndpi_tfind(flow_ref, flows_root_ref, cmp_func)
|
||||
if res is None:
|
||||
ndpi.ndpi_tsearch(flow_ref, pointer(flows_root), cmp_func) # add
|
||||
lista.append(flow)
|
||||
flow_count += 1
|
||||
return pointer(flow)
|
||||
flow = cast(res, POINTER(POINTER(WorkFlow))).contents
|
||||
return flow
|
||||
|
||||
|
||||
def packetcaptured(pkt):
|
||||
global packet_number
|
||||
global ndpi_info_mod
|
||||
|
||||
flow = None
|
||||
h = PcapPktHdr()
|
||||
|
||||
# getting flow
|
||||
def inet_to_str(inet):
|
||||
""" get string representation of IP address """
|
||||
try:
|
||||
flow = get_flow(pkt)
|
||||
except AttributeError:
|
||||
pass # ignore packet
|
||||
if flow is None: return
|
||||
|
||||
# filling pcap_pkthdr
|
||||
h.len = h.caplen = len(pkt)
|
||||
h.ts.tv_sec = int(pkt["IP"].time/1000000)
|
||||
h.ts.tv_usec = int(pkt["IP"].time)
|
||||
|
||||
# real work
|
||||
if int(pkt[1].frag) == 0: # not fragmented packet
|
||||
flow.contents.packets += 1
|
||||
packet_number += 1
|
||||
# get ndpi_iphdr address
|
||||
iphdr_addr = cast(c_char_p(pkt[1].build()), c_void_p)
|
||||
ndpi_flow = flow.contents.flow
|
||||
|
||||
if flow.contents.detection_completed is 0:
|
||||
flow.contents.detected_protocol = ndpi.ndpi_detection_process_packet(ndpi_info_mod,
|
||||
ndpi_flow,
|
||||
cast(iphdr_addr, POINTER(c_uint8)),
|
||||
int(pkt[1].len),
|
||||
h.ts.tv_usec,
|
||||
flow.contents.src_id,
|
||||
flow.contents.dst_id)
|
||||
|
||||
flow1 = flow.contents.detected_protocol
|
||||
|
||||
valid = False
|
||||
|
||||
if flow.contents.protocol == 6: valid = flow.contents.packets > max_num_tcp_dissected_pkts
|
||||
elif flow.contents.protocol == 17: valid = flow.contents.packets > max_num_udp_dissected_pkts
|
||||
|
||||
# should we continue anylizing packet or not?
|
||||
if valid or flow1.app_protocol is not 0:
|
||||
if valid or flow1.master_protocol is not 91: # or # 91 is NDPI_PROTOCOL_TLS
|
||||
flow.contents.detection_completed = 1 # protocol found
|
||||
if flow1.app_protocol is 0:
|
||||
flow.contents.detected_protocol = ndpi.ndpi_detection_giveup(ndpi_info_mod,
|
||||
ndpi_flow,
|
||||
1,
|
||||
cast(addressof(c_uint8(0)),
|
||||
POINTER(c_uint8)))
|
||||
return socket.inet_ntop(socket.AF_INET, inet)
|
||||
except ValueError:
|
||||
return socket.inet_ntop(socket.AF_INET6, inet)
|
||||
|
||||
|
||||
def result():
|
||||
global flows_root_ref
|
||||
global ndpi_info_mod
|
||||
print('\nnumber of analyzed packet: ' + str(packet_number))
|
||||
print('number of flows: ' + str(flow_count))
|
||||
|
||||
ndpi.ndpi_twalk(flows_root_ref.contents, guess_walker, None)
|
||||
|
||||
print('\nDetected protocols:')
|
||||
for i in range(0, ndpi.ndpi_get_num_supported_protocols(ndpi_info_mod)):
|
||||
if count_protocol[i] > 0:
|
||||
print("{}: {} packets".format(
|
||||
cast(ndpi.ndpi_get_proto_name(ndpi_info_mod, i), c_char_p).value.decode('utf-8'),
|
||||
str(count_protocol[i])))
|
||||
|
||||
|
||||
def free(ndpi_struct):
|
||||
ndpi.ndpi_tdestroy(flows_root, free_walk)
|
||||
ndpi.ndpi_exit_detection_module(ndpi_struct)
|
||||
|
||||
|
||||
def initialize(ndpi_struct):
|
||||
all = NDPIProtocolBitMask()
|
||||
ndpi.ndpi_wrap_NDPI_BITMASK_SET_ALL(pointer(all))
|
||||
ndpi.ndpi_set_protocol_detection_bitmask2(ndpi_struct, pointer(all))
|
||||
|
||||
|
||||
print('Using nDPI ' + cast(ndpi.ndpi_revision(), c_char_p).value.decode("utf-8"))
|
||||
|
||||
initialize(ndpi_info_mod)
|
||||
|
||||
if len(sys.argv) != 2:
|
||||
print("\nUsage: ndpi_example.py <device>")
|
||||
sys.exit(0)
|
||||
|
||||
if "." in sys.argv[1]:
|
||||
print('Reading pcap from file ' + sys.argv[1] + '...')
|
||||
scapy_cap = None
|
||||
def parse_packet(pkt):
|
||||
""" parse packet and extract 5 tuple and IP bytes """
|
||||
try:
|
||||
scapy_cap = rdpcap(sys.argv[1])
|
||||
except FileNotFoundError:
|
||||
print("\nFile not found")
|
||||
except Scapy_Exception:
|
||||
print("\nBad pcap")
|
||||
l2 = dpkt.ethernet.Ethernet(pkt)
|
||||
if isinstance(l2.data, dpkt.ip.IP):
|
||||
ip_version = 4
|
||||
elif isinstance(l2.data, dpkt.ip6.IP6):
|
||||
ip_version = 6
|
||||
else:
|
||||
return
|
||||
except dpkt.dpkt.NeedData:
|
||||
return
|
||||
|
||||
l3 = l2.data
|
||||
stop_decoding = False
|
||||
while not stop_decoding:
|
||||
if isinstance(l3.data, dpkt.tcp.TCP):
|
||||
l4 = l3.data
|
||||
proto = "TCP"
|
||||
stop_decoding = True
|
||||
elif isinstance(l3.data, dpkt.udp.UDP):
|
||||
l4 = l3.data
|
||||
proto = "UDP"
|
||||
stop_decoding = True
|
||||
elif isinstance(l3.data, dpkt.ip6.IP6):
|
||||
l3 = l3.data
|
||||
else:
|
||||
return
|
||||
|
||||
return ppacket(src_ip=inet_to_str(l3.src), src_port=l4.sport,
|
||||
dst_ip=inet_to_str(l3.dst), dst_port=l4.dport,
|
||||
protocol=proto, ip_version=ip_version,
|
||||
ip_bytes=bytes(l3))
|
||||
|
||||
|
||||
def ppkt_to_flow_key(ppkt):
|
||||
""" create a consistent direction agnostic flow keyfrom a parsed packet """
|
||||
if ppkt.src_ip < ppkt.dst_ip:
|
||||
k = FLOW_KEY.format(ppkt.protocol, ppkt.src_ip, ppkt.src_port, ppkt.dst_ip, ppkt.dst_port)
|
||||
else:
|
||||
for packet in scapy_cap:
|
||||
packetcaptured(packet)
|
||||
else:
|
||||
print('Capturing live traffic from device ' + sys.argv[1] + '...')
|
||||
try:
|
||||
sniff(iface=sys.argv[1], prn=packetcaptured)
|
||||
except KeyboardInterrupt:
|
||||
print('\nInterrupted\n')
|
||||
except PermissionError:
|
||||
sys.exit('\nRoot privilege required for live capture on interface: {}\n'.format(sys.argv[1]))
|
||||
if ppkt.src_ip == ppkt.dst_ip:
|
||||
if ppkt.src_port <= ppkt.dst_port:
|
||||
k = FLOW_KEY.format(ppkt.protocol, ppkt.src_ip, ppkt.src_port, ppkt.dst_ip, ppkt.dst_port)
|
||||
else:
|
||||
k = FLOW_KEY.format(ppkt.protocol, ppkt.dst_ip, ppkt.dst_port, ppkt.src_ip, ppkt.src_port)
|
||||
else:
|
||||
k = FLOW_KEY.format(ppkt.protocol, ppkt.dst_ip, ppkt.dst_port, ppkt.src_ip, ppkt.src_port)
|
||||
return k
|
||||
|
||||
|
||||
result()
|
||||
free(ndpi_info_mod)
|
||||
def parse_arguments():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("input", help="input pcap file path")
|
||||
parser.add_argument('-u', '--include-unknowns', action='store_true')
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
nDPI = NDPI() # As simple as that. :)
|
||||
flow_cache = {} # We store the flows in a dictionary.
|
||||
flow_count = 0 # Flow counter
|
||||
print("Using nDPI {}".format(nDPI.revision))
|
||||
args = parse_arguments()
|
||||
|
||||
with open(args.input, 'rb') as pcap_file:
|
||||
capture = dpkt.pcap.Reader(pcap_file) # We use dpkt pcap capture handler
|
||||
for time, packet in capture:
|
||||
time_ms = int(time * 1000) # Convert packet timestamp to milliseconds
|
||||
ppkt = parse_packet(packet)
|
||||
if ppkt is not None: # If we succeed to parse the packet
|
||||
key = ppkt_to_flow_key(ppkt)
|
||||
try: # Try a Flow update
|
||||
flow = flow_cache[key]
|
||||
flow.detected_protocol = nDPI.process_packet(flow.ndpi_flow, ppkt.ip_bytes, time_ms)
|
||||
flow.pkts += 1
|
||||
flow.bytes += len(packet)
|
||||
except KeyError: # New Flow
|
||||
flow = Flow()
|
||||
flow.index = flow_count
|
||||
flow_count += 1
|
||||
flow.ndpi_flow = NDPIFlow() # We create an nDPIFlow object per Flow
|
||||
flow.detected_protocol = nDPI.process_packet(flow.ndpi_flow, ppkt.ip_bytes, time_ms)
|
||||
flow.pkts += 1
|
||||
flow.bytes += len(packet)
|
||||
flow_cache[key] = flow
|
||||
|
||||
print(" Detected flows:")
|
||||
unknown_flows = []
|
||||
for key, flow in flow_cache.items(): # Iterate over all flows in flow cache
|
||||
if flow.detected_protocol.app_protocol == PROTOCOL_UNKNWON: # Didn't succeed to identigy it using DPI
|
||||
flow.detected_protocol = nDPI.giveup(flow.ndpi_flow) # We try to guess it (port matching, LRU, etc.)
|
||||
FLOW_EXPORT = FLOW_STR.format(flow.index,
|
||||
key,
|
||||
nDPI.protocol_name(flow.detected_protocol),
|
||||
nDPI.protocol_category_name(flow.detected_protocol),
|
||||
flow.ndpi_flow.confidence.name,
|
||||
flow.pkts,
|
||||
flow.bytes)
|
||||
if flow.detected_protocol.app_protocol != PROTOCOL_UNKNWON:
|
||||
print(FLOW_EXPORT) # We start by printing detected flows
|
||||
else:
|
||||
# Format it for later
|
||||
unknown_flows.append(FLOW_EXPORT)
|
||||
if args.include_unknowns:
|
||||
print(" Unknown flows:")
|
||||
for unknown_flow in unknown_flows: # Dump unknown flows
|
||||
print(unknown_flow)
|
||||
|
||||
@@ -1,793 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
file: ndpi_typestruct.py
|
||||
This file is part of nDPI.
|
||||
|
||||
Copyright (C) 2011-19 - ntop.org
|
||||
Copyright (C) 2019 - Zied Aouini <aouinizied@gmail.com> (Incremental improvements)
|
||||
|
||||
nDPI is free software: you can redistribute it and/or modify it under the terms of the GNU 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with nDPI.
|
||||
If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
from ctypes import CDLL, Structure, c_uint16, c_int, c_ulong, c_uint32, CFUNCTYPE, c_void_p, POINTER, c_char_p, c_uint8
|
||||
from ctypes import c_char, c_uint, c_int16, c_longlong, c_size_t, Union, c_ubyte, c_uint64, c_int32, c_ushort, cast
|
||||
from os.path import abspath, dirname
|
||||
ndpi = CDLL(dirname(abspath(__file__)) + '/ndpi_wrap.so')
|
||||
|
||||
# ----------------------------------------------- Structures -----------------------------------------------------------
|
||||
|
||||
|
||||
class NDPIDetectionModuleStruct(Structure):
|
||||
pass
|
||||
|
||||
|
||||
class NDPIFlowStruct(Structure):
|
||||
pass
|
||||
|
||||
|
||||
class NDPIProtocol(Structure):
|
||||
_fields_ = [
|
||||
("master_protocol", c_uint16),
|
||||
("app_protocol", c_uint16),
|
||||
("category", c_int)
|
||||
]
|
||||
|
||||
|
||||
class TimeVal(Structure):
|
||||
_fields_ = [("tv_sec", c_ulong), ("tv_usec", c_ulong)]
|
||||
|
||||
|
||||
class PcapPktHdr(Structure):
|
||||
_fields_ = [("ts", TimeVal), ("caplen", c_uint32), ("len", c_uint32)]
|
||||
|
||||
|
||||
class NDPIMask(Structure):
|
||||
_fields_ = [("fds_bits", c_uint32)]
|
||||
|
||||
|
||||
class NDPIProtocolBitMask(Structure):
|
||||
_fields_ = [("fds_bits", NDPIMask * ndpi.ndpi_wrap_ndpi_num_fds_bits())]
|
||||
|
||||
|
||||
class NDPISubprotocolConfStruct(Structure):
|
||||
_fields_ = [("func", CFUNCTYPE(c_void_p, POINTER(NDPIDetectionModuleStruct), c_char_p, c_char_p, c_int))]
|
||||
|
||||
|
||||
class NDPIAutoma(Structure):
|
||||
_fields_ = [
|
||||
("ac_automa", c_void_p),
|
||||
("ac_automa_finalized", c_uint8)
|
||||
]
|
||||
|
||||
|
||||
class NDPINode(Structure):
|
||||
pass
|
||||
|
||||
|
||||
NDPINode._fields_ = [
|
||||
('key', POINTER(c_char)),
|
||||
('left', POINTER(NDPINode)),
|
||||
('right', POINTER(NDPINode)),
|
||||
]
|
||||
|
||||
|
||||
class NDPICallFunctionStruct(Structure):
|
||||
_fields_ = [
|
||||
("detection_bitmask", NDPIProtocolBitMask),
|
||||
("excluded_protocol_bitmask", NDPIProtocolBitMask),
|
||||
("ndpi_selection_bitmask", c_uint32),
|
||||
("func", CFUNCTYPE(None, POINTER(NDPIDetectionModuleStruct), POINTER(NDPIFlowStruct))),
|
||||
("detection_feature", c_uint8)
|
||||
]
|
||||
|
||||
|
||||
class NDPIProtoDefaultsT(Structure):
|
||||
_fields_ = [
|
||||
("protoName", c_char_p),
|
||||
("protoCategory", c_uint),
|
||||
("subprotocols", c_uint16_p),
|
||||
("subprotocol_count", c_uint32),
|
||||
("protoId", c_uint16),
|
||||
("protoIdx", c_uint16),
|
||||
("protoBreed", c_uint),
|
||||
("func", CFUNCTYPE(None, POINTER(NDPIDetectionModuleStruct), POINTER(NDPIFlowStruct))),
|
||||
]
|
||||
|
||||
|
||||
class NDPIDefaultsPortsTreeNodeT(Structure):
|
||||
_fields_ = [
|
||||
("proto", NDPIProtoDefaultsT),
|
||||
("customUserProto", c_uint8),
|
||||
("default_port", c_int16)
|
||||
]
|
||||
|
||||
|
||||
class SpinlockT(Structure):
|
||||
_fields_ = [("val", c_int)]
|
||||
|
||||
|
||||
class AtomicT(Structure):
|
||||
_fields_ = [("counter", c_int)]
|
||||
|
||||
|
||||
class TimeT(Structure):
|
||||
_fields_ = [("counter", c_longlong)]
|
||||
|
||||
|
||||
class HashIp4pNode(Structure):
|
||||
pass
|
||||
|
||||
|
||||
HashIp4pNode._fields_ = [
|
||||
("next", POINTER(HashIp4pNode)),
|
||||
("prev", POINTER(HashIp4pNode)),
|
||||
("lchg", TimeT),
|
||||
("port", c_uint16),
|
||||
("count", c_uint16, 12),
|
||||
("flag", c_uint16, 4),
|
||||
("ip", c_uint32)
|
||||
]
|
||||
|
||||
|
||||
class HashIp4p(Structure):
|
||||
_fields_ = [
|
||||
("top", POINTER(HashIp4pNode)),
|
||||
("lock",SpinlockT),
|
||||
("len", c_size_t)
|
||||
]
|
||||
|
||||
|
||||
class HashIp4pTable(Structure):
|
||||
_fields_ = [
|
||||
("size", c_size_t),
|
||||
("ipv6", c_int),
|
||||
("lock", SpinlockT),
|
||||
("count", AtomicT),
|
||||
("tbl", HashIp4p)
|
||||
]
|
||||
|
||||
|
||||
class BtAnnounce(Structure):
|
||||
_fields_ = [
|
||||
("hash", c_uint32 * 5),
|
||||
("ip", c_uint32 * 4),
|
||||
("time", c_uint32),
|
||||
("port", c_uint16),
|
||||
("name_len", c_uint8),
|
||||
("name", c_uint8 * 149)
|
||||
]
|
||||
|
||||
|
||||
class NDPILruCacheEntry(Structure):
|
||||
_fields_ = [
|
||||
("key", c_uint32),
|
||||
("is_full", c_uint32, 1),
|
||||
("value", c_uint32, 16),
|
||||
("pad", c_uint32, 15)
|
||||
]
|
||||
|
||||
|
||||
class NDPILruCache(Structure):
|
||||
_fields_ = [
|
||||
("num_entries", c_uint32),
|
||||
("entries", POINTER(NDPILruCacheEntry)),
|
||||
]
|
||||
|
||||
|
||||
class CacheEntry(Structure):
|
||||
pass
|
||||
|
||||
|
||||
CacheEntry._fields_ = [
|
||||
("item", c_void_p),
|
||||
("item_size", c_uint32),
|
||||
("prev", POINTER(CacheEntry)),
|
||||
("next", POINTER(CacheEntry))
|
||||
]
|
||||
|
||||
|
||||
class CacheEntryMap(Structure):
|
||||
pass
|
||||
|
||||
|
||||
CacheEntryMap._fields_ = [
|
||||
("entry", POINTER(CacheEntry)),
|
||||
("next", POINTER(CacheEntryMap)),
|
||||
]
|
||||
|
||||
|
||||
class Cache(Structure):
|
||||
_fields_ = [
|
||||
("size", c_uint32),
|
||||
("max_size", c_uint32),
|
||||
("head", POINTER(CacheEntry)),
|
||||
("tail", POINTER(CacheEntry)),
|
||||
("map", POINTER(POINTER(CacheEntryMap)))
|
||||
]
|
||||
|
||||
|
||||
class CustomCategories(Structure):
|
||||
_fields_ = [
|
||||
("hostnames", NDPIAutoma),
|
||||
("hostnames_shadow", NDPIAutoma),
|
||||
("ipAddresses", c_void_p),
|
||||
("ipAddresses_shadow", c_void_p),
|
||||
("categories_loaded", c_uint8),
|
||||
]
|
||||
|
||||
|
||||
NDPIDetectionModuleStruct._fields_ = [
|
||||
("detection_bitmask", NDPIProtocolBitMask),
|
||||
("generic_http_packet_bitmask", NDPIProtocolBitMask),
|
||||
("current_ts", c_uint32),
|
||||
("ticks_per_second", c_uint32),
|
||||
("custom_category_labels",
|
||||
(c_char * ndpi.ndpi_wrap_num_custom_categories()) * ndpi.ndpi_wrap_custom_category_label_len()),
|
||||
("callback_buffer", NDPICallFunctionStruct * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + 1)),
|
||||
("callback_buffer_size", c_uint32),
|
||||
("callback_buffer_tcp_no_payload", NDPICallFunctionStruct * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + 1)),
|
||||
("callback_buffer_size_tcp_no_payload", c_uint32),
|
||||
("callback_buffer_tcp_payload", NDPICallFunctionStruct * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + 1)),
|
||||
("callback_buffer_size_tcp_payload", c_uint32),
|
||||
("callback_buffer_udp", NDPICallFunctionStruct * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + 1)),
|
||||
("callback_buffer_size_udp", c_uint32),
|
||||
("callback_buffer_non_tcp_udp", NDPICallFunctionStruct * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + 1)),
|
||||
("callback_buffer_size_non_tcp_udp", c_uint32),
|
||||
("tcpRoot", POINTER(NDPIDefaultsPortsTreeNodeT)),
|
||||
("udpRoot", POINTER(NDPIDefaultsPortsTreeNodeT)),
|
||||
("ndpi_log_level", c_uint),
|
||||
("tcp_max_retransmission_window_size", c_uint32),
|
||||
("directconnect_connection_ip_tick_timeout", c_uint32),
|
||||
("subprotocol_conf", NDPISubprotocolConfStruct * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + 1)),
|
||||
("ndpi_num_supported_protocols", c_uint),
|
||||
("ndpi_num_custom_protocols", c_uint),
|
||||
("host_automa", NDPIAutoma),
|
||||
("bigrams_automa", NDPIAutoma),
|
||||
("impossible_bigrams_automa", NDPIAutoma),
|
||||
("custom_categories", CustomCategories),
|
||||
("protocols_ptree", c_void_p),
|
||||
("irc_timeout", c_uint32),
|
||||
("gnutella_timeout", c_uint32),
|
||||
("zattoo_connection_timeout", c_uint32),
|
||||
("jabber_stun_timeout", c_uint32),
|
||||
("jabber_file_transfer_timeout", c_uint32),
|
||||
("ip_version_limit", c_uint8),
|
||||
("bt_ht", POINTER(HashIp4pTable)),
|
||||
("bt6_ht", POINTER(HashIp4pTable)),
|
||||
("bt_ann", POINTER(BtAnnounce)),
|
||||
("bt_ann_len", c_int),
|
||||
("ookla_cache", POINTER(NDPILruCache)),
|
||||
("tinc_cache", POINTER(Cache)),
|
||||
("proto_defaults", NDPIProtoDefaultsT * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() +
|
||||
ndpi.ndpi_wrap_ndpi_max_num_custom_protocols())),
|
||||
("direction_detect_disable", c_uint8, 1),
|
||||
('_pad', c_uint8, 7),
|
||||
('packet', NDPIPacketStruct),
|
||||
]
|
||||
|
||||
|
||||
class U6Addr(Union):
|
||||
_fields_ = [
|
||||
("u6_addr8", c_uint8 * 16),
|
||||
("u6_addr16", c_uint16 * 8),
|
||||
("u6_addr32", c_uint32 * 4),
|
||||
("u6_addr64", c_uint64 * 2)
|
||||
]
|
||||
|
||||
|
||||
class NDPIIn6Addr(Structure):
|
||||
_pack_ = 1
|
||||
_fields_ = [("u6_addr", U6Addr)]
|
||||
|
||||
|
||||
class NDPIIpAddrT(Union):
|
||||
_fields_ = [
|
||||
('ipv4', c_uint32),
|
||||
('ipv4_u_int8_t', c_uint8 * 4),
|
||||
('ipv6', NDPIIn6Addr),
|
||||
]
|
||||
|
||||
|
||||
class NDPIIdStruct(Structure):
|
||||
_fields_ = [
|
||||
('detected_protocol_bitmask', NDPIProtocolBitMask),
|
||||
('irc_port', c_uint16 * 8),
|
||||
('last_time_port_used', c_uint32 * 8),
|
||||
('irc_ts', c_uint32),
|
||||
('gnutella_ts', c_uint32),
|
||||
('battlefield_ts', c_uint32),
|
||||
('rtsp_timer', c_uint32),
|
||||
('jabber_stun_or_ft_ts', c_uint32),
|
||||
('directconnect_last_safe_access_time', c_uint32),
|
||||
('detected_directconnect_port', c_uint16),
|
||||
('detected_directconnect_udp_port', c_uint16),
|
||||
('detected_directconnect_ssl_port', c_uint16),
|
||||
('jabber_voice_stun_port', c_uint16 * 6),
|
||||
('jabber_file_transfer_port', c_uint16 * 2),
|
||||
('detected_gnutella_udp_port1', c_uint16),
|
||||
('detected_gnutella_udp_port2', c_uint16),
|
||||
('irc_number_of_port', c_uint8),
|
||||
('oscar_ssl_session_id', c_uint8 * 33),
|
||||
('jabber_voice_stun_used_ports', c_uint8),
|
||||
]
|
||||
|
||||
|
||||
class NDPIFlowTcpStruct(Structure):
|
||||
_pack_ = 1
|
||||
_fields_ = [
|
||||
('smtp_command_bitmask', c_uint16),
|
||||
('pop_command_bitmask', c_uint16),
|
||||
('wa_matched_so_far', c_uint8),
|
||||
('irc_stage', c_uint8),
|
||||
('h323_valid_packets', c_uint8),
|
||||
('gnutella_msg_id', c_uint8 * 3),
|
||||
('irc_3a_counter', c_uint32, 3),
|
||||
('irc_stage2', c_uint32, 5),
|
||||
('irc_direction', c_uint32, 2),
|
||||
('irc_0x1000_full', c_uint32, 1),
|
||||
('usenet_stage', c_uint32, 2),
|
||||
('http_stage', c_uint32, 2),
|
||||
('http_empty_line_seen', c_uint32, 1),
|
||||
('gnutella_stage', c_uint32, 2),
|
||||
('ssh_stage', c_uint32, 3),
|
||||
('vnc_stage', c_uint32, 2),
|
||||
('telnet_stage', c_uint32, 2),
|
||||
('tls_seen_client_cert', c_uint8, 1),
|
||||
('tls_seen_server_cert', c_uint8, 1),
|
||||
('tls_seen_certificate', c_uint8, 1),
|
||||
('tls_srv_cert_fingerprint_found', c_uint8, 1),
|
||||
('tls_srv_cert_fingerprint_processed', c_uint8, 1),
|
||||
('tls_stage', c_uint8, 2),
|
||||
('tls_record_offset', c_int16),
|
||||
('tls_fingerprint_len', c_int16),
|
||||
('tls_sha1_certificate_fingerprint', c_uint8 * 20),
|
||||
('postgres_stage', c_uint32, 3),
|
||||
('seen_syn', c_uint32, 1),
|
||||
('seen_syn_ack', c_uint32, 1),
|
||||
('seen_ack', c_uint32, 1),
|
||||
('icecast_stage', c_uint32, 1),
|
||||
('dofus_stage', c_uint32, 1),
|
||||
('fiesta_stage', c_uint32, 2),
|
||||
('wow_stage', c_uint32, 2),
|
||||
('shoutcast_stage', c_uint32, 2),
|
||||
('rtp_special_packets_seen', c_uint32, 1),
|
||||
('mail_pop_stage', c_uint32, 2),
|
||||
('mail_imap_stage', c_uint32, 3),
|
||||
('mail_imap_starttls', c_uint32, 2),
|
||||
('skype_packet_id', c_uint8),
|
||||
('citrix_packet_id', c_uint8),
|
||||
('lotus_notes_packet_id', c_uint8),
|
||||
('teamviewer_stage', c_uint8),
|
||||
('prev_zmq_pkt_len', c_uint8),
|
||||
('prev_zmq_pkt', c_char * 10),
|
||||
('ppstream_stage', c_uint32, 3),
|
||||
('memcached_matches', c_uint8),
|
||||
('nest_log_sink_matches', c_uint8),
|
||||
]
|
||||
|
||||
|
||||
class NDPIFlowUdpStruct(Structure):
|
||||
_pack_ = 1
|
||||
_fields_ = [
|
||||
('ppstream_stage', c_uint32, 3),
|
||||
('halflife2_stage', c_uint32, 2),
|
||||
('tftp_stage', c_uint32, 2),
|
||||
('aimini_stage', c_uint32, 5),
|
||||
('xbox_stage', c_uint32, 1),
|
||||
('skype_packet_id', c_uint8),
|
||||
('teamviewer_stage', c_uint8),
|
||||
('eaq_pkt_id', c_uint8),
|
||||
('eaq_sequence', c_uint32),
|
||||
('rx_conn_epoch', c_uint32),
|
||||
('rx_conn_id', c_uint32),
|
||||
('memcached_matches', c_uint8),
|
||||
('wireguard_stage', c_uint8),
|
||||
('wireguard_peer_index', c_uint32 * 2),
|
||||
('quic_reasm_buf', POINTER(c_uint8)),
|
||||
('quic_reasm_buf_len', c_uint32),
|
||||
('csgo_strid', c_uint8 * 18),
|
||||
('csgo_state', c_uint8),
|
||||
('csgo_s2', c_uint8),
|
||||
('csgo_id2', c_uint32),
|
||||
('rdp_to_srv', c_uint8 * 3),
|
||||
('rdp_from_srv', c_uint8 * 3),
|
||||
('rdp_to_srv_pkts,', c_uint8),
|
||||
('rdp_from_srv_pkts', c_uint8),
|
||||
('imo_last_one_byte_pkt,', c_uint8),
|
||||
('imo_last_byte', c_uint8),
|
||||
]
|
||||
|
||||
|
||||
class L4(Union):
|
||||
_fields_ = [("tcp", NDPIFlowTcpStruct), ("udp", NDPIFlowUdpStruct)]
|
||||
|
||||
|
||||
class Http(Structure):
|
||||
_fields_ = [
|
||||
("method", c_int),
|
||||
("request_version", c_uint8),
|
||||
("response_status_code", c_uint16),
|
||||
("url", c_char_p),
|
||||
("content_type", c_char_p),
|
||||
("user_agent", c_char_p),
|
||||
("detected_os", c_char_p),
|
||||
("nat_ip", c_char_p),
|
||||
]
|
||||
|
||||
|
||||
class Dns(Structure):
|
||||
_fields_ = [
|
||||
("num_queries", c_uint8),
|
||||
("num_answers", c_uint8),
|
||||
("reply_code", c_uint8),
|
||||
("is_query", c_uint8),
|
||||
("query_type", c_uint16),
|
||||
("query_class", c_uint16),
|
||||
("rsp_type", c_uint16),
|
||||
("rsp_addr", NDPIIpAddrT)
|
||||
]
|
||||
|
||||
|
||||
class Ntp(Structure):
|
||||
_fields_ = [("request_code", c_uint8),
|
||||
("version", c_uint8)]
|
||||
|
||||
|
||||
class Kerberos(Structure):
|
||||
_fields_ = [("cname", c_char * 24),
|
||||
("realm", c_char * 24)]
|
||||
|
||||
|
||||
class QuicSsl(Structure):
|
||||
_fields_ = [
|
||||
("ssl_version", c_uint16),
|
||||
("client_certificate", c_char * 64),
|
||||
("server_certificate", c_char * 64),
|
||||
("server_organization", c_char * 64),
|
||||
('notBefore', c_uint32),
|
||||
('notAfter', c_uint32),
|
||||
("ja3_client", c_char * 33),
|
||||
("ja3_server", c_char * 33),
|
||||
("server_cipher", c_uint16),
|
||||
("server_unsafe_cipher", c_int)
|
||||
]
|
||||
|
||||
|
||||
class Stun(Structure):
|
||||
_fields_ = [
|
||||
("num_udp_pkts", c_uint8),
|
||||
("num_processed_pkts", c_uint8),
|
||||
("num_binding_requests", c_uint8),
|
||||
]
|
||||
|
||||
|
||||
class Ssh(Structure):
|
||||
_fields_ = [
|
||||
("client_signature", c_char * 48),
|
||||
("server_signature", c_char * 48),
|
||||
("hassh_client", c_char * 33),
|
||||
("hassh_server", c_char * 33)
|
||||
]
|
||||
|
||||
|
||||
class Mdns(Structure):
|
||||
_fields_ = [("answer", c_char * 96)]
|
||||
|
||||
|
||||
class Ubntac2(Structure):
|
||||
_fields_ = [("version", c_char * 32)]
|
||||
|
||||
|
||||
class FtpImapPopSmtp(Structure):
|
||||
_fields_ = [
|
||||
("auth_found", c_uint8, 1),
|
||||
("auth_failed", c_uint8, 1),
|
||||
("auth_tls", c_uint8, 1),
|
||||
("auth_done", c_uint8, 1),
|
||||
("_pad", c_uint8, 4),
|
||||
("username", c_char * 32),
|
||||
("password", c_char * 16)
|
||||
]
|
||||
|
||||
class Bittorrent(Structure):
|
||||
_fields_ = [("hash", c_char * 20)]
|
||||
|
||||
|
||||
class Dhcp(Structure):
|
||||
_fields_ = [
|
||||
("fingerprint", c_char * 48),
|
||||
("class_ident", c_char * 48)
|
||||
]
|
||||
|
||||
|
||||
class Protos(Union):
|
||||
_fields_ = [
|
||||
("dns", Dns),
|
||||
("kerberos", Kerberos),
|
||||
("quic_ssl", QuicSsl),
|
||||
("ssh", Ssh),
|
||||
("mdns", Mdns),
|
||||
("ubntac2", Ubntac2),
|
||||
("bittorrent", Bittorrent),
|
||||
("dhcp", Dhcp)
|
||||
]
|
||||
|
||||
|
||||
class TincCacheEntry(Structure):
|
||||
_pack_ = 1
|
||||
_fields_ = [
|
||||
('src_address', c_uint32),
|
||||
('dst_address', c_uint32),
|
||||
('dst_port', c_uint16),
|
||||
]
|
||||
|
||||
|
||||
class NDPIIntOneLineStruct(Structure):
|
||||
_fields_ = [
|
||||
('ptr', POINTER(c_uint8)),
|
||||
('len', c_uint16),
|
||||
]
|
||||
|
||||
|
||||
class NDPIIphdr(Structure):
|
||||
_pack_ = 1
|
||||
_fields_ = [
|
||||
('ihl', c_uint8, 4),
|
||||
('version', c_uint8, 4),
|
||||
('tos', c_uint8),
|
||||
('tot_len', c_uint16),
|
||||
('id', c_uint16),
|
||||
('frag_off', c_uint16),
|
||||
('ttl', c_uint8),
|
||||
('protocol', c_uint8),
|
||||
('check', c_uint16),
|
||||
('saddr', c_uint32),
|
||||
('daddr', c_uint32)]
|
||||
|
||||
|
||||
class NDPIIp6Hdrctl(Structure):
|
||||
_pack_ = 1
|
||||
_fields_ = [
|
||||
('ip6_un1_flow', c_uint32),
|
||||
('ip6_un1_plen', c_uint16),
|
||||
('ip6_un1_nxt', c_uint8),
|
||||
('ip6_un1_hlim', c_uint8),
|
||||
]
|
||||
|
||||
|
||||
class NDPIIpv6hdr(Structure):
|
||||
_pack_ = 1
|
||||
_fields_ = [
|
||||
('ip6_hdr', NDPIIp6Hdrctl),
|
||||
('ip6_src', NDPIIn6Addr),
|
||||
('ip6_dst', NDPIIn6Addr),
|
||||
]
|
||||
|
||||
|
||||
class NDPITcpHdr(Structure):
|
||||
_pack_ = 1
|
||||
_fields_ = [
|
||||
('source', c_uint16),
|
||||
('dest', c_uint16),
|
||||
('seq', c_uint32),
|
||||
('ack_seq', c_uint32),
|
||||
('res1', c_uint16, 4),
|
||||
('doff', c_uint16, 4),
|
||||
('fin', c_uint16, 1),
|
||||
('syn', c_uint16, 1),
|
||||
('rst', c_uint16, 1),
|
||||
('psh', c_uint16, 1),
|
||||
('ack', c_uint16, 1),
|
||||
('urg', c_uint16, 1),
|
||||
('ece', c_uint16, 1),
|
||||
('cwr', c_uint16, 1),
|
||||
('window', c_uint16),
|
||||
('check', c_uint16),
|
||||
('urg_ptr', c_uint16),
|
||||
]
|
||||
|
||||
|
||||
class NDPIUdpHdr(Structure):
|
||||
_pack_ = 1
|
||||
_fields_ = [
|
||||
('source', c_uint16),
|
||||
('dest', c_uint16),
|
||||
('len', c_uint16),
|
||||
('check', c_uint16),
|
||||
]
|
||||
|
||||
|
||||
class NDPIPacketStruct(Structure):
|
||||
_fields_ = [
|
||||
('iph', POINTER(NDPIIphdr)),
|
||||
('iphv6', POINTER(NDPIIpv6hdr)),
|
||||
('tcp', POINTER(NDPITcpHdr)),
|
||||
('udp', POINTER(NDPIUdpHdr)),
|
||||
('generic_l4_ptr', POINTER(c_uint8)),
|
||||
('payload', POINTER(c_uint8)),
|
||||
('current_timestamp_ms', c_uint64),
|
||||
('detected_protocol_stack', c_uint16 * ndpi.ndpi_wrap_ndpi_procol_size()),
|
||||
('line', NDPIIntOneLineStruct * 64),
|
||||
('host_line', NDPIIntOneLineStruct),
|
||||
('forwarded_line', NDPIIntOneLineStruct),
|
||||
('referer_line', NDPIIntOneLineStruct),
|
||||
('content_line', NDPIIntOneLineStruct),
|
||||
('accept_line', NDPIIntOneLineStruct),
|
||||
('user_agent_line', NDPIIntOneLineStruct),
|
||||
('http_url_name', NDPIIntOneLineStruct),
|
||||
('http_encoding', NDPIIntOneLineStruct),
|
||||
('http_transfer_encoding', NDPIIntOneLineStruct),
|
||||
('http_contentlen', NDPIIntOneLineStruct),
|
||||
('http_cookie', NDPIIntOneLineStruct),
|
||||
('http_origin', NDPIIntOneLineStruct),
|
||||
('http_x_session_type', NDPIIntOneLineStruct),
|
||||
('server_line', NDPIIntOneLineStruct),
|
||||
('http_method', NDPIIntOneLineStruct),
|
||||
('http_response', NDPIIntOneLineStruct),
|
||||
('http_num_headers', c_uint8),
|
||||
('l3_packet_len', c_uint16),
|
||||
('payload_packet_len', c_uint16),
|
||||
('parsed_lines', c_uint16),
|
||||
('empty_line_position', c_uint16),
|
||||
('tcp_retransmission', c_uint8),
|
||||
('packet_lines_parsed_complete', c_uint8, 1),
|
||||
('packet_direction', c_uint8, 1),
|
||||
('empty_line_position_set', c_uint8, 1),
|
||||
('http_check_content', c_uint8, 1),
|
||||
('pad', c_uint8, 4),
|
||||
]
|
||||
|
||||
|
||||
class NDPIFlowStructStack(Structure):
|
||||
_pack_ = 1
|
||||
_fields_ = [
|
||||
("detected_protocol_stack", c_uint16 * ndpi.ndpi_wrap_ndpi_procol_size()),
|
||||
]
|
||||
|
||||
|
||||
NDPIFlowStruct._fields_ = [
|
||||
("ndpi_flow_stack", NDPIFlowStructStack),
|
||||
("guessed_protocol_id", c_uint16),
|
||||
("guessed_host_protocol_id", c_uint16),
|
||||
("guessed_category", c_uint16),
|
||||
("guessed_header_category", c_uint16),
|
||||
("l4_proto", c_uint8),
|
||||
("protocol_id_already_guessed", c_uint8, 1),
|
||||
("host_already_guessed", c_uint8, 1),
|
||||
("init_finished", c_uint8, 1),
|
||||
("setup_packet_direction", c_uint8, 1),
|
||||
("packet_direction", c_uint8, 1),
|
||||
("check_extra_packets", c_uint8, 1),
|
||||
("next_tcp_seq_nr", c_uint32 * 2),
|
||||
("max_extra_packets_to_check", c_uint8),
|
||||
("num_extra_packets_checked", c_uint8),
|
||||
("num_processed_pkts", c_uint8),
|
||||
("extra_packets_func", CFUNCTYPE(c_int, POINTER(NDPIDetectionModuleStruct), POINTER(NDPIFlowStruct))),
|
||||
("l4", L4),
|
||||
("host_server_name", c_char * 80),
|
||||
("http", Http),
|
||||
("stun", Stun),
|
||||
("ftp_imap_pop_smtp", FtpImapPopSmtp),
|
||||
("protos", Protos),
|
||||
("excluded_protocol_bitmask", NDPIProtocolBitMask),
|
||||
("category", c_int),
|
||||
('redis_s2d_first_char', c_uint8),
|
||||
('redis_d2s_first_char', c_uint8),
|
||||
('packet_counter', c_uint16),
|
||||
('packet_direction_counter', c_uint16 * 2),
|
||||
('byte_counter', c_uint16 * 2),
|
||||
('bittorrent_stage', c_uint8),
|
||||
('directconnect_stage', c_uint8, 2),
|
||||
('http_detected', c_uint8, 1),
|
||||
('http_upper_protocol', c_uint16),
|
||||
('http_lower_protocol', c_uint16),
|
||||
('rtsprdt_stage', c_uint8, 2),
|
||||
('zattoo_stage', c_uint8, 3),
|
||||
('thunder_stage', c_uint8, 2),
|
||||
('oscar_ssl_voice_stage', c_uint8, 3),
|
||||
('oscar_video_voice', c_uint8, 1),
|
||||
('florensia_stage', c_uint8, 1),
|
||||
('socks5_stage', c_uint8, 2),
|
||||
('socks4_stage', c_uint8, 2),
|
||||
('edonkey_stage', c_uint8, 2),
|
||||
('ftp_control_stage', c_uint8, 2),
|
||||
('rtmp_stage', c_uint8, 2),
|
||||
('pando_stage', c_uint8, 3),
|
||||
('steam_stage1', c_uint16, 3),
|
||||
('steam_stage2', c_uint16, 2),
|
||||
('steam_stage3', c_uint16, 2),
|
||||
('pplive_stage1', c_uint8, 3),
|
||||
('pplive_stage2', c_uint8, 2),
|
||||
('pplive_stage3', c_uint8, 2),
|
||||
('starcraft_udp_stage', c_uint8, 3),
|
||||
('ovpn_session_id', c_uint8 * 8),
|
||||
('ovpn_counter', c_uint8),
|
||||
('key_mining_cache', c_uint32),
|
||||
('tinc_state', c_uint8),
|
||||
('TincCacheEntry', TincCacheEntry),
|
||||
('src', POINTER(NDPIIdStruct)),
|
||||
('dst', POINTER(NDPIIdStruct))
|
||||
]
|
||||
|
||||
# ----------------------------------------------- nDPI APIs ------------------------------------------------------------
|
||||
|
||||
""" ndpi_detection_giveup: Function to be called before we give up with detection for a given flow.
|
||||
This function reduces the NDPI_UNKNOWN_PROTOCOL detection. """
|
||||
ndpi.ndpi_detection_giveup.restype = NDPIProtocol
|
||||
ndpi.ndpi_detection_giveup.argtypes = [POINTER(NDPIDetectionModuleStruct),
|
||||
POINTER(NDPIFlowStruct), c_uint8,
|
||||
POINTER(c_uint8)]
|
||||
|
||||
""" ndpi_detection_process_packet: Processes one packet and returns the ID of the detected protocol.
|
||||
This is the MAIN PACKET PROCESSING FUNCTION. """
|
||||
ndpi.ndpi_detection_process_packet.restype = NDPIProtocol
|
||||
ndpi.ndpi_detection_process_packet.argtypes = [POINTER(NDPIDetectionModuleStruct),
|
||||
POINTER(NDPIFlowStruct),
|
||||
POINTER(c_ubyte),
|
||||
c_ushort,
|
||||
c_uint64,
|
||||
POINTER(NDPIIdStruct),
|
||||
POINTER(NDPIIdStruct)]
|
||||
|
||||
""" ndpi_ssl_version2str : Converts ssl version to readable string """
|
||||
ndpi.ndpi_ssl_version2str.restype = c_char_p
|
||||
ndpi.ndpi_ssl_version2str.argtypes = [c_int16, POINTER(c_uint8)]
|
||||
|
||||
""" ndpi_init_detection_module: Returns a new initialized detection module.
|
||||
Note that before you can use it you can still load hosts and do other things. As soon as you are ready to use
|
||||
it do not forget to call first ndpi_finalize_initalization() """
|
||||
ndpi.ndpi_init_detection_module.restype = POINTER(NDPIDetectionModuleStruct)
|
||||
|
||||
|
||||
def ndpi_ndpi_finalize_initalization(detection_module):
|
||||
""" ndpi_finalize_initalization: Completes the initialization (ndpi_revision >= 3.1)"""
|
||||
if cast(ndpi.ndpi_revision(), c_char_p).value.decode("utf-8")[:3] >= '3.1':
|
||||
ndpi.ndpi_finalize_initalization.restype = c_void_p
|
||||
ndpi.ndpi_finalize_initalization.argtypes = [POINTER(NDPIDetectionModuleStruct)]
|
||||
return ndpi.ndpi_finalize_initalization(detection_module)
|
||||
else:
|
||||
# ignore it
|
||||
return None
|
||||
|
||||
|
||||
""" ndpi_tfind: find a node, or return 0. """
|
||||
ndpi.ndpi_tfind.restype = c_void_p
|
||||
|
||||
""" ndpi_tsearch: ftp://ftp.cc.uoc.gr/mirrors/OpenBSD/src/lib/libc/stdlib/tsearch.c
|
||||
find or insert datum into search tree. """
|
||||
ndpi.ndpi_tsearch.restype = c_void_p
|
||||
ndpi.ndpi_tsearch.argtypes = [c_void_p, POINTER(c_void_p), CFUNCTYPE(c_int, c_void_p, c_void_p)]
|
||||
|
||||
""" ndpi_revision: Get the nDPI version release. """
|
||||
ndpi.ndpi_revision.restype = c_void_p
|
||||
|
||||
""" ndpi_get_proto_name: Get the protocol name associated to the ID."""
|
||||
ndpi.ndpi_get_proto_name.restype = c_void_p
|
||||
|
||||
""" ndpi_category_get_name: Get protocol category as string."""
|
||||
ndpi.ndpi_category_get_name.restype = c_void_p
|
||||
|
||||
""" ndpi_get_num_supported_protocols: Get the total number of the supported protocols."""
|
||||
ndpi.ndpi_get_num_supported_protocols.restype = c_uint
|
||||
|
||||
""" ndpi_wrap_NDPI_BITMASK_SET_ALL: memset((char *)(p), 0xFF, sizeof(*(p)))"""
|
||||
ndpi.ndpi_wrap_NDPI_BITMASK_SET_ALL.argtypes = [POINTER(NDPIProtocolBitMask)]
|
||||
|
||||
""" ndpi_set_protocol_detection_bitmask2: Sets the protocol bitmask2."""
|
||||
ndpi.ndpi_set_protocol_detection_bitmask2.argtypes = [POINTER(NDPIDetectionModuleStruct),
|
||||
POINTER(NDPIProtocolBitMask)]
|
||||
|
||||
""" ndpi_twalk: Walk the nodes of a tree. """
|
||||
ndpi.ndpi_twalk.argtypes = [c_void_p, CFUNCTYPE(None, c_void_p, c_int32, c_int, c_void_p), c_void_p]
|
||||
|
||||
""" ndpi_tdestroy: node destroy. """
|
||||
ndpi.ndpi_tdestroy.argtypes = [c_void_p, CFUNCTYPE(None, c_void_p)]
|
||||
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* ndpi_wrap.c
|
||||
*
|
||||
* Copyright (C) 2011-19 - ntop.org
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "sys/types.h"
|
||||
#include "ndpi_config.h"
|
||||
#include "ndpi_main.h"
|
||||
|
||||
int ndpi_wrap_get_api_version(){
|
||||
return NDPI_API_VERSION;
|
||||
}
|
||||
|
||||
int ndpi_wrap_ndpi_num_fds_bits(){
|
||||
return NDPI_NUM_FDS_BITS;
|
||||
}
|
||||
|
||||
int ndpi_wrap_num_custom_categories(){
|
||||
return NUM_CUSTOM_CATEGORIES;
|
||||
}
|
||||
|
||||
int ndpi_wrap_custom_category_label_len(){
|
||||
return CUSTOM_CATEGORY_LABEL_LEN;
|
||||
}
|
||||
|
||||
int ndpi_wrap_ndpi_max_supported_protocols(){
|
||||
return NDPI_MAX_SUPPORTED_PROTOCOLS;
|
||||
}
|
||||
|
||||
int ndpi_wrap_ndpi_max_num_custom_protocols(){
|
||||
return NDPI_MAX_NUM_CUSTOM_PROTOCOLS;
|
||||
}
|
||||
|
||||
int ndpi_wrap_ndpi_procol_size(){
|
||||
return NDPI_PROTOCOL_SIZE;
|
||||
}
|
||||
|
||||
void ndpi_wrap_NDPI_BITMASK_SET_ALL(NDPI_PROTOCOL_BITMASK* bitmask){
|
||||
NDPI_ONE(bitmask);
|
||||
}
|
||||
|
||||
void dummy() {
|
||||
/* Dummy call just to cause linker to include the ndpi library */
|
||||
ndpi_tfind(NULL, NULL, NULL);
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
cffi>=1.15.0
|
||||
@@ -0,0 +1,57 @@
|
||||
"""
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
setup.py
|
||||
Copyright (C) 2011-22 - ntop.org
|
||||
This file is part of nDPI, an open source deep packet inspection library.
|
||||
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 NFStream.
|
||||
If not, see <http://www.gnu.org/licenses/>.
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
"""
|
||||
|
||||
from setuptools import setup
|
||||
import os
|
||||
|
||||
|
||||
this_directory = os.path.abspath(os.path.dirname(__file__))
|
||||
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
|
||||
long_description = f.read()
|
||||
|
||||
|
||||
setup(
|
||||
name="ndpi",
|
||||
version='4.3.0',
|
||||
url='https://www.ntop.org/products/deep-packet-inspection/ndpi/',
|
||||
license='LGPLv3',
|
||||
description="Open and Extensible LGPLv3 Deep Packet Inspection Library",
|
||||
long_description=long_description,
|
||||
long_description_content_type='text/markdown',
|
||||
author='Zied Aouini',
|
||||
author_email='aouinizied@gmail.com',
|
||||
packages=['ndpi'],
|
||||
setup_requires=["cffi>=1.15.0"],
|
||||
cffi_modules=["ndpi/ndpi_build.py:ffi_builder"],
|
||||
install_requires=["cffi>=1.15.0"],
|
||||
platforms=["Linux",
|
||||
"Mac OS-X",
|
||||
"Windows",
|
||||
"Unix"],
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)',
|
||||
'Programming Language :: Python :: 3 :: Only',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
'Programming Language :: Python :: 3.9',
|
||||
'Programming Language :: Python :: 3.10',
|
||||
'Topic :: System :: Networking :: Monitoring',
|
||||
],
|
||||
project_urls={
|
||||
'GitHub': 'https://github.com/ntop/nDPI',
|
||||
}
|
||||
)
|
||||
@@ -0,0 +1,28 @@
|
||||
"""
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
tests.py
|
||||
Copyright (C) 2011-22 - ntop.org
|
||||
This file is part of nDPI, an open source deep packet inspection library.
|
||||
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 NFStream.
|
||||
If not, see <http://www.gnu.org/licenses/>.
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
"""
|
||||
|
||||
from ndpi import NDPI, NDPIFlow
|
||||
import time
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
nDPI = NDPI()
|
||||
ndpi_flow = NDPIFlow()
|
||||
nDPI.process_packet(ndpi_flow, b'', time.time())
|
||||
nDPI.giveup(ndpi_flow)
|
||||
print("nDPI Python bindings: OK")
|
||||
except Exception:
|
||||
raise AssertionError("nDPI Python bindings: KO")
|
||||
+6
-1
@@ -2,7 +2,7 @@ CC=@CC@
|
||||
INC=-I ../src/include -I/usr/local/include
|
||||
LIBDPI=../src/lib/libndpi.a
|
||||
LDFLAGS=@LDFLAGS@
|
||||
LIB=$(LIBDPI) -lrrd -lm @LIBS@ @ADDITIONAL_LIBS@
|
||||
LIB=$(LIBDPI) -lm @ADDITIONAL_LIBS@ @LIBRRD@ @LIBS@
|
||||
|
||||
TOOLS=rrd_anomaly rrd_similarity
|
||||
|
||||
@@ -21,6 +21,11 @@ distclean: clean
|
||||
/bin/rm -f Makefile
|
||||
|
||||
distdir:
|
||||
find . -type f -name '*.c' \
|
||||
-o -name '*.txt' | xargs -I'{}' cp '{}' '$(distdir)/{}'
|
||||
|
||||
install:
|
||||
@echo -n ""
|
||||
|
||||
check:
|
||||
true # nothing to do here
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
This directory contains a tool that allows to identify anomalies and similarities in RRD files
|
||||
This directory contains a tool that allows anomalies and similarities in RRD files to be identified
|
||||
|
||||
|
||||
Prerequisite
|
||||
|
||||
@@ -180,7 +180,7 @@ void find_rrds(char *basedir, char *filename, rrd_file_stats *rrds, u_int *num_r
|
||||
char path[PATH_MAX];
|
||||
struct stat s;
|
||||
|
||||
snprintf(path, sizeof(path), "%s/%s", basedir, namelist[n]->d_name);
|
||||
ndpi_snprintf(path, sizeof(path), "%s/%s", basedir, namelist[n]->d_name);
|
||||
|
||||
if(stat(path, &s) == 0) {
|
||||
if(S_ISDIR(s.st_mode))
|
||||
|
||||
+167
-22
@@ -98,6 +98,15 @@ extern "C" {
|
||||
int ndpi_match_string_value(void *_automa, char *string_to_match,
|
||||
u_int match_len, u_int32_t *num);
|
||||
|
||||
/**
|
||||
* Return the protocol error code of a given flow
|
||||
*
|
||||
* @par flow = the flow to analyze
|
||||
* @return the error code or 0 otherwise
|
||||
*
|
||||
*/
|
||||
u_int32_t ndpi_get_flow_error_code(struct ndpi_flow_struct *flow);
|
||||
|
||||
/**
|
||||
* nDPI personal allocation and free functions
|
||||
**/
|
||||
@@ -109,7 +118,7 @@ extern "C" {
|
||||
void * ndpi_flow_malloc(size_t size);
|
||||
void ndpi_flow_free(void *ptr);
|
||||
u_int32_t ndpi_get_tot_allocated_memory(void);
|
||||
|
||||
|
||||
/**
|
||||
* Search the first occurrence of substring -find- in -s-
|
||||
* The search is limited to the first -slen- characters of the string
|
||||
@@ -331,6 +340,40 @@ extern "C" {
|
||||
u_int16_t ndpi_get_flow_masterprotocol(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow);
|
||||
|
||||
/**
|
||||
* Get the app protocol of the passed flows for the detected module
|
||||
*
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par flow = the flow given for the detection module
|
||||
* @return the ID of the app protocol detected
|
||||
*
|
||||
*/
|
||||
u_int16_t ndpi_get_flow_appprotocol(struct ndpi_detection_module_struct *ndpi_str, struct ndpi_flow_struct *flow);
|
||||
|
||||
/**
|
||||
* Get the category of the passed flows for the detected module
|
||||
*
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par flow = the flow given for the detection module
|
||||
* @return the ID of the category
|
||||
*
|
||||
*/
|
||||
ndpi_protocol_category_t ndpi_get_flow_category(struct ndpi_detection_module_struct *ndpi_str, struct ndpi_flow_struct *flow);
|
||||
|
||||
/**
|
||||
* Get the ndpi protocol data of the passed flows for the detected module
|
||||
*
|
||||
*
|
||||
* @par ndpi_struct = the detection module
|
||||
* @par flow = the flow given for the detection module
|
||||
* @par ndpi_proto = the output struct where to store the requested information
|
||||
*
|
||||
*/
|
||||
void ndpi_get_flow_ndpi_proto(struct ndpi_detection_module_struct *ndpi_str, struct ndpi_flow_struct *flow,
|
||||
struct ndpi_proto * ndpi_proto);
|
||||
|
||||
/**
|
||||
* API call that is called internally by ndpi_detection_process_packet or by apps
|
||||
* that want to avoid calling ndpi_detection_process_packet as they have already
|
||||
@@ -722,10 +765,11 @@ extern "C" {
|
||||
*
|
||||
* @par ndpi_mod = the detection module
|
||||
* @par path = the path of the file
|
||||
* @par user_data = pointer to some user data value
|
||||
* @return 0 if the file is loaded correctly;
|
||||
* -1 else
|
||||
*/
|
||||
int ndpi_load_categories_file(struct ndpi_detection_module_struct *ndpi_str, const char* path);
|
||||
int ndpi_load_categories_file(struct ndpi_detection_module_struct *ndpi_str, const char* path, void *user_data);
|
||||
|
||||
/**
|
||||
* Read a file and load the list of risky domains
|
||||
@@ -888,12 +932,16 @@ extern "C" {
|
||||
int ndpi_match_string(void *_automa, char *string_to_match);
|
||||
|
||||
int ndpi_load_ip_category(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
const char *ip_address_and_mask, ndpi_protocol_category_t category);
|
||||
const char *ip_address_and_mask, ndpi_protocol_category_t category,
|
||||
void *user_data);
|
||||
int ndpi_load_hostname_category(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
const char *name_to_add, ndpi_protocol_category_t category);
|
||||
int ndpi_load_category(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
const char *ip_or_name, ndpi_protocol_category_t category);
|
||||
const char *ip_or_name, ndpi_protocol_category_t category,
|
||||
void *user_data);
|
||||
int ndpi_enable_loaded_categories(struct ndpi_detection_module_struct *ndpi_struct);
|
||||
void* ndpi_find_ipv4_category_userdata(struct ndpi_detection_module_struct *ndpi_str,
|
||||
u_int32_t saddr);
|
||||
int ndpi_fill_ip_protocol_category(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
u_int32_t saddr,
|
||||
u_int32_t daddr,
|
||||
@@ -952,12 +1000,12 @@ extern "C" {
|
||||
*
|
||||
* @par ndpi_struct = the struct created for the protocol detection
|
||||
* @par days = the number of days threshold for emitting the alert
|
||||
*
|
||||
*
|
||||
*/
|
||||
void ndpi_set_tls_cert_expire_days(struct ndpi_detection_module_struct *ndpi_str,
|
||||
u_int8_t days);
|
||||
|
||||
|
||||
|
||||
/* Utility functions to set ndpi malloc/free/print wrappers */
|
||||
void set_ndpi_malloc(void* (*__ndpi_malloc)(size_t size));
|
||||
void set_ndpi_free(void (*__ndpi_free)(void *ptr));
|
||||
@@ -1056,7 +1104,7 @@ extern "C" {
|
||||
u_int64_t ndpi_ntohll(u_int64_t v);
|
||||
u_int8_t ndpi_is_valid_protoId(u_int16_t protoId);
|
||||
u_int8_t ndpi_is_encrypted_proto(struct ndpi_detection_module_struct *ndpi_str, ndpi_protocol proto);
|
||||
|
||||
|
||||
/* DGA */
|
||||
int ndpi_check_dga_name(struct ndpi_detection_module_struct *ndpi_str,
|
||||
struct ndpi_flow_struct *flow,
|
||||
@@ -1155,7 +1203,7 @@ extern "C" {
|
||||
int ndpi_serialize_uint32_string(ndpi_serializer *serializer, u_int32_t key, const char *value);
|
||||
|
||||
/**
|
||||
* Serialize a 32-bit unsigned int key and a boolean value
|
||||
* Serialize a 32-bit unsigned int key and a boolean value (JSON/CSV only, not supported by TLV)
|
||||
* @param serializer The serializer handle
|
||||
* @param key The field name or ID
|
||||
* @param value The field value
|
||||
@@ -1269,6 +1317,17 @@ extern "C" {
|
||||
*/
|
||||
int ndpi_serialize_string_string(ndpi_serializer *serializer, const char *key, const char *value);
|
||||
|
||||
/**
|
||||
* Serialize a string key and a string value
|
||||
* @param serializer The serializer handle
|
||||
* @param key The field name or ID
|
||||
* @param value The field value
|
||||
* @param value_len The field value length
|
||||
* @return 0 on success, a negative number otherwise
|
||||
*/
|
||||
int ndpi_serialize_string_string_len(ndpi_serializer *serializer, const char *key,
|
||||
const char *value, u_int16_t value_len);
|
||||
|
||||
/**
|
||||
* Serialize a string key and an unterminated string value
|
||||
* @param serializer The serializer handle
|
||||
@@ -1390,6 +1449,14 @@ extern "C" {
|
||||
*/
|
||||
int ndpi_serialize_start_of_block(ndpi_serializer *serializer, const char *key);
|
||||
|
||||
/**
|
||||
* Serialize the start of a block with a numeric key
|
||||
* @param serializer The serializer handle
|
||||
* @param key The numeric key as 32-bit unsigned integer.
|
||||
* @return 0 on success, a negative number otherwise
|
||||
*/
|
||||
int ndpi_serialize_start_of_block_uint32(ndpi_serializer *serializer, u_int32_t key);
|
||||
|
||||
/**
|
||||
* Serialize the end of a block
|
||||
* @param serializer The serializer handle
|
||||
@@ -1488,6 +1555,13 @@ extern "C" {
|
||||
int ndpi_deserialize_clone_item(ndpi_deserializer *deserializer, ndpi_serializer *serializer);
|
||||
int ndpi_deserialize_clone_all(ndpi_deserializer *deserializer, ndpi_serializer *serializer);
|
||||
|
||||
/*
|
||||
* Escape a string to be suitable for a JSON value, adding double quotes, and terminating the string with a null byte.
|
||||
* It is recommended to provide a destination buffer (dst) which is as large as double the source buffer (src) at least.
|
||||
* Upon successful return, these functions return the number of characters printed (excluding the null byte used to terminate the string).
|
||||
*/
|
||||
int ndpi_json_string_escape(const char *src, int src_len, char *dst, int dst_max_len);
|
||||
|
||||
/* Data analysis */
|
||||
struct ndpi_analyze_struct* ndpi_alloc_data_analysis(u_int16_t _max_series_len);
|
||||
void ndpi_init_data_analysis(struct ndpi_analyze_struct *s, u_int16_t _max_series_len);
|
||||
@@ -1505,6 +1579,7 @@ extern "C" {
|
||||
float ndpi_data_entropy(struct ndpi_analyze_struct *s);
|
||||
float ndpi_data_variance(struct ndpi_analyze_struct *s);
|
||||
float ndpi_data_stddev(struct ndpi_analyze_struct *s);
|
||||
float ndpi_data_mean(struct ndpi_analyze_struct *s);
|
||||
u_int32_t ndpi_data_last(struct ndpi_analyze_struct *s);
|
||||
u_int32_t ndpi_data_min(struct ndpi_analyze_struct *s);
|
||||
u_int32_t ndpi_data_max(struct ndpi_analyze_struct *s);
|
||||
@@ -1528,13 +1603,13 @@ extern "C" {
|
||||
int ndpi_ses_init(struct ndpi_ses_struct *ses, double alpha, float significance);
|
||||
int ndpi_ses_add_value(struct ndpi_ses_struct *ses, const u_int64_t _value, double *forecast, double *confidence_band);
|
||||
void ndpi_ses_fitting(double *values, u_int32_t num_values, float *ret_alpha);
|
||||
|
||||
|
||||
/* ******************************* */
|
||||
|
||||
int ndpi_des_init(struct ndpi_des_struct *des, double alpha, double beta, float significance);
|
||||
int ndpi_des_add_value(struct ndpi_des_struct *des, const u_int64_t _value, double *forecast, double *confidence_band);
|
||||
void ndpi_des_fitting(double *values, u_int32_t num_values, float *ret_alpha, float *ret_beta);
|
||||
|
||||
|
||||
/* ******************************* */
|
||||
|
||||
int ndpi_jitter_init(struct ndpi_jitter_struct *hw, u_int16_t num_periods);
|
||||
@@ -1551,9 +1626,13 @@ extern "C" {
|
||||
|
||||
u_int8_t ndpi_is_protocol_detected(struct ndpi_detection_module_struct *ndpi_str,
|
||||
ndpi_protocol proto);
|
||||
void ndpi_serialize_risk(ndpi_serializer *serializer, ndpi_risk_enum risk);
|
||||
void ndpi_serialize_risk(ndpi_serializer *serializer, ndpi_risk risk);
|
||||
void ndpi_serialize_risk_score(ndpi_serializer *serializer, ndpi_risk_enum risk);
|
||||
void ndpi_serialize_confidence(ndpi_serializer *serializer, ndpi_confidence_t confidence);
|
||||
void ndpi_serialize_proto(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
ndpi_serializer *serializer, ndpi_risk_enum risk,
|
||||
ndpi_serializer *serializer,
|
||||
ndpi_risk_enum risk,
|
||||
ndpi_confidence_t confidence,
|
||||
ndpi_protocol l7_protocol);
|
||||
const char* ndpi_risk2str(ndpi_risk_enum risk);
|
||||
const char* ndpi_severity2str(ndpi_risk_severity s);
|
||||
@@ -1561,6 +1640,12 @@ extern "C" {
|
||||
u_int16_t ndpi_risk2score(ndpi_risk risk,
|
||||
u_int16_t *client_score, u_int16_t *server_score);
|
||||
|
||||
u_int8_t ndpi_check_issuerdn_risk_exception(struct ndpi_detection_module_struct *ndpi_str,
|
||||
char *issuerDN);
|
||||
u_int8_t ndpi_check_flow_risk_exceptions(struct ndpi_detection_module_struct *ndpi_str,
|
||||
u_int num_params,
|
||||
ndpi_risk_params params[]);
|
||||
|
||||
/* ******************************* */
|
||||
|
||||
/* HyperLogLog cardinality estimator */
|
||||
@@ -1582,9 +1667,9 @@ extern "C" {
|
||||
int ndpi_init_bin(struct ndpi_bin *b, enum ndpi_bin_family f, u_int16_t num_bins);
|
||||
void ndpi_free_bin(struct ndpi_bin *b);
|
||||
struct ndpi_bin* ndpi_clone_bin(struct ndpi_bin *b);
|
||||
void ndpi_inc_bin(struct ndpi_bin *b, u_int16_t slot_id, u_int32_t val);
|
||||
void ndpi_set_bin(struct ndpi_bin *b, u_int16_t slot_id, u_int32_t value);
|
||||
u_int32_t ndpi_get_bin_value(struct ndpi_bin *b, u_int16_t slot_id);
|
||||
void ndpi_inc_bin(struct ndpi_bin *b, u_int16_t slot_id, u_int64_t val);
|
||||
void ndpi_set_bin(struct ndpi_bin *b, u_int16_t slot_id, u_int64_t value);
|
||||
u_int64_t ndpi_get_bin_value(struct ndpi_bin *b, u_int16_t slot_id);
|
||||
void ndpi_reset_bin(struct ndpi_bin *b);
|
||||
void ndpi_normalize_bin(struct ndpi_bin *b);
|
||||
char* ndpi_print_bin(struct ndpi_bin *b, u_int8_t normalize_first, char *out_buf, u_int out_buf_len);
|
||||
@@ -1596,14 +1681,70 @@ extern "C" {
|
||||
|
||||
/* ******************************* */
|
||||
|
||||
/*
|
||||
* Finds outliers using Z-score
|
||||
* Z-Score = (Value - Mean) / StdDev
|
||||
*
|
||||
* @par values = pointer to the individual values to be analyzed [in]
|
||||
* @par outliers = pointer to a list of outliers identified [out]
|
||||
* @par num_values = lenght of values and outliers that MUST have the same lenght [in]
|
||||
*
|
||||
* @return The number of outliers found
|
||||
*/
|
||||
u_int ndpi_find_outliers(u_int32_t *values, bool *outliers, u_int32_t num_values);
|
||||
|
||||
/* ******************************* */
|
||||
|
||||
u_int32_t ndpi_quick_16_byte_hash(u_int8_t *in_16_bytes_long);
|
||||
|
||||
/* ******************************* */
|
||||
|
||||
ndpi_str_hash* ndpi_hash_alloc(u_int32_t max_num_entries);
|
||||
void ndpi_hash_free(ndpi_str_hash *h);
|
||||
int ndpi_hash_find_entry(ndpi_str_hash *h, char *key, u_int key_len, u_int8_t *value);
|
||||
int ndpi_hash_add_entry(ndpi_str_hash *h, char *key, u_int8_t key_len, u_int8_t value);
|
||||
/**
|
||||
* Initialize the hashmap.
|
||||
*
|
||||
* @par h = pointer to the hash map [in, out]
|
||||
*
|
||||
* @return 0 on success, 1 otherwise
|
||||
*
|
||||
*/
|
||||
int ndpi_hash_init(ndpi_str_hash **h);
|
||||
|
||||
/**
|
||||
* Free the hashmap.
|
||||
*
|
||||
* @par h = pointer to the hash map [in, out]
|
||||
* @par cleanup_func = pointer to a optional callback function
|
||||
* called for each element in the hashmap [in]
|
||||
*
|
||||
*/
|
||||
void ndpi_hash_free(ndpi_str_hash **h, void (*cleanup_func)(ndpi_str_hash *h));
|
||||
|
||||
/**
|
||||
* Search for an entry in the hashmap.
|
||||
*
|
||||
* @par h = pointer to the hash map [in]
|
||||
* @par key = character string (no '\0' required) [in]
|
||||
* @par key_len = length of the character string @key [in]
|
||||
* @par value = pointer to a pointer to the value, which contains a
|
||||
* previously added hash entry [in, out]
|
||||
*
|
||||
* @return 0 if an entry with that key was found, 1 otherwise
|
||||
*
|
||||
*/
|
||||
int ndpi_hash_find_entry(ndpi_str_hash *h, char *key, u_int key_len, void **value);
|
||||
|
||||
/**
|
||||
* Add an entry to the hashmap.
|
||||
*
|
||||
* @par h = pointer to the hash map [in, out]
|
||||
* @par key = character string (no '\0' required) [in]
|
||||
* @par key_len = length of the character string @key [in]
|
||||
* @par value = pointer to the value to add [in]
|
||||
*
|
||||
* @return 0 if the entry was added, 1 otherwise
|
||||
*
|
||||
*/
|
||||
int ndpi_hash_add_entry(ndpi_str_hash **h, char *key, u_int8_t key_len, void *value);
|
||||
|
||||
/* ******************************* */
|
||||
|
||||
@@ -1619,7 +1760,7 @@ extern "C" {
|
||||
/* ******************************* */
|
||||
|
||||
char* ndpi_get_flow_name(struct ndpi_flow_struct *flow);
|
||||
|
||||
|
||||
/* ******************************* */
|
||||
|
||||
ndpi_bitmap* ndpi_bitmap_alloc(void);
|
||||
@@ -1635,13 +1776,17 @@ extern "C" {
|
||||
|
||||
void ndpi_bitmap_and(ndpi_bitmap* a, ndpi_bitmap* b_and);
|
||||
void ndpi_bitmap_or(ndpi_bitmap* a, ndpi_bitmap* b_or);
|
||||
|
||||
|
||||
ndpi_bitmap_iterator* ndpi_bitmap_iterator_alloc(ndpi_bitmap* b);
|
||||
void ndpi_bitmap_iterator_free(ndpi_bitmap* b);
|
||||
bool ndpi_bitmap_iterator_next(ndpi_bitmap_iterator* i, uint32_t *value);
|
||||
|
||||
/* ******************************* */
|
||||
|
||||
|
||||
char* ndpi_get_flow_risk_info(struct ndpi_flow_struct *flow,
|
||||
char *out, u_int out_len,
|
||||
u_int8_t use_json);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -156,8 +156,7 @@
|
||||
|
||||
/* misc definitions */
|
||||
#define NDPI_DEFAULT_MAX_TCP_RETRANSMISSION_WINDOW_SIZE 0x10000
|
||||
#define NDPI_MAX_NUM_PKTS_PER_FLOW_TO_DISSECT 32
|
||||
|
||||
#define NDPI_DEFAULT_MAX_NUM_PKTS_PER_FLOW_TO_DISSECT 32
|
||||
|
||||
/* TODO: rebuild all memory areas to have a more aligned memory block here */
|
||||
|
||||
@@ -167,17 +166,6 @@
|
||||
#define MAX_PACKET_COUNTER 65000
|
||||
#define MAX_DEFAULT_PORTS 5
|
||||
|
||||
#define NDPI_DIRECTCONNECT_CONNECTION_IP_TICK_TIMEOUT 600
|
||||
#define NDPI_IRC_CONNECTION_TIMEOUT 120
|
||||
#define NDPI_GNUTELLA_CONNECTION_TIMEOUT 60
|
||||
#define NDPI_BATTLEFIELD_CONNECTION_TIMEOUT 60
|
||||
#define NDPI_THUNDER_CONNECTION_TIMEOUT 30
|
||||
#define NDPI_TVANTS_CONNECTION_TIMEOUT 5
|
||||
#define NDPI_ZATTOO_CONNECTION_TIMEOUT 120
|
||||
#define NDPI_ZATTOO_FLASH_TIMEOUT 5
|
||||
#define NDPI_JABBER_STUN_TIMEOUT 30
|
||||
#define NDPI_JABBER_FT_TIMEOUT 5
|
||||
|
||||
#ifdef NDPI_ENABLE_DEBUG_MESSAGES
|
||||
#define NDPI_LOG(proto, m, log_level, args...) \
|
||||
{ \
|
||||
@@ -308,6 +296,10 @@
|
||||
#define NDPI_SCTP_PROTOCOL_TYPE 132
|
||||
#define NDPI_IPIP_PROTOCOL_TYPE 0x04
|
||||
#define NDPI_ICMPV6_PROTOCOL_TYPE 0x3a
|
||||
#define NDPI_PGM_PROTOCOL_TYPE 0x71
|
||||
#define NDPI_PIM_PROTOCOL_TYPE 0x67
|
||||
|
||||
#define NDPI_ARRAY_LENGTH(array) (sizeof(array) / sizeof((array)[0]))
|
||||
|
||||
/* the get_uXX will return raw network packet bytes !! */
|
||||
#define get_u_int8_t(X,O) (*(u_int8_t *)((&(((u_int8_t *)X)[O]))))
|
||||
@@ -327,7 +319,6 @@ static inline u_int64_t get_u_int64_t(const u_int8_t* X, int O)
|
||||
/* new definitions to get little endian from network bytes */
|
||||
#define get_ul8(X,O) get_u_int8_t(X,O)
|
||||
|
||||
|
||||
#if defined(__LITTLE_ENDIAN__) || defined(_LITTLE_ENDIAN)
|
||||
#define get_l16(X,O) get_u_int16_t(X,O)
|
||||
#define get_l32(X,O) get_u_int32_t(X,O)
|
||||
@@ -342,10 +333,6 @@ static inline u_int64_t get_u_int64_t(const u_int8_t* X, int O)
|
||||
/* define memory callback function */
|
||||
#define match_first_bytes(payload,st) (memcmp((payload),(st),(sizeof(st)-1))==0)
|
||||
|
||||
#if defined(WIN32) && !defined(snprintf)
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#if defined(WIN32)
|
||||
#undef strtok_r
|
||||
#define strtok_r strtok_s
|
||||
@@ -375,6 +362,8 @@ static inline u_int64_t get_u_int64_t(const u_int8_t* X, int O)
|
||||
|
||||
#define NDPI_MAX_NUM_TLS_APPL_BLOCKS 8
|
||||
|
||||
@HANDLE_TLS_SIGS@#define TLS_HANDLE_SIGNATURE_ALGORITMS 1
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
||||
#include <libkern/OSByteOrder.h>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* ndpi_includes.h
|
||||
*
|
||||
* Copyright (C) 2011-16 - ntop.org
|
||||
* Copyright (C) 2011-22 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* ndpi_includes_OpenBSD.h
|
||||
*
|
||||
* Copyright (C) 2011-16 - ntop.org
|
||||
* Copyright (C) 2011-22 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
@@ -24,10 +24,6 @@
|
||||
#ifndef __NDPI_INCLUDES_OPENBSD_H__
|
||||
#define __NDPI_INCLUDES_OPENBSD_H__
|
||||
|
||||
#ifndef IPPROTO_SCTP
|
||||
#define IPPROTO_SCTP 132
|
||||
#endif /* IPPROTO_SCTP */
|
||||
|
||||
#include <net/bpf.h>
|
||||
|
||||
typedef struct bpf_timeval pkt_timeval;
|
||||
|
||||
+19
-11
@@ -25,6 +25,10 @@
|
||||
#define __NDPI_MAIN_H__
|
||||
|
||||
#include "ndpi_includes.h"
|
||||
#ifdef NDPI_LIB_COMPILATION
|
||||
/* for macros NDPI_LOG_* in ndpi_define.h */
|
||||
#include "ndpi_config.h"
|
||||
#endif
|
||||
#include "ndpi_define.h"
|
||||
#include "ndpi_protocol_ids.h"
|
||||
#include "ndpi_typedefs.h"
|
||||
@@ -95,13 +99,6 @@ extern "C" {
|
||||
extern void ndpi_set_proto_subprotocols(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
int protoId, ...);
|
||||
|
||||
extern void ndpi_set_proto_defaults(struct ndpi_detection_module_struct *ndpi_mod,
|
||||
u_int8_t is_cleartext,
|
||||
ndpi_protocol_breed_t protoBreed, u_int16_t protoId, char *protoName,
|
||||
ndpi_protocol_category_t protoCategory,
|
||||
ndpi_port_range *tcpDefPorts,
|
||||
ndpi_port_range *udpDefPorts);
|
||||
|
||||
extern void ndpi_int_reset_protocol(struct ndpi_flow_struct *flow);
|
||||
|
||||
extern int ndpi_packet_src_ip_eql(const struct ndpi_packet_struct *packet, const ndpi_ip_addr_t * ip);
|
||||
@@ -123,8 +120,6 @@ extern "C" {
|
||||
|
||||
extern u_int8_t ndpi_is_proto(ndpi_protocol proto, u_int16_t p);
|
||||
|
||||
extern u_int16_t ndpi_get_lower_proto(ndpi_protocol p);
|
||||
|
||||
#ifdef NDPI_ENABLE_DEBUG_MESSAGES
|
||||
void ndpi_debug_get_last_log_function_line(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
const char **file, const char **func, u_int32_t * line);
|
||||
@@ -144,18 +139,31 @@ extern "C" {
|
||||
int ndpi_handle_ipv6_extension_headers(u_int16_t l3len,
|
||||
const u_int8_t ** l4ptr, u_int16_t * l4len,
|
||||
u_int8_t * nxt_hdr);
|
||||
|
||||
void ndpi_set_proto_defaults(struct ndpi_detection_module_struct *ndpi_str,
|
||||
u_int8_t is_cleartext, u_int8_t is_app_protocol,
|
||||
ndpi_protocol_breed_t breed,
|
||||
u_int16_t protoId, char *protoName,
|
||||
ndpi_protocol_category_t protoCategory,
|
||||
ndpi_port_range *tcpDefPorts,
|
||||
ndpi_port_range *udpDefPorts);
|
||||
void ndpi_set_risk(struct ndpi_detection_module_struct *ndpi_str,
|
||||
struct ndpi_flow_struct *flow, ndpi_risk_enum r);
|
||||
struct ndpi_flow_struct *flow, ndpi_risk_enum r,
|
||||
char *risk_message);
|
||||
int ndpi_isset_risk(struct ndpi_detection_module_struct *ndpi_str,
|
||||
struct ndpi_flow_struct *flow, ndpi_risk_enum r);
|
||||
int ndpi_is_printable_string(char * const str, size_t len);
|
||||
int ndpi_is_printable_buffer(uint8_t const * const buf, size_t len);
|
||||
int ndpi_normalize_printable_string(char * const str, size_t len);
|
||||
int ndpi_is_valid_hostname(char * const str, size_t len);
|
||||
#define NDPI_ENTROPY_ENCRYPTED_OR_RANDOM(entropy) (entropy > 7.0f)
|
||||
float ndpi_entropy(u_int8_t const * const buf, size_t len);
|
||||
u_int16_t ndpi_calculate_icmp4_checksum(u_int8_t const * const buf, size_t len);
|
||||
void load_common_alpns(struct ndpi_detection_module_struct *ndpi_str);
|
||||
u_int8_t is_a_common_alpn(struct ndpi_detection_module_struct *ndpi_str,
|
||||
const char *alpn_to_check, u_int alpn_to_check_len);
|
||||
|
||||
char *ndpi_hostname_sni_set(struct ndpi_flow_struct *flow, const u_int8_t *value, size_t value_len);
|
||||
char *ndpi_user_agent_set(struct ndpi_flow_struct *flow, const u_int8_t *value, size_t value_len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ union ndpi_patricia_node_value_t {
|
||||
} uv32;
|
||||
|
||||
u_int64_t uv64;
|
||||
|
||||
|
||||
void *user_data;
|
||||
} u;
|
||||
};
|
||||
@@ -95,6 +95,7 @@ typedef struct _ndpi_patricia_node_t {
|
||||
struct _ndpi_patricia_node_t *l, *r; /* left and right children */
|
||||
struct _ndpi_patricia_node_t *parent;/* may be used */
|
||||
void *data; /* pointer to data */
|
||||
void *custom_user_data; /* pointer to custom userdata */
|
||||
union ndpi_patricia_node_value_t value;
|
||||
} ndpi_patricia_node_t;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
typedef enum {
|
||||
NDPI_PROTOCOL_UNKNOWN = 0,
|
||||
NDPI_PROTOCOL_FTP_CONTROL = 1, /* Tomasz Bujlow <tomasz@skatnet.dk> */
|
||||
NDPI_PROTOCOL_FTP_CONTROL = 1,
|
||||
NDPI_PROTOCOL_MAIL_POP = 2,
|
||||
NDPI_PROTOCOL_MAIL_SMTP = 3,
|
||||
NDPI_PROTOCOL_MAIL_IMAP = 4,
|
||||
@@ -49,7 +49,7 @@ typedef enum {
|
||||
NDPI_PROTOCOL_DHCP = 18,
|
||||
NDPI_PROTOCOL_POSTGRES = 19,
|
||||
NDPI_PROTOCOL_MYSQL = 20,
|
||||
NDPI_PROTOCOL_HOTMAIL = 21,
|
||||
NDPI_PROTOCOL_MS_OUTLOOK = 21, /* Hotmail / Microsoft Outlook / Exchange */
|
||||
NDPI_PROTOCOL_DIRECT_DOWNLOAD_LINK = 22,
|
||||
NDPI_PROTOCOL_MAIL_POPS = 23,
|
||||
NDPI_PROTOCOL_APPLEJUICE = 24,
|
||||
@@ -59,19 +59,19 @@ typedef enum {
|
||||
NDPI_PROTOCOL_VMWARE = 28,
|
||||
NDPI_PROTOCOL_MAIL_SMTPS = 29,
|
||||
NDPI_PROTOCOL_DTLS = 30,
|
||||
NDPI_PROTOCOL_UBNTAC2 = 31, /* Ubiquity UBNT AirControl = 2 - Thomas Fjellstrom <thomas+ndpi@fjellstrom.ca> */
|
||||
NDPI_PROTOCOL_UBNTAC2 = 31, /* Ubiquity UBNT AirControl = 2 */
|
||||
NDPI_PROTOCOL_KONTIKI = 32,
|
||||
NDPI_PROTOCOL_OPENFT = 33,
|
||||
NDPI_PROTOCOL_FASTTRACK = 34,
|
||||
NDPI_PROTOCOL_GNUTELLA = 35,
|
||||
NDPI_PROTOCOL_EDONKEY = 36, /* Tomasz Bujlow <tomasz@skatnet.dk> */
|
||||
NDPI_PROTOCOL_EDONKEY = 36,
|
||||
NDPI_PROTOCOL_BITTORRENT = 37,
|
||||
NDPI_PROTOCOL_SKYPE_CALL = 38, /* Skype call and videocalls */
|
||||
NDPI_PROTOCOL_SKYPE_TEAMS_CALL = 38, /* Skype call and videocalls */
|
||||
NDPI_PROTOCOL_SIGNAL = 39,
|
||||
NDPI_PROTOCOL_MEMCACHED = 40, /* Memcached - Darryl Sokoloski <darryl@egloo.ca> */
|
||||
NDPI_PROTOCOL_MEMCACHED = 40, /* Memcached */
|
||||
NDPI_PROTOCOL_SMBV23 = 41, /* SMB version 2/3 */
|
||||
NDPI_PROTOCOL_MINING = 42, /* Bitcoin, Ethereum, ZCash, Monero */
|
||||
NDPI_PROTOCOL_NEST_LOG_SINK = 43, /* Nest Log Sink (Nest Protect) - Darryl Sokoloski <darryl@egloo.ca> */
|
||||
NDPI_PROTOCOL_NEST_LOG_SINK = 43, /* Nest Log Sink (Nest Protect) */
|
||||
NDPI_PROTOCOL_MODBUS = 44, /* Modbus */
|
||||
NDPI_PROTOCOL_WHATSAPP_CALL = 45, /* WhatsApp video ad audio calls go here */
|
||||
NDPI_PROTOCOL_DATASAVER = 46, /* Protocols used to save data on Internet communications */
|
||||
@@ -88,26 +88,26 @@ typedef enum {
|
||||
NDPI_PROTOCOL_SOPCAST = 57,
|
||||
NDPI_PROTOCOL_DISCORD = 58,
|
||||
NDPI_PROTOCOL_TVUPLAYER = 59,
|
||||
NDPI_PROTOCOL_MONGODB = 60, /* Leonn Paiva <leonn.paiva@gmail.com> */
|
||||
NDPI_PROTOCOL_QQLIVE = 61,
|
||||
NDPI_PROTOCOL_MONGODB = 60,
|
||||
NDPI_PROTOCOL_PLURALSIGHT = 61,
|
||||
NDPI_PROTOCOL_THUNDER = 62,
|
||||
NDPI_PROTOCOL_OCSP = 63,
|
||||
NDPI_PROTOCOL_FREE_64 = 64, /* FREE */
|
||||
NDPI_PROTOCOL_VXLAN = 64,
|
||||
NDPI_PROTOCOL_IRC = 65,
|
||||
NDPI_PROTOCOL_AYIYA = 66,
|
||||
NDPI_PROTOCOL_JABBER = 67,
|
||||
NDPI_PROTOCOL_NATS = 68,
|
||||
NDPI_PROTOCOL_AMONG_US = 69, /* Toni Uhlig <matzeton@googlemail.com> */
|
||||
NDPI_PROTOCOL_AMONG_US = 69,
|
||||
NDPI_PROTOCOL_YAHOO = 70,
|
||||
NDPI_PROTOCOL_DISNEYPLUS = 71, /* Zied Aouini <aouinizied@gmail.com> */
|
||||
NDPI_PROTOCOL_DISNEYPLUS = 71,
|
||||
NDPI_PROTOCOL_GOOGLE_PLUS = 72,
|
||||
NDPI_PROTOCOL_IP_VRRP = 73,
|
||||
NDPI_PROTOCOL_STEAM = 74, /* Tomasz Bujlow <tomasz@skatnet.dk> */
|
||||
NDPI_PROTOCOL_STEAM = 74,
|
||||
NDPI_PROTOCOL_HALFLIFE2 = 75,
|
||||
NDPI_PROTOCOL_WORLDOFWARCRAFT = 76,
|
||||
NDPI_PROTOCOL_TELNET = 77,
|
||||
NDPI_PROTOCOL_STUN = 78,
|
||||
NDPI_PROTOCOL_IP_IPSEC = 79,
|
||||
NDPI_PROTOCOL_IPSEC = 79,
|
||||
NDPI_PROTOCOL_IP_GRE = 80,
|
||||
NDPI_PROTOCOL_IP_ICMP = 81,
|
||||
NDPI_PROTOCOL_IP_IGMP = 82,
|
||||
@@ -118,7 +118,7 @@ typedef enum {
|
||||
NDPI_PROTOCOL_RTP = 87,
|
||||
NDPI_PROTOCOL_RDP = 88,
|
||||
NDPI_PROTOCOL_VNC = 89,
|
||||
NDPI_PROTOCOL_TUMBLR = 90, /* Zied Aouini <aouinizied@gmail.com> */
|
||||
NDPI_PROTOCOL_TUMBLR = 90,
|
||||
NDPI_PROTOCOL_TLS = 91,
|
||||
NDPI_PROTOCOL_SSH = 92,
|
||||
NDPI_PROTOCOL_USENET = 93,
|
||||
@@ -138,7 +138,7 @@ typedef enum {
|
||||
NDPI_PROTOCOL_FIESTA = 107,
|
||||
NDPI_PROTOCOL_FLORENSIA = 108,
|
||||
NDPI_PROTOCOL_GUILDWARS = 109,
|
||||
NDPI_PROTOCOL_AMAZON_ALEXA = 110, /* Zied Aouini <aouinizied@gmail.com> */
|
||||
NDPI_PROTOCOL_AMAZON_ALEXA = 110,
|
||||
NDPI_PROTOCOL_KERBEROS = 111,
|
||||
NDPI_PROTOCOL_LDAP = 112,
|
||||
NDPI_PROTOCOL_MAPLESTORY = 113,
|
||||
@@ -155,7 +155,7 @@ typedef enum {
|
||||
NDPI_PROTOCOL_YOUTUBE = 124,
|
||||
NDPI_PROTOCOL_SKYPE_TEAMS = 125,
|
||||
NDPI_PROTOCOL_GOOGLE = 126,
|
||||
NDPI_PROTOCOL_DCERPC = 127,
|
||||
NDPI_PROTOCOL_RPC = 127,
|
||||
NDPI_PROTOCOL_NETFLOW = 128,
|
||||
NDPI_PROTOCOL_SFLOW = 129,
|
||||
NDPI_PROTOCOL_HTTP_CONNECT = 130,
|
||||
@@ -167,7 +167,7 @@ typedef enum {
|
||||
NDPI_PROTOCOL_YOUTUBE_UPLOAD = 136, /* Upload files to youtube */
|
||||
NDPI_PROTOCOL_HULU = 137,
|
||||
NDPI_PROTOCOL_CHECKMK = 138,
|
||||
NDPI_PROTOCOL_AJP = 139, /* Leonn Paiva <leonn.paiva@gmail.com> */
|
||||
NDPI_PROTOCOL_AJP = 139,
|
||||
NDPI_PROTOCOL_APPLE = 140,
|
||||
NDPI_PROTOCOL_WEBEX = 141,
|
||||
NDPI_PROTOCOL_WHATSAPP = 142,
|
||||
@@ -176,72 +176,72 @@ typedef enum {
|
||||
NDPI_PROTOCOL_APPLE_ITUNES = 145,
|
||||
NDPI_PROTOCOL_RADIUS = 146,
|
||||
NDPI_PROTOCOL_WINDOWS_UPDATE = 147,
|
||||
NDPI_PROTOCOL_TEAMVIEWER = 148, /* xplico.org */
|
||||
NDPI_PROTOCOL_TEAMVIEWER = 148,
|
||||
NDPI_PROTOCOL_TUENTI = 149,
|
||||
NDPI_PROTOCOL_LOTUS_NOTES = 150,
|
||||
NDPI_PROTOCOL_SAP = 151,
|
||||
NDPI_PROTOCOL_GTP = 152,
|
||||
NDPI_PROTOCOL_WSD = 153,
|
||||
NDPI_PROTOCOL_LLMNR = 154,
|
||||
NDPI_PROTOCOL_REMOTE_SCAN = 155,
|
||||
NDPI_PROTOCOL_TOCA_BOCA = 155,
|
||||
NDPI_PROTOCOL_SPOTIFY = 156,
|
||||
NDPI_PROTOCOL_MESSENGER = 157,
|
||||
NDPI_PROTOCOL_H323 = 158, /* Remy Mudingay <mudingay@ill.fr> */
|
||||
NDPI_PROTOCOL_OPENVPN = 159, /* Remy Mudingay <mudingay@ill.fr> */
|
||||
NDPI_PROTOCOL_NOE = 160, /* Remy Mudingay <mudingay@ill.fr> */
|
||||
NDPI_PROTOCOL_CISCOVPN = 161, /* Remy Mudingay <mudingay@ill.fr> */
|
||||
NDPI_PROTOCOL_TEAMSPEAK = 162, /* Remy Mudingay <mudingay@ill.fr> */
|
||||
NDPI_PROTOCOL_TOR = 163, /* Remy Mudingay <mudingay@ill.fr> */
|
||||
NDPI_PROTOCOL_SKINNY = 164, /* Remy Mudingay <mudingay@ill.fr> */
|
||||
NDPI_PROTOCOL_RTCP = 165, /* Remy Mudingay <mudingay@ill.fr> */
|
||||
NDPI_PROTOCOL_RSYNC = 166, /* Remy Mudingay <mudingay@ill.fr> */
|
||||
NDPI_PROTOCOL_ORACLE = 167, /* Remy Mudingay <mudingay@ill.fr> */
|
||||
NDPI_PROTOCOL_CORBA = 168, /* Remy Mudingay <mudingay@ill.fr> */
|
||||
NDPI_PROTOCOL_UBUNTUONE = 169, /* Remy Mudingay <mudingay@ill.fr> */
|
||||
NDPI_PROTOCOL_H323 = 158,
|
||||
NDPI_PROTOCOL_OPENVPN = 159,
|
||||
NDPI_PROTOCOL_NOE = 160,
|
||||
NDPI_PROTOCOL_CISCOVPN = 161,
|
||||
NDPI_PROTOCOL_TEAMSPEAK = 162,
|
||||
NDPI_PROTOCOL_TOR = 163,
|
||||
NDPI_PROTOCOL_SKINNY = 164,
|
||||
NDPI_PROTOCOL_RTCP = 165,
|
||||
NDPI_PROTOCOL_RSYNC = 166,
|
||||
NDPI_PROTOCOL_ORACLE = 167,
|
||||
NDPI_PROTOCOL_CORBA = 168,
|
||||
NDPI_PROTOCOL_UBUNTUONE = 169,
|
||||
NDPI_PROTOCOL_WHOIS_DAS = 170,
|
||||
NDPI_PROTOCOL_COLLECTD = 171,
|
||||
NDPI_PROTOCOL_SOCKS = 172, /* Tomasz Bujlow <tomasz@skatnet.dk> */
|
||||
NDPI_PROTOCOL_SD_RTN = 171, /* Agora SD-RTN: https://www.agora.io/en */
|
||||
NDPI_PROTOCOL_SOCKS = 172,
|
||||
NDPI_PROTOCOL_NINTENDO = 173,
|
||||
NDPI_PROTOCOL_RTMP = 174, /* Tomasz Bujlow <tomasz@skatnet.dk> */
|
||||
NDPI_PROTOCOL_FTP_DATA = 175, /* Tomasz Bujlow <tomasz@skatnet.dk> */
|
||||
NDPI_PROTOCOL_WIKIPEDIA = 176, /* Tomasz Bujlow <tomasz@skatnet.dk> */
|
||||
NDPI_PROTOCOL_RTMP = 174,
|
||||
NDPI_PROTOCOL_FTP_DATA = 175,
|
||||
NDPI_PROTOCOL_WIKIPEDIA = 176,
|
||||
NDPI_PROTOCOL_ZMQ = 177,
|
||||
NDPI_PROTOCOL_AMAZON = 178, /* Tomasz Bujlow <tomasz@skatnet.dk> */
|
||||
NDPI_PROTOCOL_EBAY = 179, /* Tomasz Bujlow <tomasz@skatnet.dk> */
|
||||
NDPI_PROTOCOL_CNN = 180, /* Tomasz Bujlow <tomasz@skatnet.dk> */
|
||||
NDPI_PROTOCOL_MEGACO = 181, /* Gianluca Costa <g.costa@xplico.org> */
|
||||
NDPI_PROTOCOL_AMAZON = 178,
|
||||
NDPI_PROTOCOL_EBAY = 179,
|
||||
NDPI_PROTOCOL_CNN = 180,
|
||||
NDPI_PROTOCOL_MEGACO = 181,
|
||||
NDPI_PROTOCOL_REDIS = 182,
|
||||
NDPI_PROTOCOL_PINTEREST = 183, /* Zied Aouini <aouinizied@gmail.com> */
|
||||
NDPI_PROTOCOL_PINTEREST = 183,
|
||||
NDPI_PROTOCOL_VHUA = 184,
|
||||
NDPI_PROTOCOL_TELEGRAM = 185, /* Gianluca Costa <g.costa@xplico.org> */
|
||||
NDPI_PROTOCOL_TELEGRAM = 185,
|
||||
NDPI_PROTOCOL_VEVO = 186,
|
||||
NDPI_PROTOCOL_PANDORA = 187,
|
||||
NDPI_PROTOCOL_QUIC = 188, /* Andrea Buscarinu <andrea.buscarinu@gmail.com> - Michele Campus <michelecampus5@gmail.com> */
|
||||
NDPI_PROTOCOL_QUIC = 188,
|
||||
NDPI_PROTOCOL_ZOOM = 189, /* Zoom video conference. */
|
||||
NDPI_PROTOCOL_EAQ = 190,
|
||||
NDPI_PROTOCOL_OOKLA = 191,
|
||||
NDPI_PROTOCOL_AMQP = 192,
|
||||
NDPI_PROTOCOL_KAKAOTALK = 193, /* KakaoTalk Chat (no voice call) */
|
||||
NDPI_PROTOCOL_KAKAOTALK_VOICE = 194, /* KakaoTalk Voice */
|
||||
NDPI_PROTOCOL_TWITCH = 195, /* Edoardo Dominici <edoaramis@gmail.com> */
|
||||
NDPI_PROTOCOL_TWITCH = 195,
|
||||
NDPI_PROTOCOL_DOH_DOT = 196, /* DoH (DNS over HTTPS), DoT (DNS over TLS), DoQ (DNS over QUIC). TODO: rename in NDPI_PROTOCOL_DOH_DOT_DOQ? */
|
||||
NDPI_PROTOCOL_WECHAT = 197,
|
||||
NDPI_PROTOCOL_MPEGTS = 198,
|
||||
NDPI_PROTOCOL_SNAPCHAT = 199,
|
||||
NDPI_PROTOCOL_SINA = 200,
|
||||
NDPI_PROTOCOL_HANGOUT_DUO = 201, /* Google Hangout ad Duo (merged as they are very similar) */
|
||||
NDPI_PROTOCOL_IFLIX = 202, /* www.vizuamatix.com R&D team & M.Mallawaarachchie <manoj_ws@yahoo.com> */
|
||||
NDPI_PROTOCOL_IFLIX = 202,
|
||||
NDPI_PROTOCOL_GITHUB = 203,
|
||||
NDPI_PROTOCOL_BJNP = 204,
|
||||
NDPI_PROTOCOL_REDDIT = 205, /* Zied Aouini <aouinizied@gmail.com> */
|
||||
NDPI_PROTOCOL_REDDIT = 205,
|
||||
NDPI_PROTOCOL_WIREGUARD = 206,
|
||||
NDPI_PROTOCOL_SMPP = 207, /* Damir Franusic <df@release14.org> */
|
||||
NDPI_PROTOCOL_DNSCRYPT = 208, /* Toni Uhlig <matzeton@googlemail.com> */
|
||||
NDPI_PROTOCOL_TINC = 209, /* William Guglielmo <william@deselmo.com> */
|
||||
NDPI_PROTOCOL_SMPP = 207,
|
||||
NDPI_PROTOCOL_DNSCRYPT = 208,
|
||||
NDPI_PROTOCOL_TINC = 209,
|
||||
NDPI_PROTOCOL_DEEZER = 210,
|
||||
NDPI_PROTOCOL_INSTAGRAM = 211, /* Andrea Buscarinu <andrea.buscarinu@gmail.com> */
|
||||
NDPI_PROTOCOL_INSTAGRAM = 211,
|
||||
NDPI_PROTOCOL_MICROSOFT = 212,
|
||||
NDPI_PROTOCOL_STARCRAFT = 213, /* Matteo Bracci <matteobracci1@gmail.com> */
|
||||
NDPI_PROTOCOL_STARCRAFT = 213,
|
||||
NDPI_PROTOCOL_TEREDO = 214,
|
||||
NDPI_PROTOCOL_HOTSPOT_SHIELD = 215,
|
||||
NDPI_PROTOCOL_IMO = 216,
|
||||
@@ -260,8 +260,8 @@ typedef enum {
|
||||
NDPI_PROTOCOL_SOMEIP = 229,
|
||||
NDPI_PROTOCOL_FIX = 230,
|
||||
NDPI_PROTOCOL_PLAYSTATION = 231,
|
||||
NDPI_PROTOCOL_PASTEBIN = 232, /* Paulo Angelo <pa@pauloangelo.com> */
|
||||
NDPI_PROTOCOL_LINKEDIN = 233, /* Paulo Angelo <pa@pauloangelo.com> */
|
||||
NDPI_PROTOCOL_PASTEBIN = 232,
|
||||
NDPI_PROTOCOL_LINKEDIN = 233,
|
||||
NDPI_PROTOCOL_SOUNDCLOUD = 234,
|
||||
NDPI_PROTOCOL_CSGO = 235, /* Counter-Strike Global Offensive, Dota = 2 */
|
||||
NDPI_PROTOCOL_LISP = 236,
|
||||
@@ -279,20 +279,20 @@ typedef enum {
|
||||
NDPI_PROTOCOL_ZABBIX = 248,
|
||||
NDPI_PROTOCOL_S7COMM = 249,
|
||||
NDPI_PROTOCOL_MSTEAMS = 250,
|
||||
NDPI_PROTOCOL_WEBSOCKET = 251, /* Leonn Paiva <leonn.paiva@gmail.com> */
|
||||
NDPI_PROTOCOL_ANYDESK = 252, /* Toni Uhlig <matzeton@googlemail.com> */
|
||||
NDPI_PROTOCOL_SOAP = 253, /* Toni Uhlig <matzeton@googlemail.com> */
|
||||
NDPI_PROTOCOL_APPLE_SIRI = 254, /* Zied Aouini <aouinizied@gmail.com> */
|
||||
NDPI_PROTOCOL_WEBSOCKET = 251,
|
||||
NDPI_PROTOCOL_ANYDESK = 252,
|
||||
NDPI_PROTOCOL_SOAP = 253,
|
||||
NDPI_PROTOCOL_APPLE_SIRI = 254,
|
||||
NDPI_PROTOCOL_SNAPCHAT_CALL = 255,
|
||||
NDPI_PROTOCOL_HPVIRTGRP = 256, /* Toni Uhlig <matzeton@googlemail.com> */
|
||||
NDPI_PROTOCOL_GENSHIN_IMPACT = 257, /* Toni Uhlig <matzeton@googlemail.com> */
|
||||
NDPI_PROTOCOL_HPVIRTGRP = 256,
|
||||
NDPI_PROTOCOL_GENSHIN_IMPACT = 257,
|
||||
NDPI_PROTOCOL_ACTIVISION = 258,
|
||||
NDPI_PROTOCOL_FORTICLIENT = 259,
|
||||
NDPI_PROTOCOL_Z3950 = 260, /* Toni Uhlig <matzeton@googlemail.com> */
|
||||
NDPI_PROTOCOL_Z3950 = 260,
|
||||
NDPI_PROTOCOL_LIKEE = 261,
|
||||
NDPI_PROTOCOL_GITLAB = 262,
|
||||
NDPI_PROTOCOL_AVAST_SECUREDNS = 263, /* Toni Uhlig <matzeton@googlemail.com> */
|
||||
NDPI_PROTOCOL_CASSANDRA = 264, /* Lucas Santos <lfneiva.santos@gmail.com> */
|
||||
NDPI_PROTOCOL_AVAST_SECUREDNS = 263,
|
||||
NDPI_PROTOCOL_CASSANDRA = 264,
|
||||
NDPI_PROTOCOL_AMAZON_AWS = 265,
|
||||
NDPI_PROTOCOL_SALESFORCE = 266,
|
||||
NDPI_PROTOCOL_VIMEO = 267,
|
||||
@@ -310,6 +310,29 @@ typedef enum {
|
||||
NDPI_PROTOCOL_BADOO = 279,
|
||||
NDPI_PROTOCOL_ACCUWEATHER = 280,
|
||||
NDPI_PROTOCOL_GOOGLE_CLASSROOM = 281,
|
||||
NDPI_PROTOCOL_HSRP = 282,
|
||||
NDPI_PROTOCOL_CYBERSECURITY = 283, /* Cybersecurity companies */
|
||||
NDPI_PROTOCOL_GOOGLE_CLOUD = 284,
|
||||
NDPI_PROTOCOL_TENCENT = 285,
|
||||
NDPI_PROTOCOL_RAKNET = 286,
|
||||
NDPI_PROTOCOL_XIAOMI = 287,
|
||||
NDPI_PROTOCOL_EDGECAST = 288,
|
||||
NDPI_PROTOCOL_CACHEFLY = 289,
|
||||
NDPI_PROTOCOL_SOFTETHER = 290,
|
||||
NDPI_PROTOCOL_MPEGDASH = 291,
|
||||
NDPI_PROTOCOL_DAZN = 292,
|
||||
NDPI_PROTOCOL_GOTO = 293, /* GoTo products, mainly GoToMeeting */
|
||||
NDPI_PROTOCOL_RSH = 294,
|
||||
NDPI_PROTOCOL_1KXUN = 295,
|
||||
NDPI_PROTOCOL_IP_PGM = 296,
|
||||
NDPI_PROTOCOL_IP_PIM = 297,
|
||||
NDPI_PROTOCOL_COLLECTD = 298,
|
||||
NDPI_PROTOCOL_TUNNELBEAR = 299,
|
||||
NDPI_PROTOCOL_CLOUDFLARE_WARP = 300,
|
||||
NDPI_PROTOCOL_I3D = 301, /* i3d.net: Game Hosting service */
|
||||
NDPI_PROTOCOL_RIOTGAMES = 302,
|
||||
NDPI_PROTOCOL_PSIPHON = 303,
|
||||
NDPI_PROTOCOL_ULTRASURF = 304,
|
||||
|
||||
#ifdef CUSTOM_NDPI_PROTOCOLS
|
||||
#include "../../../nDPI-custom/custom_ndpi_protocol_ids.h"
|
||||
|
||||
@@ -85,6 +85,7 @@ void init_ftp_control_dissector(struct ndpi_detection_module_struct *ndpi_struct
|
||||
void init_ftp_data_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_gnutella_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_gtp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_hsrp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_guildwars_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_h323_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_halflife2_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
@@ -168,6 +169,7 @@ void init_vhua_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int
|
||||
void init_viber_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_vmware_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_vnc_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_vxlan_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_warcraft3_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_whois_das_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_world_of_warcraft_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
@@ -204,7 +206,6 @@ void init_modbus_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_i
|
||||
void init_capwap_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_zabbix_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_wireguard_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_targus_getdata_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_dnp3_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_104_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_s7comm_dissector(struct ndpi_detection_module_struct *ndpi_struct,u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
@@ -218,6 +219,18 @@ void init_genshin_impact_dissector(struct ndpi_detection_module_struct *ndpi_str
|
||||
void init_z3950_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_avast_securedns_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_cassandra_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_ethernet_ip_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_toca_boca_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_sd_rtn_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_raknet_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_xiaomi_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_mpegdash_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_rsh_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_ipsec_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_collectd_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_i3d_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_riotgames_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
void init_ultrasurf_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask);
|
||||
|
||||
/* ndpi_main.c */
|
||||
extern u_int32_t ndpi_ip_port_hash_funct(u_int32_t ip, u_int16_t port);
|
||||
|
||||
+166
-81
@@ -61,15 +61,12 @@ typedef enum {
|
||||
- nDPI/wireshark/ndpi.lua
|
||||
- ndpi_risk2str (in ndpi_utils.c)
|
||||
- doc/flow_risks.rst
|
||||
- ndpi_risk_enum (in python/ndpi.py)
|
||||
- ndpi_known_risks (ndpi_main.c)
|
||||
|
||||
To make sure the risk is also seen by ntopng:
|
||||
1. Add a new flow alert key to the enum FlowAlertTypeEnum in include/ntop_typedefs.h
|
||||
2. Add the very same flow alert key to the table flow_alert_keys in scripts/lua/modules/alert_keys/flow_alert_keys.lua
|
||||
3. Add the risk to the array risk_enum_to_alert_type in src/FlowRiskAlerts.cpp
|
||||
- To initialize .alert_type use the flow alert key added in 1. and an AlertCategory
|
||||
- To initialize .alert_lua_name use a unique string
|
||||
|
||||
Example: https://github.com/ntop/ntopng/commit/aecc1e3e6505a0522439dbb2b295a3703d3d0f9a
|
||||
*/
|
||||
@@ -114,15 +111,42 @@ typedef enum {
|
||||
NDPI_DNS_LARGE_PACKET,
|
||||
NDPI_DNS_FRAGMENTED,
|
||||
NDPI_INVALID_CHARACTERS,
|
||||
NDPI_POSSIBLE_EXPLOIT, /* Log4J and other exploits */
|
||||
NDPI_POSSIBLE_EXPLOIT, /* Log4J, Wordpress and other exploits */
|
||||
NDPI_TLS_CERTIFICATE_ABOUT_TO_EXPIRE,
|
||||
|
||||
NDPI_PUNYCODE_IDN, /* https://en.wikipedia.org/wiki/Punycode */
|
||||
NDPI_ERROR_CODE_DETECTED,
|
||||
NDPI_HTTP_CRAWLER_BOT,
|
||||
NDPI_ANONYMOUS_SUBSCRIBER,
|
||||
NDPI_UNIDIRECTIONAL_TRAFFIC, /* NOTE: as nDPI can detect a protocol with one packet, make sure
|
||||
your app will clear this risk if future packets (not sent to nDPI)
|
||||
are received in the opposite direction */
|
||||
|
||||
/* Leave this as last member */
|
||||
NDPI_MAX_RISK /* must be <= 63 due to (**) */
|
||||
} ndpi_risk_enum;
|
||||
|
||||
typedef u_int64_t ndpi_risk; /* (**) */
|
||||
|
||||
typedef enum {
|
||||
NDPI_PARAM_HOSTNAME /* char* */,
|
||||
NDPI_PARAM_ISSUER_DN /* char* */,
|
||||
NDPI_PARAM_HOST_IPV4 /* u_int32_t* */, /* Network byte order */
|
||||
|
||||
/*
|
||||
IMPORTANT
|
||||
please update ndpi_check_flow_risk_exceptions()
|
||||
(in ndpi_utils.c) whenever you add a new parameter
|
||||
*/
|
||||
|
||||
/* Leave this as last member */
|
||||
NDPI_MAX_RISK_PARAM_ID
|
||||
} ndpi_risk_param_id;
|
||||
|
||||
typedef struct {
|
||||
ndpi_risk_param_id id;
|
||||
void *value; /* char* for strings, u_int32_t* for IPv4 addresses */
|
||||
} ndpi_risk_params;
|
||||
|
||||
typedef enum {
|
||||
NDPI_RISK_LOW,
|
||||
NDPI_RISK_MEDIUM,
|
||||
@@ -168,7 +192,14 @@ typedef struct node_t {
|
||||
/* NDPI_MASK_SIZE */
|
||||
typedef u_int32_t ndpi_ndpi_mask;
|
||||
|
||||
#define MAX_NUM_RISK_INFOS 8
|
||||
|
||||
/* NDPI_PROTO_BITMASK_STRUCT */
|
||||
#ifdef NDPI_CFFI_PREPROCESSING
|
||||
#undef NDPI_NUM_FDS_BITS
|
||||
#define NDPI_NUM_FDS_BITS 16
|
||||
#endif
|
||||
|
||||
typedef struct ndpi_protocol_bitmask_struct {
|
||||
ndpi_ndpi_mask fds_bits[NDPI_NUM_FDS_BITS];
|
||||
} ndpi_protocol_bitmask_struct_t;
|
||||
@@ -179,6 +210,7 @@ typedef void (*ndpi_debug_function_ptr) (u_int32_t protocol, void *module_struct
|
||||
const char *func, unsigned line,
|
||||
const char *format, ...);
|
||||
|
||||
#ifndef NDPI_CFFI_PREPROCESSING_EXCLUDE_PACKED
|
||||
/* ************************************************************ */
|
||||
/* ******************* NDPI NETWORKS HEADERS ****************** */
|
||||
/* ************************************************************ */
|
||||
@@ -196,6 +228,15 @@ typedef void (*ndpi_debug_function_ptr) (u_int32_t protocol, void *module_struct
|
||||
#define PACK_OFF __attribute__((packed))
|
||||
#endif
|
||||
|
||||
/* PLEASE DO NOT REMOVE OR CHANGE THE ORDER OF WHAT IS DELIMITED BY CFFI.NDPI_PACKED_STRUCTURES FLAG AS IT IS USED FOR
|
||||
PYTHON BINDINGS AUTO GENERATION */
|
||||
#ifdef NDPI_CFFI_PREPROCESSING
|
||||
#undef PACK_ON
|
||||
#undef PACK_OFF
|
||||
#define PACK_ON
|
||||
#define PACK_OFF
|
||||
#endif
|
||||
//CFFI.NDPI_PACKED_STRUCTURES
|
||||
PACK_ON
|
||||
struct ndpi_chdlc
|
||||
{
|
||||
@@ -433,12 +474,6 @@ struct ndpi_dns_packet_header {
|
||||
u_int16_t additional_rrs;
|
||||
} PACK_OFF;
|
||||
|
||||
typedef union
|
||||
{
|
||||
u_int32_t ipv4;
|
||||
struct ndpi_in6_addr ipv6;
|
||||
} ndpi_ip_addr_t;
|
||||
|
||||
|
||||
/* +++++++++++++++++++++++ ICMP header +++++++++++++++++++++++ */
|
||||
|
||||
@@ -488,6 +523,22 @@ struct ndpi_vxlanhdr {
|
||||
/* ******************* ********************* ****************** */
|
||||
/* ************************************************************ */
|
||||
|
||||
PACK_ON struct tinc_cache_entry {
|
||||
u_int32_t src_address;
|
||||
u_int32_t dst_address;
|
||||
u_int16_t dst_port;
|
||||
} PACK_OFF;
|
||||
//CFFI.NDPI_PACKED_STRUCTURES
|
||||
#endif // NDPI_CFFI_PREPROCESSING_EXCLUDE_PACKED
|
||||
|
||||
|
||||
typedef union
|
||||
{
|
||||
u_int32_t ipv4;
|
||||
struct ndpi_in6_addr ipv6;
|
||||
} ndpi_ip_addr_t;
|
||||
|
||||
|
||||
typedef struct message {
|
||||
u_int8_t *buffer;
|
||||
u_int buffer_len, buffer_used;
|
||||
@@ -497,12 +548,6 @@ typedef struct message {
|
||||
/* NDPI_PROTOCOL_TINC */
|
||||
#define TINC_CACHE_MAX_SIZE 10
|
||||
|
||||
PACK_ON struct tinc_cache_entry {
|
||||
u_int32_t src_address;
|
||||
u_int32_t dst_address;
|
||||
u_int16_t dst_port;
|
||||
} PACK_OFF;
|
||||
|
||||
/*
|
||||
In case the typedef below is modified, please update
|
||||
ndpi_http_method2str (ndpi_utils.c)
|
||||
@@ -517,7 +562,9 @@ typedef enum {
|
||||
NDPI_HTTP_METHOD_PUT,
|
||||
NDPI_HTTP_METHOD_DELETE,
|
||||
NDPI_HTTP_METHOD_TRACE,
|
||||
NDPI_HTTP_METHOD_CONNECT
|
||||
NDPI_HTTP_METHOD_CONNECT,
|
||||
NDPI_HTTP_METHOD_RPC_IN_DATA,
|
||||
NDPI_HTTP_METHOD_RPC_OUT_DATA,
|
||||
} ndpi_http_method;
|
||||
|
||||
struct ndpi_lru_cache_entry {
|
||||
@@ -634,9 +681,6 @@ struct ndpi_flow_tcp_struct {
|
||||
/* NDPI_PROTOCOL_SKYPE */
|
||||
u_int8_t skype_packet_id;
|
||||
|
||||
/* NDPI_PROTOCOL_CITRIX */
|
||||
u_int8_t citrix_packet_id;
|
||||
|
||||
/* NDPI_PROTOCOL_LOTUS_NOTES */
|
||||
u_int8_t lotus_notes_packet_id;
|
||||
|
||||
@@ -699,7 +743,8 @@ struct ndpi_flow_udp_struct {
|
||||
|
||||
/* NDPI_PROTOCOL_QUIC */
|
||||
u_int8_t *quic_reasm_buf;
|
||||
u_int32_t quic_reasm_buf_len;
|
||||
u_int8_t *quic_reasm_buf_bitmap;
|
||||
u_int32_t quic_reasm_buf_last_pos;
|
||||
|
||||
/* NDPI_PROTOCOL_CSGO */
|
||||
u_int8_t csgo_strid[18],csgo_state,csgo_s2;
|
||||
@@ -804,7 +849,9 @@ typedef enum {
|
||||
NDPI_CONFIDENCE_UNKNOWN = 0, /* Unknown classification */
|
||||
NDPI_CONFIDENCE_MATCH_BY_PORT, /* Classification obtained looking only at the L4 ports */
|
||||
NDPI_CONFIDENCE_MATCH_BY_IP, /* Classification obtained looking only at the L3 addresses */
|
||||
NDPI_CONFIDENCE_DPI_CACHE, /* Classification results based on same LRU cache (i.e. correlation among sessions) */
|
||||
NDPI_CONFIDENCE_DPI_PARTIAL, /* Classification results based on partial/incomplete DPI information */
|
||||
NDPI_CONFIDENCE_DPI_PARTIAL_CACHE, /* Classification results based on some LRU cache with partial/incomplete DPI information */
|
||||
NDPI_CONFIDENCE_DPI_CACHE, /* Classification results based on some LRU cache (i.e. correlation among sessions) */
|
||||
NDPI_CONFIDENCE_DPI, /* Deep packet inspection */
|
||||
|
||||
/*
|
||||
@@ -870,6 +917,7 @@ typedef enum {
|
||||
NDPI_PROTOCOL_CATEGORY_SHOPPING,
|
||||
NDPI_PROTOCOL_CATEGORY_PRODUCTIVITY,
|
||||
NDPI_PROTOCOL_CATEGORY_FILE_SHARING,
|
||||
|
||||
/*
|
||||
The category below is used by sites who are used
|
||||
to test connectivity
|
||||
@@ -880,6 +928,7 @@ typedef enum {
|
||||
The category below is used for vocal assistance services.
|
||||
*/
|
||||
NDPI_PROTOCOL_CATEGORY_VIRTUAL_ASSISTANT,
|
||||
NDPI_PROTOCOL_CATEGORY_CYBERSECURITY,
|
||||
|
||||
/* Some custom categories */
|
||||
CUSTOM_CATEGORY_MINING = 99,
|
||||
@@ -915,14 +964,15 @@ typedef enum {
|
||||
|
||||
typedef enum {
|
||||
ndpi_pref_direction_detect_disable = 0,
|
||||
ndpi_pref_enable_tls_block_dissection /* nDPI considers only those blocks past the certificate exchange */
|
||||
ndpi_pref_max_packets_to_process,
|
||||
ndpi_pref_enable_tls_block_dissection, /* nDPI considers only those blocks past the certificate exchange */
|
||||
} ndpi_detection_preference;
|
||||
|
||||
/* ntop extensions */
|
||||
typedef struct ndpi_proto_defaults {
|
||||
char *protoName;
|
||||
ndpi_protocol_category_t protoCategory;
|
||||
u_int8_t isClearTextProto;
|
||||
u_int8_t isClearTextProto:1, isAppProtocol:1, _notused:6;
|
||||
u_int16_t *subprotocols;
|
||||
u_int32_t subprotocol_count;
|
||||
u_int16_t protoId, protoIdx;
|
||||
@@ -941,6 +991,12 @@ typedef struct _ndpi_automa {
|
||||
void *ac_automa; /* Real type is AC_AUTOMATA_t */
|
||||
} ndpi_automa;
|
||||
|
||||
typedef struct ndpi_str_hash {
|
||||
unsigned int hash;
|
||||
void *value;
|
||||
u_int8_t private_data[0];
|
||||
} ndpi_str_hash;
|
||||
|
||||
typedef struct ndpi_proto {
|
||||
/*
|
||||
Note
|
||||
@@ -949,9 +1005,10 @@ typedef struct ndpi_proto {
|
||||
*/
|
||||
u_int16_t master_protocol /* e.g. HTTP */, app_protocol /* e.g. FaceBook */;
|
||||
ndpi_protocol_category_t category;
|
||||
void *custom_category_userdata;
|
||||
} ndpi_protocol;
|
||||
|
||||
#define NDPI_PROTOCOL_NULL { NDPI_PROTOCOL_UNKNOWN , NDPI_PROTOCOL_UNKNOWN , NDPI_PROTOCOL_CATEGORY_UNSPECIFIED }
|
||||
#define NDPI_PROTOCOL_NULL { NDPI_PROTOCOL_UNKNOWN , NDPI_PROTOCOL_UNKNOWN , NDPI_PROTOCOL_CATEGORY_UNSPECIFIED, NULL }
|
||||
|
||||
#define NUM_CUSTOM_CATEGORIES 5
|
||||
#define CUSTOM_CATEGORY_LABEL_LEN 32
|
||||
@@ -964,6 +1021,9 @@ typedef struct ndpi_proto {
|
||||
#define _NDPI_CONFIG_H_
|
||||
#endif
|
||||
|
||||
/* PLEASE DO NOT REMOVE OR CHANGE THE ORDER OF WHAT IS DELIMITED BY CFFI.NDPI_MODULE_STRUCT FLAG AS IT IS USED FOR
|
||||
PYTHON BINDINGS AUTO GENERATION */
|
||||
//CFFI.NDPI_MODULE_STRUCT
|
||||
typedef enum {
|
||||
ndpi_stun_cache,
|
||||
ndpi_hangout_cache
|
||||
@@ -976,10 +1036,9 @@ typedef struct ndpi_list_struct {
|
||||
|
||||
struct ndpi_detection_module_struct {
|
||||
NDPI_PROTOCOL_BITMASK detection_bitmask;
|
||||
NDPI_PROTOCOL_BITMASK generic_http_packet_bitmask;
|
||||
|
||||
u_int32_t current_ts;
|
||||
u_int32_t ticks_per_second;
|
||||
u_int16_t max_packets_to_process;
|
||||
u_int16_t num_tls_blocks_to_follow;
|
||||
u_int8_t skip_tls_blocks_until_change_cipher:1, enable_ja3_plus:1, _notused:6;
|
||||
u_int8_t tls_certificate_expire_in_x_days;
|
||||
@@ -988,20 +1047,17 @@ struct ndpi_detection_module_struct {
|
||||
void *user_data;
|
||||
#endif
|
||||
char custom_category_labels[NUM_CUSTOM_CATEGORIES][CUSTOM_CATEGORY_LABEL_LEN];
|
||||
|
||||
/* callback function buffer */
|
||||
struct ndpi_call_function_struct callback_buffer[NDPI_MAX_SUPPORTED_PROTOCOLS + 1];
|
||||
struct ndpi_call_function_struct *callback_buffer;
|
||||
struct ndpi_call_function_struct *callback_buffer_tcp_no_payload;
|
||||
struct ndpi_call_function_struct *callback_buffer_tcp_payload;
|
||||
struct ndpi_call_function_struct *callback_buffer_udp;
|
||||
struct ndpi_call_function_struct *callback_buffer_non_tcp_udp;
|
||||
u_int32_t callback_buffer_size;
|
||||
|
||||
struct ndpi_call_function_struct callback_buffer_tcp_no_payload[NDPI_MAX_SUPPORTED_PROTOCOLS + 1];
|
||||
u_int32_t callback_buffer_size_tcp_no_payload;
|
||||
|
||||
struct ndpi_call_function_struct callback_buffer_tcp_payload[NDPI_MAX_SUPPORTED_PROTOCOLS + 1];
|
||||
u_int32_t callback_buffer_size_tcp_payload;
|
||||
|
||||
struct ndpi_call_function_struct callback_buffer_udp[NDPI_MAX_SUPPORTED_PROTOCOLS + 1];
|
||||
u_int32_t callback_buffer_size_udp;
|
||||
|
||||
struct ndpi_call_function_struct callback_buffer_non_tcp_udp[NDPI_MAX_SUPPORTED_PROTOCOLS + 1];
|
||||
u_int32_t callback_buffer_size_non_tcp_udp;
|
||||
|
||||
ndpi_default_ports_tree_node_t *tcpRoot, *udpRoot;
|
||||
@@ -1020,8 +1076,6 @@ struct ndpi_detection_module_struct {
|
||||
/* misc parameters */
|
||||
u_int32_t tcp_max_retransmission_window_size;
|
||||
|
||||
u_int32_t directconnect_connection_ip_tick_timeout;
|
||||
|
||||
/* subprotocol registration handler */
|
||||
struct ndpi_subprotocol_conf_struct subprotocol_conf[NDPI_MAX_SUPPORTED_PROTOCOLS + 1];
|
||||
|
||||
@@ -1032,13 +1086,14 @@ struct ndpi_detection_module_struct {
|
||||
/* HTTP/DNS/HTTPS/QUIC host matching */
|
||||
ndpi_automa host_automa, /* Used for DNS/HTTPS */
|
||||
risky_domain_automa, tls_cert_subject_automa,
|
||||
malicious_ja3_automa, malicious_sha1_automa,
|
||||
host_risk_mask_automa, common_alpns_automa;
|
||||
host_risk_mask_automa, common_alpns_automa;
|
||||
ndpi_str_hash *malicious_ja3_hashmap, *malicious_sha1_hashmap;
|
||||
/* IMPORTANT: please update ndpi_finalize_initialization() whenever you add a new automa */
|
||||
|
||||
ndpi_list *trusted_issuer_dn;
|
||||
|
||||
void *ip_risk_mask_ptree;
|
||||
void *ip_risk_ptree;
|
||||
|
||||
struct {
|
||||
ndpi_automa hostnames, hostnames_shadow;
|
||||
@@ -1049,13 +1104,6 @@ struct ndpi_detection_module_struct {
|
||||
/* IP-based protocol detection */
|
||||
void *protocols_ptree;
|
||||
|
||||
/* irc parameters */
|
||||
u_int32_t irc_timeout;
|
||||
/* gnutella parameters */
|
||||
u_int32_t gnutella_timeout;
|
||||
/* rstp */
|
||||
u_int32_t jabber_stun_timeout;
|
||||
u_int32_t jabber_file_transfer_timeout;
|
||||
u_int8_t ip_version_limit;
|
||||
|
||||
/* NDPI_PROTOCOL_OOKLA */
|
||||
@@ -1101,6 +1149,7 @@ struct ndpi_detection_module_struct {
|
||||
};
|
||||
|
||||
#endif /* NDPI_LIB_COMPILATION */
|
||||
//CFFI.NDPI_MODULE_STRUCT
|
||||
|
||||
typedef enum {
|
||||
ndpi_cipher_safe = NDPI_CIPHER_SAFE,
|
||||
@@ -1118,11 +1167,11 @@ struct tls_heuristics {
|
||||
u_int8_t is_safari_tls:1, is_firefox_tls:1, is_chrome_tls:1, notused:5;
|
||||
};
|
||||
|
||||
/*
|
||||
NOTE
|
||||
When the struct below is modified don't forget to update
|
||||
- ndpi_flow_struct (in python/ndpi.py)
|
||||
*/
|
||||
struct ndpi_risk_information {
|
||||
ndpi_risk_enum id;
|
||||
char *info;
|
||||
};
|
||||
|
||||
struct ndpi_flow_struct {
|
||||
u_int16_t detected_protocol_stack[NDPI_PROTOCOL_SIZE];
|
||||
|
||||
@@ -1173,18 +1222,20 @@ struct ndpi_flow_struct {
|
||||
char flow_extra_info[16];
|
||||
|
||||
/* General purpose field used to save mainly hostname/SNI information.
|
||||
* In details it used for: DNS and NETBIOS name, HTTP and DHCP hostname,
|
||||
* WHOIS request, TLS/QUIC server name and STUN realm.
|
||||
* In details it used for: COLLECTD, DNS, SSDP and NETBIOS name, HTTP and DHCP hostname,
|
||||
* WHOIS request, TLS/QUIC server name, XIAOMI domain and STUN realm.
|
||||
*
|
||||
* Please, think *very* hard before increasing its size!
|
||||
*/
|
||||
char host_server_name[80];
|
||||
|
||||
u_int8_t initial_binary_bytes[8], initial_binary_bytes_len;
|
||||
u_int8_t risk_checked:1, ip_risk_mask_evaluated:1, host_risk_mask_evaluated:1, _notused:5;
|
||||
u_int8_t risk_checked:1, ip_risk_mask_evaluated:1, host_risk_mask_evaluated:1, tree_risk_checked:1, _notused:4;
|
||||
ndpi_risk risk_mask; /* Stores the flow risk mask for flow peers */
|
||||
ndpi_risk risk; /* Issues found with this flow [bitmask of ndpi_risk] */
|
||||
|
||||
struct ndpi_risk_information risk_infos[MAX_NUM_RISK_INFOS]; /* String that contains information about the risks found */
|
||||
u_int8_t num_risk_infos;
|
||||
|
||||
/*
|
||||
This structure below will not not stay inside the protos
|
||||
structure below as HTTP is used by many subprotocols
|
||||
@@ -1256,13 +1307,17 @@ struct ndpi_flow_struct {
|
||||
char *esni;
|
||||
} encrypted_sni;
|
||||
ndpi_cipher_weakness server_unsafe_cipher;
|
||||
} tls_quic;
|
||||
} tls_quic; /* Used also by DTLS and POPS/IMAPS/SMTPS */
|
||||
|
||||
struct {
|
||||
char client_signature[48], server_signature[48];
|
||||
char hassh_client[33], hassh_server[33];
|
||||
} ssh;
|
||||
|
||||
struct {
|
||||
char filename[128];
|
||||
} tftp;
|
||||
|
||||
struct {
|
||||
u_int8_t username_detected:1, username_found:1,
|
||||
password_detected:1, password_found:1,
|
||||
@@ -1271,6 +1326,16 @@ struct ndpi_flow_struct {
|
||||
char username[32], password[32];
|
||||
} telnet;
|
||||
|
||||
struct {
|
||||
char client_username[32];
|
||||
char server_username[32];
|
||||
char command[48];
|
||||
} rsh;
|
||||
|
||||
struct {
|
||||
char client_username[32];
|
||||
} collectd;
|
||||
|
||||
struct {
|
||||
char version[32];
|
||||
} ubntac2;
|
||||
@@ -1287,6 +1352,12 @@ struct ndpi_flow_struct {
|
||||
char fingerprint[48];
|
||||
char class_ident[48];
|
||||
} dhcp;
|
||||
|
||||
struct {
|
||||
u_int8_t version; /* 0 = SNMPv1, 1 = SNMPv2c, 3 = SNMPv3 */
|
||||
u_int8_t primitive; /* GET, SET... */
|
||||
u_int8_t error_status;
|
||||
} snmp;
|
||||
} protos;
|
||||
|
||||
/*** ALL protocol specific 64 bit variables here ***/
|
||||
@@ -1299,9 +1370,13 @@ struct ndpi_flow_struct {
|
||||
/* NDPI_PROTOCOL_REDIS */
|
||||
u_int8_t redis_s2d_first_char, redis_d2s_first_char;
|
||||
|
||||
/* Only packets with L5 data (ie no TCP SYN, pure ACKs, ...) */
|
||||
u_int16_t packet_counter; // can be 0 - 65000
|
||||
u_int16_t packet_direction_counter[2];
|
||||
u_int16_t byte_counter[2];
|
||||
|
||||
/* Every packets */
|
||||
u_int16_t packet_direction_complete_counter[2]; // can be 0 - 65000
|
||||
|
||||
/* NDPI_PROTOCOL_BITTORRENT */
|
||||
u_int8_t bittorrent_stage; // can be 0 - 255
|
||||
u_int8_t bt_check_performed : 1;
|
||||
@@ -1352,6 +1427,13 @@ struct ndpi_flow_struct {
|
||||
/* NDPI_PROTOCOL_TINC */
|
||||
u_int8_t tinc_state;
|
||||
struct tinc_cache_entry tinc_cache_entry;
|
||||
|
||||
/*
|
||||
Leave this field below at the end
|
||||
The field below can be used by third
|
||||
party dissectors for storing private data
|
||||
*/
|
||||
u_int8_t priv_data[16];
|
||||
};
|
||||
|
||||
#define NDPI_PROTOCOL_DEFAULT_LEVEL 0
|
||||
@@ -1382,12 +1464,24 @@ typedef struct {
|
||||
|
||||
typedef u_int32_t ndpi_init_prefs;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ndpi_no_prefs = 0,
|
||||
ndpi_dont_load_tor_hosts = 1,
|
||||
ndpi_dont_init_libgcrypt = 2,
|
||||
ndpi_enable_ja3_plus = 4
|
||||
typedef enum {
|
||||
ndpi_no_prefs = 0,
|
||||
ndpi_dont_load_tor_list = (1 << 0),
|
||||
ndpi_dont_init_libgcrypt = (1 << 1),
|
||||
ndpi_enable_ja3_plus = (1 << 2),
|
||||
ndpi_dont_load_azure_list = (1 << 3),
|
||||
ndpi_dont_load_whatsapp_list = (1 << 4),
|
||||
ndpi_dont_load_amazon_aws_list = (1 << 5),
|
||||
ndpi_dont_load_ethereum_list = (1 << 6),
|
||||
ndpi_dont_load_zoom_list = (1 << 7),
|
||||
ndpi_dont_load_cloudflare_list = (1 << 8),
|
||||
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_dont_load_icloud_private_relay_list = (1 << 13),
|
||||
ndpi_dont_init_risk_ptree = (1 << 14),
|
||||
ndpi_dont_load_cachefly_list = (1 << 15),
|
||||
} ndpi_prefs;
|
||||
|
||||
typedef struct {
|
||||
@@ -1466,7 +1560,11 @@ typedef struct {
|
||||
|
||||
#define ndpi_private_deserializer ndpi_private_serializer
|
||||
|
||||
#ifdef NDPI_CFFI_PREPROCESSING
|
||||
typedef struct { char c[72]; } ndpi_serializer;
|
||||
#else
|
||||
typedef struct { char c[sizeof(ndpi_private_serializer)]; } ndpi_serializer;
|
||||
#endif
|
||||
|
||||
#define ndpi_deserializer ndpi_serializer
|
||||
|
||||
@@ -1535,7 +1633,8 @@ struct ndpi_hll {
|
||||
enum ndpi_bin_family {
|
||||
ndpi_bin_family8,
|
||||
ndpi_bin_family16,
|
||||
ndpi_bin_family32
|
||||
ndpi_bin_family32,
|
||||
ndpi_bin_family64,
|
||||
};
|
||||
|
||||
struct ndpi_bin {
|
||||
@@ -1547,24 +1646,10 @@ struct ndpi_bin {
|
||||
u_int8_t *bins8; /* num_bins bins */
|
||||
u_int16_t *bins16; /* num_bins bins */
|
||||
u_int32_t *bins32; /* num_bins bins */
|
||||
u_int64_t *bins64; /* num_bins bins */
|
||||
} u;
|
||||
};
|
||||
|
||||
/* **************************************** */
|
||||
|
||||
struct ndpi_str_hash_info {
|
||||
char *key; /* Key */
|
||||
u_int8_t key_len;
|
||||
u_int8_t value; /* Value */
|
||||
struct ndpi_str_hash_info *next;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
u_int32_t num_buckets, max_num_entries;
|
||||
struct ndpi_str_hash_info **buckets;
|
||||
} ndpi_str_hash;
|
||||
|
||||
|
||||
/* **************************************** */
|
||||
|
||||
#define HW_HISTORY_LEN 4
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* ndpi_unix.h
|
||||
*
|
||||
* Copyright (C) 2011-16 - ntop.org
|
||||
* Copyright (C) 2011-22 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
|
||||
@@ -1,4 +1,25 @@
|
||||
|
||||
/*
|
||||
* ndpi_main.c
|
||||
*
|
||||
* Copyright (C) 2011-22 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __NDPI_UTILS_H__
|
||||
#define __NDPI_UTILS_H__
|
||||
@@ -12,18 +33,20 @@
|
||||
// #define NDPI_ENABLE_DEBUG_INFO_MESSAGES
|
||||
// #define NDPI_ENABLE_DEBUG_TRACE_MESSAGES
|
||||
|
||||
#ifndef NDPI_CFFI_PREPROCESSING
|
||||
extern void printRawData(const uint8_t *ptr, size_t len);
|
||||
//extern uint8_t add_segment_to_buffer( struct ndpi_flow_struct *flow, struct ndpi_tcphdr const * tcph, uint32_t waited);
|
||||
//extern uint8_t check_for_sequence( struct ndpi_flow_struct *flow, struct ndpi_tcphdr const * tcph);
|
||||
|
||||
extern u_int8_t ndpi_ends_with(char *str, char *ends);
|
||||
|
||||
#endif // NDPI_CFFI_PREPROCESSING
|
||||
/* **************************************** */
|
||||
|
||||
/* Can't call libc functions from kernel space, define some stub instead */
|
||||
|
||||
#define ndpi_isalpha(ch) (((ch) >= 'a' && (ch) <= 'z') || ((ch) >= 'A' && (ch) <= 'Z'))
|
||||
#define ndpi_isdigit(ch) ((ch) >= '0' && (ch) <= '9')
|
||||
#define ndpi_isalnum(ch) (ndpi_isalpha(ch) != 0 || ndpi_isdigit(ch) != 0)
|
||||
#define ndpi_isspace(ch) (((ch) >= '\t' && (ch) <= '\r') || ((ch) == ' '))
|
||||
#define ndpi_isprint(ch) ((ch) >= 0x20 && (ch) <= 0x7e)
|
||||
#define ndpi_ispunct(ch) (((ch) >= '!' && (ch) <= '/') || \
|
||||
@@ -31,4 +54,9 @@ extern u_int8_t ndpi_ends_with(char *str, char *ends);
|
||||
((ch) >= '[' && (ch) <= '`') || \
|
||||
((ch) >= '{' && (ch) <= '~'))
|
||||
|
||||
#ifndef NDPI_CFFI_PREPROCESSING
|
||||
int ndpi_vsnprintf(char * str, size_t size, char const * format, va_list va_args);
|
||||
int ndpi_snprintf(char * str, size_t size, char const * format, ...);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* ndpi_win32.h
|
||||
*
|
||||
* Copyright (C) 2011-16 - ntop.org
|
||||
* Copyright (C) 2011-22 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
@@ -47,18 +47,8 @@
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
#define _WS2TCPIP_H_ /* Avoid compilation problems */
|
||||
|
||||
#define IPVERSION 4 /* on *nix it is defined in netinet/ip.h */
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(X, Y) (((X) < (Y)) ? (X) : (Y))
|
||||
#endif
|
||||
|
||||
#ifndef IPPROTO_SCTP
|
||||
#define IPPROTO_SCTP 132
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__) || defined(__MINGW64__)
|
||||
#undef gettimeofday
|
||||
#define gettimeofday mingw_gettimeofday
|
||||
@@ -82,4 +72,7 @@ typedef unsigned __int64 u_int64_t;
|
||||
|
||||
#define sleep(a /* sec */) Sleep(1000*a /* ms */)
|
||||
|
||||
/* https://stackoverflow.com/questions/7993050/multiplatform-atomic-increment */
|
||||
#define __sync_fetch_and_add(a,b) InterlockedExchangeAdd ((a), b)
|
||||
|
||||
#endif /* __NDPI_WIN32_H__ */
|
||||
|
||||
+22
-5
@@ -14,9 +14,12 @@ RANLIB = @RANLIB@
|
||||
prefix = @prefix@
|
||||
libdir = ${prefix}/lib
|
||||
includedir = ${prefix}/include/ndpi
|
||||
CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION @CFLAGS@ @CUSTOM_NDPI@
|
||||
ifneq ($(OS),Windows_NT)
|
||||
CFLAGS += -fPIC -DPIC
|
||||
endif
|
||||
CFLAGS += -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION @CFLAGS@ @GPROF_CFLAGS@ @CUSTOM_NDPI@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @ADDITIONAL_LIBS@ @LIBS@
|
||||
LIBS = @ADDITIONAL_LIBS@ @LIBS@ @GPROF_LIBS@
|
||||
|
||||
OBJECTS = $(patsubst protocols/%.c, protocols/%.o, $(wildcard protocols/*.c)) $(patsubst third_party/src/%.c, third_party/src/%.o, $(wildcard third_party/src/*.c)) $(patsubst ./%.c, ./%.o, $(wildcard ./*.c))
|
||||
HEADERS = $(wildcard ../include/*.h)
|
||||
@@ -25,6 +28,12 @@ NDPI_LIB_STATIC = libndpi.a
|
||||
NDPI_LIB_SHARED_BASE = libndpi.so
|
||||
NDPI_LIB_SHARED = $(NDPI_LIB_SHARED_BASE).@NDPI_VERSION_SHORT@
|
||||
NDPI_LIBS = $(NDPI_LIB_STATIC) $(NDPI_LIB_SHARED)
|
||||
USE_HOST_LIBGCRYPT = @USE_HOST_LIBGCRYPT@
|
||||
|
||||
ifneq ($(USE_HOST_LIBGCRYPT),0)
|
||||
TMP_OBJS := $(OBJECTS)
|
||||
OBJECTS = $(filter-out third_party/src/gcrypt_light.o,$(TMP_OBJS))
|
||||
endif
|
||||
|
||||
ifneq ($(OS),Windows_NT)
|
||||
OS := $(shell uname)
|
||||
@@ -63,14 +72,22 @@ clean:
|
||||
/bin/rm -f $(NDPI_LIB_STATIC) $(OBJECTS) *.o *.so *.lo libndpi.so*
|
||||
|
||||
distdir:
|
||||
cp ndpi_content_match.c.inc '$(distdir)/'
|
||||
find . -type d | xargs -I'{}' mkdir -p '$(distdir)/{}'
|
||||
find ../include -type f -name '*.h' | xargs -I'{}' cp '{}' '$(distdir)/{}'
|
||||
find . -type f -name '*.c' -o -name '*.h' | xargs -I'{}' cp '{}' '$(distdir)/{}'
|
||||
find ../include -type f -name '*.h' \
|
||||
-a '!' -name 'ndpi_api.h' \
|
||||
-a '!' -name 'ndpi_config.h' \
|
||||
-a '!' -name 'ndpi_define.h' | xargs -I'{}' cp '{}' '$(distdir)/{}'
|
||||
find . -type f -name '*.c' \
|
||||
-o -name '*.cc' \
|
||||
-o -name '*.c.inc' \
|
||||
-o -name '*.h' | xargs -I'{}' cp '{}' '$(distdir)/{}'
|
||||
|
||||
distclean: clean
|
||||
/bin/rm -f Makefile
|
||||
|
||||
check:
|
||||
true # nothing to do here
|
||||
|
||||
cppcheck:
|
||||
cppcheck --template='{file}:{line}:{severity}:{message}' --quiet --enable=all --force -I ../include *.c protocols/*.c
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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 }
|
||||
};
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
*
|
||||
* 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_bloomberg_protocol_list[] = {
|
||||
{ 0x3F580300 /* 63.88.3.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x4173E200 /* 65.115.226.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BB1000 /* 69.187.16.0/21 */, 21, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BB1800 /* 69.187.24.0/22 */, 22, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BB1D00 /* 69.187.29.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BB1F00 /* 69.187.31.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BB2000 /* 69.187.32.0/23 */, 23, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BB4900 /* 69.187.73.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BF5000 /* 69.191.80.0/21 */, 21, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BF8800 /* 69.191.136.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFB000 /* 69.191.176.0/21 */, 21, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFB800 /* 69.191.184.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFBA00 /* 69.191.186.0/23 */, 23, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFBC00 /* 69.191.188.0/22 */, 22, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFC000 /* 69.191.192.0/22 */, 22, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFC600 /* 69.191.198.0/23 */, 23, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFC800 /* 69.191.200.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFCA00 /* 69.191.202.0/23 */, 23, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFCC00 /* 69.191.204.0/22 */, 22, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFD000 /* 69.191.208.0/22 */, 22, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFD400 /* 69.191.212.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFD600 /* 69.191.214.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFD800 /* 69.191.216.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFDA00 /* 69.191.218.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFDC00 /* 69.191.220.0/23 */, 23, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFE200 /* 69.191.226.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFE500 /* 69.191.229.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFE600 /* 69.191.230.0/23 */, 23, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFE900 /* 69.191.233.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFEA00 /* 69.191.234.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFED00 /* 69.191.237.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFEE00 /* 69.191.238.0/23 */, 23, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x45BFF000 /* 69.191.240.0/20 */, 20, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0x67FBCC00 /* 103.251.204.0/22 */, 22, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0xA02BFA00 /* 160.43.250.0/23 */, 23, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0xA02BFD00 /* 160.43.253.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0xB90A7400 /* 185.10.116.0/23 */, 23, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0xC7ACA900 /* 199.172.169.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0xCCB3F000 /* 204.179.240.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0xCDD87000 /* 205.216.112.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0xCE9C3500 /* 206.156.53.0/24 */, 24, NDPI_PROTOCOL_BLOOMBERG },
|
||||
{ 0xD0163800 /* 208.22.56.0/23 */, 23, NDPI_PROTOCOL_BLOOMBERG },
|
||||
/* End */
|
||||
{ 0x0, 0, 0 }
|
||||
};
|
||||
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
*
|
||||
* 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_citrix_protocol_list[] = {
|
||||
{ 0x17EFE300 /* 23.239.227.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x404A1100 /* 64.74.17.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x404A1200 /* 64.74.18.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x405F8000 /* 64.95.128.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x43D94400 /* 67.217.68.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x43D94600 /* 67.217.70.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x43D94800 /* 67.217.72.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x43D94B00 /* 67.217.75.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x43D94C00 /* 67.217.76.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x43D94E00 /* 67.217.78.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x43D95000 /* 67.217.80.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x43D95200 /* 67.217.82.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x43D95400 /* 67.217.84.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x43D95600 /* 67.217.86.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x43D95800 /* 67.217.88.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x43D95A00 /* 67.217.90.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x43D95C00 /* 67.217.92.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x43D95E00 /* 67.217.94.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x44400000 /* 68.64.0.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x44400800 /* 68.64.8.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x44400A00 /* 68.64.10.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x44400C00 /* 68.64.12.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x44400E00 /* 68.64.14.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x44401100 /* 68.64.17.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x44401200 /* 68.64.18.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x44401400 /* 68.64.20.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x44401600 /* 68.64.22.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x44401800 /* 68.64.24.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x44401B00 /* 68.64.27.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x44401C00 /* 68.64.28.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x44401E00 /* 68.64.30.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x4E6C7400 /* 78.108.116.0/22 */, 22, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x4E6C7800 /* 78.108.120.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x4E6C7E00 /* 78.108.126.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0x5FAC4600 /* 95.172.70.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xADC70000 /* 173.199.0.0/21 */, 21, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xADC70C00 /* 173.199.12.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xADC70F00 /* 173.199.15.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xADC71100 /* 173.199.17.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xADC71200 /* 173.199.18.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xADC71400 /* 173.199.20.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xADC71700 /* 173.199.23.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xADC71A00 /* 173.199.26.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xADC71E00 /* 173.199.30.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xADC72000 /* 173.199.32.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xADC72B00 /* 173.199.43.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xADC72C00 /* 173.199.44.0/22 */, 22, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xADC73200 /* 173.199.50.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xADC73400 /* 173.199.52.0/22 */, 22, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xADC73C00 /* 173.199.60.0/22 */, 22, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xBC422B00 /* 188.66.43.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xCAAD1900 /* 202.173.25.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xCEB76400 /* 206.183.100.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xD873D000 /* 216.115.208.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xD873D200 /* 216.115.210.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xD873D500 /* 216.115.213.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xD873D600 /* 216.115.214.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xD873D900 /* 216.115.217.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xD873DA00 /* 216.115.218.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xD873DD00 /* 216.115.221.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xD873DE00 /* 216.115.222.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xD8DB7200 /* 216.219.114.0/23 */, 23, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xD8DB7400 /* 216.219.116.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xD8DB7700 /* 216.219.119.0/24 */, 24, NDPI_PROTOCOL_CITRIX },
|
||||
{ 0xD8DB7800 /* 216.219.120.0/22 */, 22, NDPI_PROTOCOL_CITRIX },
|
||||
/* End */
|
||||
{ 0x0, 0, 0 }
|
||||
};
|
||||
@@ -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_dropbox_protocol_list[] = {
|
||||
{ 0x2D3A4000 /* 45.58.64.0/20 */, 20, NDPI_PROTOCOL_DROPBOX },
|
||||
{ 0x40700D00 /* 64.112.13.0/24 */, 24, NDPI_PROTOCOL_DROPBOX },
|
||||
{ 0x6CA0A000 /* 108.160.160.0/20 */, 20, NDPI_PROTOCOL_DROPBOX },
|
||||
{ 0xA27D0000 /* 162.125.0.0/16 */, 16, NDPI_PROTOCOL_DROPBOX },
|
||||
{ 0xB92D0800 /* 185.45.8.0/22 */, 22, NDPI_PROTOCOL_DROPBOX },
|
||||
{ 0xB969A400 /* 185.105.164.0/24 */, 24, NDPI_PROTOCOL_DROPBOX },
|
||||
{ 0xC0BDC800 /* 192.189.200.0/23 */, 23, NDPI_PROTOCOL_DROPBOX },
|
||||
/* End */
|
||||
{ 0x0, 0, 0 }
|
||||
};
|
||||
@@ -0,0 +1,183 @@
|
||||
/*
|
||||
*
|
||||
* 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_edgecast_protocol_list[] = {
|
||||
{ 0x05684000 /* 5.104.64.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x05684200 /* 5.104.66.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x05684400 /* 5.104.68.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x2E164200 /* 46.22.66.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x2E164400 /* 46.22.68.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x2E164700 /* 46.22.71.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x2E164A00 /* 46.22.74.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x31E77E00 /* 49.231.126.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x400C0000 /* 64.12.0.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x400C1000 /* 64.12.16.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x400C2000 /* 64.12.32.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x400C3000 /* 64.12.48.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x400C4000 /* 64.12.64.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x400C4400 /* 64.12.68.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x400C4700 /* 64.12.71.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x400C4800 /* 64.12.72.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x400C8000 /* 64.12.128.0/19 */, 19, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x400CA000 /* 64.12.160.0/20 */, 20, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x400CB000 /* 64.12.176.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x400CB400 /* 64.12.180.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x400CFF00 /* 64.12.255.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x44E82000 /* 68.232.32.0/21 */, 21, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x44E82800 /* 68.232.40.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x44E82A00 /* 68.232.42.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x44E82C00 /* 68.232.44.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x48155000 /* 72.21.80.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x48155400 /* 72.21.84.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x48155B00 /* 72.21.91.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x48155C00 /* 72.21.92.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x48155E00 /* 72.21.94.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x5DB8D700 /* 93.184.215.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x5DB8D800 /* 93.184.216.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x5DB8DA00 /* 93.184.218.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x5DB8DC00 /* 93.184.220.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x6CA1F000 /* 108.161.240.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x6CA1F500 /* 108.161.245.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x6CA1F700 /* 108.161.247.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x6CA1FD00 /* 108.161.253.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x6CA1FE00 /* 108.161.254.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x6EA42400 /* 110.164.36.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x6EE8B000 /* 110.232.176.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x6EE8B200 /* 110.232.178.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x7512E800 /* 117.18.232.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x7512ED00 /* 117.18.237.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x7512EE00 /* 117.18.238.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x772E5500 /* 119.46.85.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x88E49000 /* 136.228.144.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C30400 /* 152.195.4.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C30600 /* 152.195.6.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C30800 /* 152.195.8.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C30B00 /* 152.195.11.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C30C00 /* 152.195.12.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C31000 /* 152.195.16.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C31500 /* 152.195.21.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C31600 /* 152.195.22.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C31900 /* 152.195.25.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C31A00 /* 152.195.26.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C31C00 /* 152.195.28.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C32000 /* 152.195.32.0/21 */, 21, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C33200 /* 152.195.50.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C33400 /* 152.195.52.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C33800 /* 152.195.56.0/21 */, 21, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C34000 /* 152.195.64.0/18 */, 18, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C38000 /* 152.195.128.0/20 */, 20, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C39000 /* 152.195.144.0/21 */, 21, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C39800 /* 152.195.152.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C39C00 /* 152.195.156.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C3A400 /* 152.195.164.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C3A600 /* 152.195.166.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C3B300 /* 152.195.179.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C3B500 /* 152.195.181.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C3B600 /* 152.195.182.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C3B800 /* 152.195.184.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C3BA00 /* 152.195.186.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C3BC00 /* 152.195.188.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C3C400 /* 152.195.196.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C3CA00 /* 152.195.202.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C3CC00 /* 152.195.204.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C3D000 /* 152.195.208.0/21 */, 21, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C3DB00 /* 152.195.219.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C3DC00 /* 152.195.220.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C3DF00 /* 152.195.223.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C3E000 /* 152.195.224.0/19 */, 19, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C70000 /* 152.199.0.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C70400 /* 152.199.4.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C70600 /* 152.199.6.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C71000 /* 152.199.16.0/21 */, 21, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C71800 /* 152.199.24.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C72000 /* 152.199.32.0/21 */, 21, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C72800 /* 152.199.40.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C72C00 /* 152.199.44.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C73000 /* 152.199.48.0/21 */, 21, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C73800 /* 152.199.56.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C75A00 /* 152.199.90.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C75C00 /* 152.199.92.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C76000 /* 152.199.96.0/19 */, 19, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C79200 /* 152.199.146.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C79B00 /* 152.199.155.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0x98C7BF00 /* 152.199.191.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0100100 /* 192.16.1.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0100200 /* 192.16.2.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0100600 /* 192.16.6.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0100E00 /* 192.16.14.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0101000 /* 192.16.16.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0101200 /* 192.16.18.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0101800 /* 192.16.24.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0102000 /* 192.16.32.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0102400 /* 192.16.36.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0102600 /* 192.16.38.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0102A00 /* 192.16.42.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0102E00 /* 192.16.46.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0103000 /* 192.16.48.0/21 */, 21, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0103A00 /* 192.16.58.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0103C00 /* 192.16.60.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0103F00 /* 192.16.63.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC01E1800 /* 192.30.24.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E58000 /* 192.229.128.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E58200 /* 192.229.130.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E58400 /* 192.229.132.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E58800 /* 192.229.136.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E58C00 /* 192.229.140.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E58E00 /* 192.229.142.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E59000 /* 192.229.144.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E59500 /* 192.229.149.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E59600 /* 192.229.150.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E59800 /* 192.229.152.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E59C00 /* 192.229.156.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5A200 /* 192.229.162.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5A900 /* 192.229.169.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5AA00 /* 192.229.170.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5AD00 /* 192.229.173.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5B200 /* 192.229.178.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5B600 /* 192.229.182.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5BB00 /* 192.229.187.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5BC00 /* 192.229.188.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5BE00 /* 192.229.190.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5C200 /* 192.229.194.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5C600 /* 192.229.198.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5CA00 /* 192.229.202.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5D000 /* 192.229.208.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5D500 /* 192.229.213.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5DA00 /* 192.229.218.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5DC00 /* 192.229.220.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5E000 /* 192.229.224.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5E300 /* 192.229.227.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5E400 /* 192.229.228.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5E700 /* 192.229.231.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5E800 /* 192.229.232.0/23 */, 23, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5EA00 /* 192.229.234.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5EC00 /* 192.229.236.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC0E5F000 /* 192.229.240.0/20 */, 20, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC6071000 /* 198.7.16.0/22 */, 22, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC6071400 /* 198.7.20.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC6071600 /* 198.7.22.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC6071B00 /* 198.7.27.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xC6071D00 /* 198.7.29.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
{ 0xD5AF5000 /* 213.175.80.0/24 */, 24, NDPI_PROTOCOL_EDGECAST },
|
||||
/* End */
|
||||
{ 0x0, 0, 0 }
|
||||
};
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
*
|
||||
* 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 },
|
||||
{ 0x8186A800 /* 129.134.168.0/22 */, 22, NDPI_PROTOCOL_FACEBOOK },
|
||||
{ 0x8186AC00 /* 129.134.172.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
|
||||
{ 0x9DF00000 /* 157.240.0.0/17 */, 17, NDPI_PROTOCOL_FACEBOOK },
|
||||
{ 0x9DF08000 /* 157.240.128.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
|
||||
{ 0x9DF09C00 /* 157.240.156.0/24 */, 24, NDPI_PROTOCOL_FACEBOOK },
|
||||
{ 0x9DF09F00 /* 157.240.159.0/24 */, 24, 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/23 */, 23, NDPI_PROTOCOL_FACEBOOK },
|
||||
{ 0x9DF0B300 /* 157.240.179.0/24 */, 24, 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 }
|
||||
};
|
||||
+9
-9
@@ -1,9 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (C) 2011-18 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
* 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
|
||||
@@ -20,10 +17,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface AppDelegate : NSObject <NSApplicationDelegate>
|
||||
/* ****************************************************** */
|
||||
|
||||
|
||||
@end
|
||||
|
||||
static ndpi_network ndpi_protocol_github_protocol_list[] = {
|
||||
{ 0x8C527000 /* 140.82.112.0/20 */, 20, NDPI_PROTOCOL_GITHUB },
|
||||
{ 0x8F374000 /* 143.55.64.0/20 */, 20, NDPI_PROTOCOL_GITHUB },
|
||||
{ 0xC01EFC00 /* 192.30.252.0/22 */, 22, NDPI_PROTOCOL_GITHUB },
|
||||
/* End */
|
||||
{ 0x0, 0, 0 }
|
||||
};
|
||||
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
*
|
||||
* 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_goto_protocol_list[] = {
|
||||
{ 0x17EFE300 /* 23.239.227.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x404A1100 /* 64.74.17.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x404A1200 /* 64.74.18.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x405F8000 /* 64.95.128.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x43D94400 /* 67.217.68.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x43D94600 /* 67.217.70.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x43D94800 /* 67.217.72.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x43D94B00 /* 67.217.75.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x43D94C00 /* 67.217.76.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x43D94E00 /* 67.217.78.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x43D95000 /* 67.217.80.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x43D95200 /* 67.217.82.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x43D95400 /* 67.217.84.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x43D95600 /* 67.217.86.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x43D95800 /* 67.217.88.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x43D95A00 /* 67.217.90.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x43D95C00 /* 67.217.92.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x43D95E00 /* 67.217.94.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x44400000 /* 68.64.0.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x44400800 /* 68.64.8.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x44400A00 /* 68.64.10.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x44400C00 /* 68.64.12.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x44400E00 /* 68.64.14.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x44401100 /* 68.64.17.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x44401200 /* 68.64.18.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x44401400 /* 68.64.20.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x44401600 /* 68.64.22.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x44401800 /* 68.64.24.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x44401B00 /* 68.64.27.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x44401C00 /* 68.64.28.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x44401E00 /* 68.64.30.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x4E6C7400 /* 78.108.116.0/22 */, 22, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x4E6C7800 /* 78.108.120.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x4E6C7E00 /* 78.108.126.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0x5FAC4600 /* 95.172.70.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xADC70000 /* 173.199.0.0/21 */, 21, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xADC70C00 /* 173.199.12.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xADC70F00 /* 173.199.15.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xADC71100 /* 173.199.17.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xADC71200 /* 173.199.18.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xADC71400 /* 173.199.20.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xADC71700 /* 173.199.23.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xADC71A00 /* 173.199.26.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xADC71E00 /* 173.199.30.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xADC72000 /* 173.199.32.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xADC72B00 /* 173.199.43.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xADC72C00 /* 173.199.44.0/22 */, 22, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xADC73200 /* 173.199.50.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xADC73400 /* 173.199.52.0/22 */, 22, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xADC73C00 /* 173.199.60.0/22 */, 22, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xBC422B00 /* 188.66.43.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xCAAD1900 /* 202.173.25.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xCEB76400 /* 206.183.100.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xD873D000 /* 216.115.208.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xD873D200 /* 216.115.210.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xD873D500 /* 216.115.213.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xD873D600 /* 216.115.214.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xD873D900 /* 216.115.217.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xD873DA00 /* 216.115.218.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xD873DD00 /* 216.115.221.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xD873DE00 /* 216.115.222.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xD8DB7200 /* 216.219.114.0/23 */, 23, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xD8DB7400 /* 216.219.116.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xD8DB7700 /* 216.219.119.0/24 */, 24, NDPI_PROTOCOL_GOTO },
|
||||
{ 0xD8DB7800 /* 216.219.120.0/22 */, 22, NDPI_PROTOCOL_GOTO },
|
||||
/* End */
|
||||
{ 0x0, 0, 0 }
|
||||
};
|
||||
+6
-9
@@ -1,9 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (C) 2011-18 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
* 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
|
||||
@@ -20,10 +17,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface ViewController : NSViewController
|
||||
/* ****************************************************** */
|
||||
|
||||
|
||||
@end
|
||||
|
||||
static ndpi_network ndpi_protocol_hotspot_shield_protocol_list[] = {
|
||||
/* End */
|
||||
{ 0x0, 0, 0 }
|
||||
};
|
||||
@@ -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 }
|
||||
};
|
||||
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
*
|
||||
* 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_opendns_protocol_list[] = {
|
||||
{ 0x43D74000 /* 67.215.64.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x43D74200 /* 67.215.66.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x43D74400 /* 67.215.68.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x43D74600 /* 67.215.70.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x43D74900 /* 67.215.73.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x43D74B00 /* 67.215.75.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x43D74C00 /* 67.215.76.0/22 */, 22, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x43D75000 /* 67.215.80.0/22 */, 22, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x43D75400 /* 67.215.84.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x43D75600 /* 67.215.86.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x43D75800 /* 67.215.88.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x43D75A00 /* 67.215.90.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x43D75C00 /* 67.215.92.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x43D75E00 /* 67.215.94.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92700000 /* 146.112.0.0/21 */, 21, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92700800 /* 146.112.8.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92700B00 /* 146.112.11.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92700C00 /* 146.112.12.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92700E00 /* 146.112.14.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92701000 /* 146.112.16.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92701200 /* 146.112.18.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92701400 /* 146.112.20.0/22 */, 22, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92701800 /* 146.112.24.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92701A00 /* 146.112.26.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92701C00 /* 146.112.28.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92701F00 /* 146.112.31.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92702100 /* 146.112.33.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92702200 /* 146.112.34.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92702400 /* 146.112.36.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92702600 /* 146.112.38.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92702800 /* 146.112.40.0/21 */, 21, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92703000 /* 146.112.48.0/20 */, 20, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92704000 /* 146.112.64.0/22 */, 22, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92704800 /* 146.112.72.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92704E00 /* 146.112.78.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92705000 /* 146.112.80.0/20 */, 20, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92706000 /* 146.112.96.0/20 */, 20, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92707000 /* 146.112.112.0/21 */, 21, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x92708000 /* 146.112.128.0/19 */, 19, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9270A000 /* 146.112.160.0/20 */, 20, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9270B000 /* 146.112.176.0/22 */, 22, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9270B800 /* 146.112.184.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9270BA00 /* 146.112.186.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9270BE00 /* 146.112.190.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9270C000 /* 146.112.192.0/21 */, 21, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9270C800 /* 146.112.200.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9270CB00 /* 146.112.203.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9270CC00 /* 146.112.204.0/22 */, 22, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9270D000 /* 146.112.208.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9270D200 /* 146.112.210.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9270D400 /* 146.112.212.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9270D600 /* 146.112.214.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9270D800 /* 146.112.216.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9270DB00 /* 146.112.219.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9270DD00 /* 146.112.221.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9270DE00 /* 146.112.222.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9270E000 /* 146.112.224.0/19 */, 19, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE0000 /* 155.190.0.0/22 */, 22, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE0800 /* 155.190.8.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE0F00 /* 155.190.15.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE1100 /* 155.190.17.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE1200 /* 155.190.18.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE1400 /* 155.190.20.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE1C00 /* 155.190.28.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE2100 /* 155.190.33.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE2200 /* 155.190.34.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE2400 /* 155.190.36.0/22 */, 22, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE2A00 /* 155.190.42.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE2C00 /* 155.190.44.0/22 */, 22, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE3000 /* 155.190.48.0/22 */, 22, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE3500 /* 155.190.53.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE3600 /* 155.190.54.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE4200 /* 155.190.66.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE4400 /* 155.190.68.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE4600 /* 155.190.70.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE5300 /* 155.190.83.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE7400 /* 155.190.116.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE8000 /* 155.190.128.0/21 */, 21, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE8900 /* 155.190.137.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE8A00 /* 155.190.138.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE8C00 /* 155.190.140.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBE8F00 /* 155.190.143.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBEA000 /* 155.190.160.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBEC000 /* 155.190.192.0/21 */, 21, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBEC800 /* 155.190.200.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBECA00 /* 155.190.202.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBECC00 /* 155.190.204.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBECE00 /* 155.190.206.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBED000 /* 155.190.208.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBED700 /* 155.190.215.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBEF800 /* 155.190.248.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBEFA00 /* 155.190.250.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0x9BBEFE00 /* 155.190.254.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0xB93C5400 /* 185.60.84.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0xB93C5600 /* 185.60.86.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0xCCC2E800 /* 204.194.232.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0xCCC2EA00 /* 204.194.234.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0xCCC2ED00 /* 204.194.237.0/24 */, 24, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0xCCC2EE00 /* 204.194.238.0/23 */, 23, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0xD043D800 /* 208.67.216.0/21 */, 21, NDPI_PROTOCOL_OPENDNS },
|
||||
{ 0xD0452000 /* 208.69.32.0/21 */, 21, NDPI_PROTOCOL_OPENDNS },
|
||||
/* End */
|
||||
{ 0x0, 0, 0 }
|
||||
};
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
*
|
||||
* 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_starcraft_protocol_list[] = {
|
||||
{ 0x052AA800 /* 5.42.168.0/21 */, 21, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x052AB000 /* 5.42.176.0/20 */, 20, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x18690000 /* 24.105.0.0/18 */, 18, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x25F40000 /* 37.244.0.0/19 */, 19, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x25F42000 /* 37.244.32.0/20 */, 20, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x25F43000 /* 37.244.48.0/23 */, 23, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x25F43200 /* 37.244.50.0/24 */, 24, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x25F43400 /* 37.244.52.0/22 */, 22, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x25F43800 /* 37.244.56.0/21 */, 21, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x3B992800 /* 59.153.40.0/23 */, 23, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x67C62000 /* 103.198.32.0/23 */, 23, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x6E2DD000 /* 110.45.208.0/24 */, 24, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x75340600 /* 117.52.6.0/24 */, 24, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x75341A00 /* 117.52.26.0/23 */, 23, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x75341C00 /* 117.52.28.0/23 */, 23, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x75342100 /* 117.52.33.0/24 */, 24, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x75342200 /* 117.52.34.0/23 */, 23, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x75342400 /* 117.52.36.0/23 */, 23, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x79FE8900 /* 121.254.137.0/24 */, 24, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x79FECE00 /* 121.254.206.0/23 */, 23, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x79FEDA00 /* 121.254.218.0/24 */, 24, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x89DD4000 /* 137.221.64.0/19 */, 19, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x89DD6000 /* 137.221.96.0/21 */, 21, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x89DD6800 /* 137.221.104.0/22 */, 22, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x89DD6C00 /* 137.221.108.0/23 */, 23, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x89DD6E00 /* 137.221.110.0/24 */, 24, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x9E73C000 /* 158.115.192.0/20 */, 20, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0x9E73D800 /* 158.115.216.0/21 */, 21, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0xB6A21F00 /* 182.162.31.0/24 */, 24, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0xB93C7000 /* 185.60.112.0/22 */, 22, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0xC64A2000 /* 198.74.32.0/22 */, 22, NDPI_PROTOCOL_STARCRAFT },
|
||||
{ 0xC64A2400 /* 198.74.36.0/23 */, 23, NDPI_PROTOCOL_STARCRAFT },
|
||||
/* End */
|
||||
{ 0x0, 0, 0 }
|
||||
};
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
*
|
||||
* 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_steam_protocol_list[] = {
|
||||
{ 0x670A7C00 /* 103.10.124.0/23 */, 23, NDPI_PROTOCOL_STEAM },
|
||||
{ 0x671C3600 /* 103.28.54.0/24 */, 24, NDPI_PROTOCOL_STEAM },
|
||||
{ 0x92429800 /* 146.66.152.0/24 */, 24, NDPI_PROTOCOL_STEAM },
|
||||
{ 0x92429B00 /* 146.66.155.0/24 */, 24, NDPI_PROTOCOL_STEAM },
|
||||
{ 0x99FE5600 /* 153.254.86.0/24 */, 24, NDPI_PROTOCOL_STEAM },
|
||||
{ 0x9B85E000 /* 155.133.224.0/22 */, 22, NDPI_PROTOCOL_STEAM },
|
||||
{ 0x9B85E600 /* 155.133.230.0/24 */, 24, NDPI_PROTOCOL_STEAM },
|
||||
{ 0x9B85E800 /* 155.133.232.0/23 */, 23, NDPI_PROTOCOL_STEAM },
|
||||
{ 0x9B85EA00 /* 155.133.234.0/24 */, 24, NDPI_PROTOCOL_STEAM },
|
||||
{ 0x9B85EC00 /* 155.133.236.0/22 */, 22, NDPI_PROTOCOL_STEAM },
|
||||
{ 0x9B85F000 /* 155.133.240.0/23 */, 23, NDPI_PROTOCOL_STEAM },
|
||||
{ 0x9B85F500 /* 155.133.245.0/24 */, 24, NDPI_PROTOCOL_STEAM },
|
||||
{ 0x9B85F600 /* 155.133.246.0/24 */, 24, NDPI_PROTOCOL_STEAM },
|
||||
{ 0x9B85F800 /* 155.133.248.0/21 */, 21, NDPI_PROTOCOL_STEAM },
|
||||
{ 0xA2FEC000 /* 162.254.192.0/21 */, 21, NDPI_PROTOCOL_STEAM },
|
||||
{ 0xB919B600 /* 185.25.182.0/23 */, 23, NDPI_PROTOCOL_STEAM },
|
||||
{ 0xBED92100 /* 190.217.33.0/24 */, 24, NDPI_PROTOCOL_STEAM },
|
||||
{ 0xC0456000 /* 192.69.96.0/22 */, 22, NDPI_PROTOCOL_STEAM },
|
||||
{ 0xCDB9C200 /* 205.185.194.0/24 */, 24, NDPI_PROTOCOL_STEAM },
|
||||
{ 0xCDC40600 /* 205.196.6.0/24 */, 24, NDPI_PROTOCOL_STEAM },
|
||||
{ 0xD040C800 /* 208.64.200.0/22 */, 22, NDPI_PROTOCOL_STEAM },
|
||||
{ 0xD04EA400 /* 208.78.164.0/22 */, 22, NDPI_PROTOCOL_STEAM },
|
||||
/* End */
|
||||
{ 0x0, 0, 0 }
|
||||
};
|
||||
@@ -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 }
|
||||
};
|
||||
@@ -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 }
|
||||
};
|
||||
@@ -0,0 +1,211 @@
|
||||
/*
|
||||
*
|
||||
* 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_tencent_protocol_list[] = {
|
||||
{ 0x010C0000 /* 1.12.0.0/14 */, 14, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x01740000 /* 1.116.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x01C9B800 /* 1.201.184.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x01C9BC00 /* 1.201.188.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2ABB8000 /* 42.187.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2AC00000 /* 42.192.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2AC28000 /* 42.194.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B800000 /* 43.128.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B820000 /* 43.130.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B830000 /* 43.131.0.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B838000 /* 43.131.128.0/19 */, 19, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B83C000 /* 43.131.192.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B840000 /* 43.132.0.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B844400 /* 43.132.68.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B844600 /* 43.132.70.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B845400 /* 43.132.84.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B845E00 /* 43.132.94.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B846000 /* 43.132.96.0/19 */, 19, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B848000 /* 43.132.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B850000 /* 43.133.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B860000 /* 43.134.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B870000 /* 43.135.0.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B878000 /* 43.135.128.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B87C000 /* 43.135.192.0/19 */, 19, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B880000 /* 43.136.0.0/13 */, 13, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B900000 /* 43.144.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B984000 /* 43.152.64.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B984200 /* 43.152.66.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B984400 /* 43.152.68.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B984800 /* 43.152.72.0/21 */, 21, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B985000 /* 43.152.80.0/20 */, 20, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B98C000 /* 43.152.192.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B990000 /* 43.153.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B9A0000 /* 43.154.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B9C0000 /* 43.156.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B9E0000 /* 43.158.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B9F0000 /* 43.159.0.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2B9F8000 /* 43.159.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2BAC0F00 /* 43.172.15.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2BBD6400 /* 43.189.100.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2BBE6F00 /* 43.190.111.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2BF2FC00 /* 43.242.252.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2BF7C400 /* 43.247.196.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2D28C000 /* 45.40.192.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2D714400 /* 45.113.68.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x2D927000 /* 45.146.112.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x31330000 /* 49.51.0.0/19 */, 19, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x31332000 /* 49.51.32.0/20 */, 20, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x31333000 /* 49.51.48.0/21 */, 21, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x31333E00 /* 49.51.62.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x31334000 /* 49.51.64.0/19 */, 19, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x31336000 /* 49.51.96.0/21 */, 21, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x31336800 /* 49.51.104.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x31336C00 /* 49.51.108.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x31338000 /* 49.51.128.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x3133C000 /* 49.51.192.0/19 */, 19, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x3133E000 /* 49.51.224.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x3133E400 /* 49.51.228.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x3133E800 /* 49.51.232.0/21 */, 21, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x3133F000 /* 49.51.240.0/20 */, 20, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x31E80000 /* 49.232.0.0/14 */, 14, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x3A574000 /* 58.87.64.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x3EEA0000 /* 62.234.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x51440000 /* 81.68.0.0/14 */, 14, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x529C0000 /* 82.156.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x5EBF0000 /* 94.191.0.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x65200000 /* 101.32.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x65210000 /* 101.33.0.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x65210400 /* 101.33.4.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x65210A00 /* 101.33.10.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x65210E00 /* 101.33.14.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x65211100 /* 101.33.17.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x65211200 /* 101.33.18.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x65211400 /* 101.33.20.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x65211A00 /* 101.33.26.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x65211E00 /* 101.33.30.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x65212000 /* 101.33.32.0/19 */, 19, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x65214000 /* 101.33.64.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x65218000 /* 101.33.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x65220000 /* 101.34.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x652A0000 /* 101.42.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x67071C00 /* 103.7.28.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x67267400 /* 103.38.116.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x6734D800 /* 103.52.216.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x67743200 /* 103.116.50.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x67EE1000 /* 103.238.16.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x6A340000 /* 106.52.0.0/14 */, 14, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x6DF40000 /* 109.244.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x6E288000 /* 110.40.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x6E2A8000 /* 110.42.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x6FE50000 /* 111.229.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x6FE60000 /* 111.230.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x72750000 /* 114.117.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x72840000 /* 114.132.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x739F0000 /* 115.159.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x76180000 /* 118.24.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x76590000 /* 118.89.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x767E4000 /* 118.126.64.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x76C38000 /* 118.195.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x771BA000 /* 119.27.160.0/19 */, 19, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x771C0000 /* 119.28.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x772D0000 /* 119.45.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x775B0000 /* 119.91.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x78350000 /* 120.53.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x78583800 /* 120.88.56.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x78E81400 /* 120.232.20.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x78F17F00 /* 120.241.127.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x78F18000 /* 120.241.128.0/21 */, 21, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x78F18800 /* 120.241.136.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x79040000 /* 121.4.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x79330000 /* 121.51.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x7A330000 /* 122.51.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x7A98C000 /* 122.152.192.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x7BCE0000 /* 123.206.0.0/15 */, 15, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x7C9C0000 /* 124.156.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x7CDC0000 /* 124.220.0.0/14 */, 14, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x806C0000 /* 128.108.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x811C0000 /* 129.28.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x81CC0000 /* 129.204.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x81D30000 /* 129.211.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x81E20000 /* 129.226.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x84E80000 /* 132.232.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x86AF0000 /* 134.175.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x8B9B0000 /* 139.155.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x8BBA0000 /* 139.186.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x8BC70000 /* 139.199.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x8C8F0000 /* 140.143.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x9238C000 /* 146.56.192.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x94460000 /* 148.70.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x966D0000 /* 150.109.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x969E0000 /* 150.158.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x98880000 /* 152.136.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x9A088000 /* 154.8.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x9CF05800 /* 156.240.88.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x9E4F0100 /* 158.79.1.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0x9F4B0000 /* 159.75.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xA20E0000 /* 162.14.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xA23E0000 /* 162.62.0.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xA23E8000 /* 162.62.128.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xA23EC000 /* 162.62.192.0/19 */, 19, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xA23EE000 /* 162.62.224.0/20 */, 20, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xAA6A0000 /* 170.106.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xAC51C000 /* 172.81.192.0/18 */, 18, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xAF180000 /* 175.24.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xAF1B0000 /* 175.27.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xAFB20000 /* 175.178.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xB6FE0000 /* 182.254.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xBC838000 /* 188.131.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xC0908000 /* 192.144.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xC1700000 /* 193.112.0.0/16 */, 16, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xCBC38000 /* 203.195.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xCBCD8000 /* 203.205.128.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xCBCD8600 /* 203.205.134.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xCBCD8800 /* 203.205.136.0/21 */, 21, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xCBCD9000 /* 203.205.144.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xCBCD9800 /* 203.205.152.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xCBCD9B00 /* 203.205.155.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xCBCD9C00 /* 203.205.156.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xCBCDBC00 /* 203.205.188.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xCBCDBF00 /* 203.205.191.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xCBCDC100 /* 203.205.193.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xCBCDC200 /* 203.205.194.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xCBCDC400 /* 203.205.196.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xCBCDDA00 /* 203.205.218.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xCBCDDC00 /* 203.205.220.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xCBCDE000 /* 203.205.224.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xCBCDE800 /* 203.205.232.0/21 */, 21, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xCBCDF000 /* 203.205.240.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xCBCDF200 /* 203.205.242.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xCBCDF800 /* 203.205.248.0/21 */, 21, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xD249A000 /* 210.73.160.0/19 */, 19, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xD2ABE800 /* 210.171.232.0/21 */, 21, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xD2B44A00 /* 210.180.74.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xD3385C00 /* 211.56.92.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xD3988000 /* 211.152.128.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xD3988400 /* 211.152.132.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xD3988A00 /* 211.152.138.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xD3989000 /* 211.152.144.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xD3989400 /* 211.152.148.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xD3989800 /* 211.152.152.0/22 */, 22, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xD3989C00 /* 211.152.156.0/24 */, 24, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xD3989E00 /* 211.152.158.0/23 */, 23, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xD39F8000 /* 211.159.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xD4400000 /* 212.64.0.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
|
||||
{ 0xD4818000 /* 212.129.128.0/17 */, 17, NDPI_PROTOCOL_TENCENT },
|
||||
/* End */
|
||||
{ 0x0, 0, 0 }
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
*
|
||||
* 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_twitch_protocol_list[] = {
|
||||
{ 0x17A00000 /* 23.160.0.0/24 */, 24, NDPI_PROTOCOL_TWITCH },
|
||||
{ 0x2D718000 /* 45.113.128.0/22 */, 22, NDPI_PROTOCOL_TWITCH },
|
||||
{ 0x34DFC000 /* 52.223.192.0/18 */, 18, NDPI_PROTOCOL_TWITCH },
|
||||
{ 0x63B54000 /* 99.181.64.0/18 */, 18, NDPI_PROTOCOL_TWITCH },
|
||||
{ 0x67353000 /* 103.53.48.0/23 */, 23, NDPI_PROTOCOL_TWITCH },
|
||||
{ 0xB92ACC00 /* 185.42.204.0/22 */, 22, NDPI_PROTOCOL_TWITCH },
|
||||
{ 0xC0104000 /* 192.16.64.0/21 */, 21, NDPI_PROTOCOL_TWITCH },
|
||||
{ 0xC06CEF00 /* 192.108.239.0/24 */, 24, NDPI_PROTOCOL_TWITCH },
|
||||
{ 0xC709F800 /* 199.9.248.0/21 */, 21, NDPI_PROTOCOL_TWITCH },
|
||||
/* End */
|
||||
{ 0x0, 0, 0 }
|
||||
};
|
||||
@@ -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 }
|
||||
};
|
||||
+10
-9
@@ -1,9 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (C) 2011-18 - ntop.org
|
||||
*
|
||||
* This file is part of nDPI, an open source deep packet inspection
|
||||
* library based on the OpenDPI and PACE technology by ipoque GmbH
|
||||
* 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
|
||||
@@ -20,10 +17,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ndpi_utils_h
|
||||
#define ndpi_utils_h
|
||||
/* ****************************************************** */
|
||||
|
||||
// Empty placeholder head file. Just to make the compilations of protocols/attic/ftp.c and
|
||||
// protocols/attic/secondlife.c don't break.
|
||||
|
||||
#endif /* ndpi_utils_h */
|
||||
static ndpi_network ndpi_protocol_ubuntuone_protocol_list[] = {
|
||||
{ 0x5BBD5800 /* 91.189.88.0/21 */, 21, NDPI_PROTOCOL_UBUNTUONE },
|
||||
{ 0xA2D52000 /* 162.213.32.0/22 */, 22, NDPI_PROTOCOL_UBUNTUONE },
|
||||
{ 0xB97DBC00 /* 185.125.188.0/22 */, 22, NDPI_PROTOCOL_UBUNTUONE },
|
||||
{ 0xC2A9FE00 /* 194.169.254.0/24 */, 24, NDPI_PROTOCOL_UBUNTUONE },
|
||||
/* End */
|
||||
{ 0x0, 0, 0 }
|
||||
};
|
||||
@@ -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 }
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
*
|
||||
* 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_cachefly_protocol_list[] = {
|
||||
{ 0xCDEAAF00 /* 205.234.175.0/24 */, 24, NDPI_PROTOCOL_CACHEFLY },
|
||||
{ 0xCC5D9600 /* 204.93.150.0/24 */, 24, NDPI_PROTOCOL_CACHEFLY },
|
||||
{ 0xCC5D8E00 /* 204.93.142.0/23 */, 23, NDPI_PROTOCOL_CACHEFLY },
|
||||
{ 0xA7589E00 /* 167.88.158.0/24 */, 24, NDPI_PROTOCOL_CACHEFLY },
|
||||
{ 0x42E1C500 /* 66.225.197.0/24 */, 24, NDPI_PROTOCOL_CACHEFLY },
|
||||
{ 0x2D588400 /* 45.88.132.0/22 */, 22, NDPI_PROTOCOL_CACHEFLY },
|
||||
{ 0x5250E0BE /* 82.80.224.190/32 */, 32, NDPI_PROTOCOL_CACHEFLY },
|
||||
{ 0xA747EE9F /* 167.71.238.159/32 */, 32, NDPI_PROTOCOL_CACHEFLY },
|
||||
{ 0x08F2E3F8 /* 8.242.227.248/29 */, 29, NDPI_PROTOCOL_CACHEFLY },
|
||||
/* End */
|
||||
{ 0x0, 0, 0 }
|
||||
};
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
*
|
||||
* 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_cloudflare_protocol_list[] = {
|
||||
{ 0xADF53000 /* 173.245.48.0/20 */, 20, NDPI_PROTOCOL_CLOUDFLARE },
|
||||
{ 0x6715F400 /* 103.21.244.0/22 */, 22, NDPI_PROTOCOL_CLOUDFLARE },
|
||||
{ 0x6716C800 /* 103.22.200.0/22 */, 22, NDPI_PROTOCOL_CLOUDFLARE },
|
||||
{ 0x671F0400 /* 103.31.4.0/22 */, 22, NDPI_PROTOCOL_CLOUDFLARE },
|
||||
{ 0x8D654000 /* 141.101.64.0/18 */, 18, NDPI_PROTOCOL_CLOUDFLARE },
|
||||
{ 0x6CA2C000 /* 108.162.192.0/18 */, 18, NDPI_PROTOCOL_CLOUDFLARE },
|
||||
{ 0xBE5DF000 /* 190.93.240.0/20 */, 20, NDPI_PROTOCOL_CLOUDFLARE },
|
||||
{ 0xBC726000 /* 188.114.96.0/20 */, 20, NDPI_PROTOCOL_CLOUDFLARE },
|
||||
{ 0xC5EAF000 /* 197.234.240.0/22 */, 22, NDPI_PROTOCOL_CLOUDFLARE },
|
||||
{ 0xC6298000 /* 198.41.128.0/17 */, 17, NDPI_PROTOCOL_CLOUDFLARE },
|
||||
{ 0xA29E0000 /* 162.158.0.0/15 */, 15, NDPI_PROTOCOL_CLOUDFLARE },
|
||||
{ 0x68100000 /* 104.16.0.0/13 */, 13, NDPI_PROTOCOL_CLOUDFLARE },
|
||||
{ 0x68180000 /* 104.24.0.0/14 */, 14, NDPI_PROTOCOL_CLOUDFLARE },
|
||||
{ 0xAC400000 /* 172.64.0.0/13 */, 13, NDPI_PROTOCOL_CLOUDFLARE },
|
||||
{ 0x83004800 /* 131.0.72.0/22 */, 22, NDPI_PROTOCOL_CLOUDFLARE },
|
||||
/* End */
|
||||
{ 0x0, 0, 0 }
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user