nDPId/examples
Toni Uhlig 8a8de12fb3
Keras AE supports loading/saving models.
* added training/batch size as cmdargs

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2023-07-22 09:25:11 +02:00
..
c-analysed py-machine-learning: Print CSV line numbers for invalid lines (SKLearn Random Forest Classificator). 2023-01-30 22:36:17 +01:00
c-captured Sync unit tests. 2022-11-13 16:19:07 +01:00
c-collectd bump libnDPI to 8ea0eaa0d0c4a3be05f67ef7fa1d22c2579cf7d1 2023-06-12 19:05:33 +02:00
c-json-stdout Build JSMN with support for parent links. 2021-07-13 03:35:35 +02:00
c-simple Improved: 2023-02-27 01:20:23 +01:00
cxx-graph@3491eafcd1 Added GLFW/OpenGL stats drawer written in C++. 2023-07-16 22:19:20 +02:00
js-rt-analyzer@87cb7a0af5 Updated js-rt-analyzer and js-rt-analyzer-frontend examples. 2023-04-21 16:51:58 +02:00
js-rt-analyzer-frontend@48860b23c9 Updated js-rt-analyzer and js-rt-analyzer-frontend examples. 2023-04-21 16:51:58 +02:00
py-flow-dashboard Bump werkzeug from 2.0 to 2.2.3 in /examples/py-flow-dashboard 2023-02-16 17:43:31 +01:00
py-flow-info Revert "Revert "Minor fixes."" 2023-01-27 12:48:20 +01:00
py-flow-muliprocess nDPId: Reduced flow-updates for TCP flows to 1/4 of the timeout value. 2022-09-19 19:39:49 +02:00
py-json-stdout nDPId: Reduced flow-updates for TCP flows to 1/4 of the timeout value. 2022-09-19 19:39:49 +02:00
py-machine-learning Keras AE supports loading/saving models. 2023-07-22 09:25:11 +02:00
py-schema-validation Added Keras based Autoencode (Work-in-Progress!) 2023-07-16 22:06:36 +02:00
py-semantic-validation nDPid: Fixed base64encode bug which lead to invalid base64 strings. 2023-01-09 01:43:24 +01:00
ndpid_install_and_run.gif Improve README 2022-08-12 11:10:45 +02:00
README.md Added GLFW/OpenGL stats drawer written in C++. 2023-07-16 22:19:20 +02:00

examples

Some ready-2-use/ready-2-extend examples/utils. All examples are prefixed with their used LANG.

c-analysed

A feature extractor useful for ML/DL use cases. It generates CSV files from flow "analyse" events. Used also by tests/run_tests.sh if available.

c-captured

A capture daemon suitable for low-resource devices. It saves flows that were guessed/undetected/risky/midstream to a PCAP file for manual analysis.

c-collectd

A collecd-exec compatible middleware that gathers statistic values from nDPId.

c-json-stdout

Tiny nDPId json dumper. Does not provide any useful funcationality besides dumping parsed JSON objects.

c-simple

Integration example that verifies flow timeouts on SIGUSR1.

cxx-graph

A standalone GLFW/OpenGL application that draws statistical data using ImWeb/ImPlot/ImGui.

js-rt-analyzer

nDPId-rt-analyzer

js-rt-analyzer-frontend

nDPId-rt-analyzer-frontend

py-flow-info

Console friendly, colorful, prettyfied event printer. Required by tests/run_tests.sh

py-machine-learning

Contains:

  1. Classification via Random Forests and SciLearn
  2. Anomaly Detection via Autoencoder and Keras (Work-In-Progress!)

Use sklearn together with CSVs created with c-analysed to train and predict DPI detections.

Try it with: ./examples/py-machine-learning/sklearn_random_forest.py --csv ./ndpi-analysed.csv --proto-class tls.youtube --proto-class tls.github --proto-class tls.spotify --proto-class tls.facebook --proto-class tls.instagram --proto-class tls.doh_dot --proto-class quic --proto-class icmp

This way you should get 9 different classification classes. You may notice that some classes e.g. TLS protocol classifications may have a higher false-negative rate. Unfortunately, I can not provide any datasets due to some privacy concerns.

But you can use a pre-trained model with --load-model.

py-flow-dashboard

A realtime web based graph using Plotly/Dash. Probably the most informative example.

py-flow-multiprocess

Simple Python Multiprocess example spawning two worker processes, one connecting to nDPIsrvd and one printing flow id's to STDOUT.

py-json-stdout

Dump received and parsed JSON objects.

py-schema-validation

Validate nDPId JSON strings against pre-defined JSON schema's. See schema/. Required by tests/run_tests.sh

py-semantic-validation

Validate nDPId JSON strings against internal event semantics. Required by tests/run_tests.sh