aboutsummaryrefslogtreecommitdiff
path: root/example/reader_util.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2019-10-20 21:49:45 +0200
committerLuca Deri <deri@ntop.org>2019-10-20 21:49:45 +0200
commit1a5c7daaf67b316ad9cdcf5bba911db1a7e58f12 (patch)
tree3a7e797f3ac1979bcdbea70a755b7148a042117c /example/reader_util.c
parentc1ba4764b54be167459e5647efe1c8d57310f151 (diff)
Implemented FTP user/pwd extraction
Diffstat (limited to 'example/reader_util.c')
-rw-r--r--example/reader_util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/example/reader_util.c b/example/reader_util.c
index 4bef4b816..903c8f762 100644
--- a/example/reader_util.c
+++ b/example/reader_util.c
@@ -947,6 +947,12 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
else if(flow->detected_protocol.app_protocol == NDPI_PROTOCOL_UBNTAC2) {
snprintf(flow->info, sizeof(flow->info), "%s", flow->ndpi_flow->protos.ubntac2.version);
}
+ /* FTP */
+ else if(flow->detected_protocol.app_protocol == NDPI_PROTOCOL_FTP_CONTROL) {
+ snprintf(flow->info, sizeof(flow->info), "User: %s][Pwd: %s",
+ flow->ndpi_flow->protos.ftp.username,
+ flow->ndpi_flow->protos.ftp.password);
+ }
/* KERBEROS */
else if(flow->detected_protocol.app_protocol == NDPI_PROTOCOL_KERBEROS) {
if(flow->ndpi_flow->protos.kerberos.cname[0] != '\0') {