From b8a0875de9da409e6b22177ee1dc61832742ecc5 Mon Sep 17 00:00:00 2001 From: Zied Aouini Date: Tue, 16 Nov 2021 17:40:17 +0100 Subject: [PATCH] nDPI SYnc. --- .../workflows/windows_build_and_publish.yml | 4 +++- nfstream/engine/engine.py | 2 +- nfstream/engine/test_dll.py | 20 +++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 nfstream/engine/test_dll.py diff --git a/.github/workflows/windows_build_and_publish.yml b/.github/workflows/windows_build_and_publish.yml index 82f33af..9260434 100644 --- a/.github/workflows/windows_build_and_publish.yml +++ b/.github/workflows/windows_build_and_publish.yml @@ -50,4 +50,6 @@ jobs: cd nDPI msys2 -c './autogen.sh' msys2 -c 'make all' - msys2 -c 'ls src/lib/' + msys2 -c 'cp libndpi-4.1.0.dll ../nfstream/engine/libndpi.dll' + msys2 -c 'ls ../nfstream/engine/' + msys2 -c 'cd ..' diff --git a/nfstream/engine/engine.py b/nfstream/engine/engine.py index 38cec28..45b60b3 100644 --- a/nfstream/engine/engine.py +++ b/nfstream/engine/engine.py @@ -880,7 +880,7 @@ struct ndpi_flow_struct { struct { char ssl_version_str[12]; uint16_t ssl_version, server_names_len; - char client_requested_server_name[256], *server_names, + char client_requested_server_name[256], *server_names; char *alpn, *tls_supported_versions, *issuerDN, *subjectDN; uint32_t notBefore, notAfter; char ja3_client[33], ja3_server[33]; diff --git a/nfstream/engine/test_dll.py b/nfstream/engine/test_dll.py new file mode 100644 index 0000000..7534dd8 --- /dev/null +++ b/nfstream/engine/test_dll.py @@ -0,0 +1,20 @@ +""" +------------------------------------------------------------------------------------------------------------------------ +test_dll.py +Copyright (C) 2019-21 - 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 . +------------------------------------------------------------------------------------------------------------------------ +""" + +from os.path import abspath, dirname +import cffi + +ffi = cffi.FFI() +lib = ffi.dlopen(dirname(abspath(__file__)) + '/ndpi.dll') \ No newline at end of file