aboutsummaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAge
...
* Added nDPId semantic validation test.Toni Uhlig2021-04-14
| | | | | | | | | | | * fixed inconsistent processing of remaining flows during nDPId shutdown phase * fixed multiple `detected' flow events (instead only `detection-update' flow events can occur after a `detected' flow event) * fixed nDPIsrvd.py invalid message buffer handling * improved run_tests.sh so only valid pcap capture files are getting processed (and some more cosmetics + logging) Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Fixed nDPIsrvd.h flow end bug (flow end callback could never be called and ↵Toni Uhlig2021-04-11
| | | | | | caused some memory troubles). Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Added IPv6 support for -I / -E.Toni Uhlig2021-04-11
| | | | | | | * added another Python search path and try-catch ModuleNotFoundError again * run_tests.sh checks for OpenBSD netcat (required for -q) Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Added JSON schema validation to run_tests.shToni Uhlig2021-04-09
| | | | | | | * Python3 scripts are now compatible with versions <3.6 * improved and prettified run_tests.sh Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* nDPId-test: added JSON distribution + JSON parsing (Multithreaded design ↵Toni Uhlig2021-04-09
| | | | | | | | | | | | | | re-using most of nDPId/nDPIsrvd core) * improved Makefile.old install targets * splitted nDPIsrvd_parse into nDPIsrvd_parse_line and nDPIsrvd_parse_all for the sake of readability * minor Python script improvments (check for nDPIsrvd.py on multiple locations, may be superseeded by setuptools in the future) * some paths needs to be absolute (chdir() during daemonize) and therefor additional checks introduced * test run script checks and fails if certain files are are missing (PCAP file <=> result output file) * removed not very useful "internal format error" JSON serialization if a BUG for same exists * fixed invalid l4 type statistics counters for nDPIsrvd-collectd Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Updated README.mdToni Uhlig2021-03-24
| | | | | | * added examples/README.md and schema/README.md Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Switched to CMake build system.Toni Uhlig2021-03-17
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* nDPIsrvd collectd-exec overhaul.Toni Uhlig2021-03-15
| | | | | | | * Install targets updated. * Removed nDPIsrvd.h token validation function (done automatically by token_get). Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Fixed collectd-exec issues.Toni Uhlig2021-03-12
| | | | | | * Added collectd example config and types.db Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Added basic collectd-exec example.Toni Uhlig2021-03-10
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Fixed possible NULL pointer deref in dependencies/nDPIsrvd.h and ↵Toni Uhlig2021-02-28
| | | | | | | | | | examples/c-captured/c-captured.c * `make install` C examples * examples/py-flow-info/flow-info.py supports filtering * added breed to examples/py-flow-info/flow-info.py Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Added JA3 / SSL SHA1 fingerprint blacklists.Toni Uhlig2021-02-27
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Finalized examples/c-captured to dump packet bytes to PCAP for further analysis.Toni Uhlig2021-02-24
| | | | | | * Fixed memory holes in nDPId structs. Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Extended nDPIsrvd.h with address parsing.Toni Uhlig2021-02-23
| | | | | | | | | * nDPId supports looading of custom nDPI protocol/category files * extended JSON schemas according to nDPI / nDPId JSON serializing * removed memory holes in nDPId * extended examples/c-captured Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* C-Api uses similiar flow key hash calculation as Python-Api.Toni Uhlig2021-02-19
| | | | | | * Make use of flow id / alias / source which is required for future use cases where multiple nDPId instances (same / different machines) feed one nDPIsrvd. Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Added JSON schema files and a Python schema validator.Toni Uhlig2021-02-17
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Aligned nDPIsrvd.py to nDPIsrvd.h for consistency.Toni Uhlig2021-02-16
| | | | | | | | | * Simplified Python interface as well. * c-captured and flow-undetected-to-pcap.py produce similiar results * Removed overloaded nDPIsrvd.py event structures. * flow-info.py prints (with a color-hash) additional information e.g. alias/source and midstream Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Removed superfluous nDPI (header) dependency for examples/c-captured. Use ↵Toni Uhlig2021-02-06
| | | | | | header definitions from libc instead. Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* nDPIsrvd C API overhaul and massive simplification.Toni Uhlig2021-02-06
| | | | | | | | * nDPIsrvd.h does flow mgmt out of the box * dissect received JSON strings via callback * added new JSON key/values for packet-flows (usecTimestamp/L3/L4 info) Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Fixed braindead failure - Increase of NETWORK_BUFFER_MAX_SIZE > 9999 means ↵Toni Uhlig2021-01-27
| | | | | | | | | to also increase NETWORK_BUFFER_LENGTH_DIGITS to 5. * Fixed ARM32 xcompile warnings; Other GCC versions, other uint64_t's.. * Replaced ridiculous nDPIsrvd_JSON_BYTES with NETWORK_BUFFER_LENGTH_DIGITS. Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Increased JSON buffer size to 12288 (libnDPI serializes more and more ↵Toni Uhlig2021-01-27
| | | | | | | | | | | information). * Making Compare&Fetch mandatory. * Added some more Compare&Fetch to prevent TSAN complaining about data races. Fixed possible but more ore less harmless data races during shutdown process. * Shrink SIGNAL handler to a minimum. SYSV Signal handling and MT-safety is awkward. Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* All colors are beautiful for py-flow-info.Toni Uhlig2021-01-26
| | | | | | * instance alias is now mandatory (will be required for future use-cases) Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Finished (mostly) C guessed/undetected flow dumper.Toni Uhlig2021-01-26
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Added simple python json out example used for comparing JSON output.Toni Uhlig2021-01-20
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Declared nDPI id and flow structs in nDPId flow info struct.Toni Uhlig2020-12-30
| | | | | | | | Two reasons: * reduce heap memory allocations * nDPId flow info struct may be inflated in the future (more bytes to compress) Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Removed all LUA leftover as preparation for UTHASH.Toni Uhlig2020-12-01
| | | | | | * Added UNIX socket support for nDPIsrvd.h (and c-captured) Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Let travis use pcap files from nDPI to produce some JSON output. (disabled, ↵Toni Uhlig2020-12-01
| | | | | | | | | | | needs further testing..) * Added pcap diff script * Added \n to JSON string end (useful for debugging and readability) * Use first host/server name character for hash calculation as well * Removed error'ing EPOLLHUP handling in nDPIsrvd (connection closing will be detected via read()) Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Increased serialization buffer size as required for recent nDPI builds.Toni Uhlig2020-11-18
| | | | | | | * added .gitignore to prevent SCM check-ins of unwanted files * fixed invalid include path for python examples Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Provide functionality do deal with tokens from JSMN.Toni Uhlig2020-11-17
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Fixed inconsistent callback function call if a token parsed.Toni Uhlig2020-11-13
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Renamed misleading "contrib" subfolder to "dependencies".Toni Uhlig2020-11-13
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Finished unfinished nDPIsrvd.h helper functionality.Toni Uhlig2020-11-13
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Make sure that DAEMON_EVENT_SHUTDOWN gets transmitted before close() (hacky, ↵Toni Uhlig2020-11-08
| | | | | | but works). Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* cosmetics, exception verbosityToni Uhlig2020-10-17
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* py-flow-info: Print BasicEvents.Toni Uhlig2020-10-12
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Improved python event validation with focus on readability.Toni Uhlig2020-09-30
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Centralized some python code parts to make future modifications easier.Toni Uhlig2020-09-29
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Improved event parsing for Python scripts.Toni Uhlig2020-09-26
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Added event validation functions and fixed Python scripts.Toni Uhlig2020-09-26
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Centralized EventName validation and moved code parts.Toni Uhlig2020-09-26
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Removed DISABLE_JSMN define for c-json-stdout (built-in per default).Toni Uhlig2020-09-26
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Removed examples/c-json-stdout/jsmn as it's new location will be ↵Toni Uhlig2020-09-26
| | | | | | contrib/jsmn, soon. Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Added new flow event: FLOW_EVENT_DETECTION_UPDATEToni Uhlig2020-09-25
| | | | | | | * This event will be triggered when nDPI detection has some new information for us (hopefully). * Detection change is based on hashing with 32-bit murmur3 certain members of the ndpi flow struct. Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Process extra packets with nDPI, still not perfect but results in a more ↵Toni Uhlig2020-09-24
| | | | | | | | | accurate detection. * set default user used for setuid() * added 2 TODOs Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* go-dashboard: Print unmarshalled JSON string in a textbox.Toni Uhlig2020-09-03
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* go-dashboard: Added event structs and JSON unmarshal semantic.Toni Uhlig2020-09-02
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* go-dashboard: go mod/vendor support + termdash text user interfaceToni Uhlig2020-09-01
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Added golang JSON deserializer example.Toni Uhlig2020-08-31
| | | | Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* risky-flow-to-pcap.py: dump the first few packets of a "risky" flow to a ↵Toni Uhlig2020-08-23
| | | | | | PCAP file Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* nDPIsrvd.py: improved PCAP writing for guessed/undetected flows (ignore ↵Toni Uhlig2020-08-19
| | | | | | empty UDP/TCP packets) Signed-off-by: Toni Uhlig <matzeton@googlemail.com>