From 9c18c50640d03432139d3d51e80c443a5c4f025d Mon Sep 17 00:00:00 2001 From: Ruakij Date: Mon, 22 Nov 2021 10:33:24 +0100 Subject: [PATCH] Added TextHandler to exec-call --- main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index 654a2bf..70d0315 100644 --- a/main.cpp +++ b/main.cpp @@ -1,7 +1,7 @@ #include #include #include "./helper/exec.hpp" - +#include "./handler/asyncHandler.hpp" const std::string tcpdump_baseCmd = "tcpdump -vvv -e -n -X -s0 -i "; @@ -14,9 +14,9 @@ int main(int argc, char *args[]){ fprintf(stderr, "Missing interface\n"); exit(1); } - - int exitCode = exec(tcpdump_cmd.c_str()); + int exitCode = exec(tcpdump_cmd.c_str(), &asyncHandler); + if(exitCode){ fprintf(stderr, "\ntcpdump exited with non-zero ExitCode: %d\n Something went wrong! Check tcpdump-output for more information.\n", exitCode); exit(1);