mirror of
https://github.com/optim-enterprises-bv/nDPId.git
synced 2025-10-29 17:32:23 +00:00
Strace support for diff tests.
* tiny README update Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
|
||||
# Disclaimer
|
||||
|
||||
Please protect the privacy of others.
|
||||
Please respect&protect the privacy of others.
|
||||
|
||||
The purpose of this software is not to spy on others, but to detect network anomalies and malicious traffic.
|
||||
|
||||
# Abstract
|
||||
@@ -46,7 +47,7 @@ where:
|
||||
* `nDPIsrvd`:
|
||||
|
||||
* create and manage an "incoming" UNIX-socket (ref [1] above), to fetch data from a local `nDPId`;
|
||||
* apply a filtering logic to received data to select "flow_event_id" related JSONs;
|
||||
* apply a buffering logic to received data;
|
||||
* create and manage an "outgoing" UNIX or TCP socket (ref [2] above) to relay matched events
|
||||
to connected clients
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
set -e
|
||||
|
||||
LINE_SPACES=${LINE_SPACES:-48}
|
||||
STRACE_EXEC="${STRACE_EXEC}"
|
||||
MYDIR="$(realpath "$(dirname ${0})")"
|
||||
nDPId_test_EXEC="$(realpath "${2:-"${MYDIR}/../nDPId-test"}")"
|
||||
NETCAT_EXEC="$(which nc) -q 0 -l 127.0.0.1 9000"
|
||||
@@ -111,7 +112,12 @@ for pcap_file in *.pcap *.pcapng *.cap; do
|
||||
|
||||
printf "%-${LINE_SPACES}s\t" "${pcap_file}"
|
||||
|
||||
${nDPId_test_EXEC} "${pcap_file}" \
|
||||
if [ ! -z "${STRACE_EXEC}" ]; then
|
||||
STRACE_CMD="${STRACE_EXEC} -f -e decode-fds=path,socket,dev,pidfd -s 1024 -o /tmp/nDPId-test-stderr/${pcap_file}.strace.out"
|
||||
else
|
||||
STRACE_CMD=""
|
||||
fi
|
||||
${STRACE_CMD} ${nDPId_test_EXEC} "${pcap_file}" \
|
||||
>"/tmp/nDPId-test-stdout/${pcap_file}.out.new" \
|
||||
2>>"/tmp/nDPId-test-stderr/${pcap_file}.out"
|
||||
nDPId_test_RETVAL=$?
|
||||
|
||||
Reference in New Issue
Block a user