diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2021-02-27 17:38:31 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2021-02-27 17:47:49 +0100 |
commit | 06ff3530998725864120302f7b04519bf3032e5e (patch) | |
tree | b1ae8f87860d1a928029e6fadd3ecb2e2390e98c /examples | |
parent | e0310d7e1d1f5a8b3b083442d56a1d5485880303 (diff) |
Added JA3 / SSL SHA1 fingerprint blacklists.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/c-captured/c-captured.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/examples/c-captured/c-captured.c b/examples/c-captured/c-captured.c index 261b15f7a..89a7b5eab 100644 --- a/examples/c-captured/c-captured.c +++ b/examples/c-captured/c-captured.c @@ -131,7 +131,11 @@ static char * generate_pcap_filename(struct nDPIsrvd_flow const * const flow, { char const * flow_type = NULL; - if (flow_user->guessed != 0) + if (flow_user->midstream != 0) + { + flow_type = "midstream"; + } + else if (flow_user->guessed != 0) { flow_type = "guessed"; } @@ -143,10 +147,6 @@ static char * generate_pcap_filename(struct nDPIsrvd_flow const * const flow, { flow_type = "risky"; } - else if (flow_user->midstream != 0) - { - flow_type = "midstream"; - } else { flow_type = "unknown-type"; @@ -592,7 +592,7 @@ int main(int argc, char ** argv) openlog("c-captured", LOG_CONS, LOG_DAEMON); errno = 0; - if (user != NULL && change_user_group(user, group, pidfile, NULL, NULL) != 0) + if (user != NULL && change_user_group(user, group, pidfile, datadir /* :D */, NULL) != 0) { if (errno != 0) { @@ -604,6 +604,7 @@ int main(int argc, char ** argv) } return 1; } + chmod(datadir, S_IRWXU); enum nDPIsrvd_connect_return connect_ret = nDPIsrvd_connect(sock); if (connect_ret != CONNECT_OK) |