diff options
author | Luca Deri <deri@ntop.org> | 2022-07-04 22:52:54 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2022-07-04 22:52:54 +0200 |
commit | 7fa8d882d83577334c7c91843eb40c2ebae8bf74 (patch) | |
tree | bb599e4828303ea4c531dec6e224f90247ca8427 /src/lib/protocols/telnet.c | |
parent | 461589517e50c201bf063c7d4dbb3639e43f4268 (diff) |
Exported username in flow information
Diffstat (limited to 'src/lib/protocols/telnet.c')
-rw-r--r-- | src/lib/protocols/telnet.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/protocols/telnet.c b/src/lib/protocols/telnet.c index 43badd08c..d3ec02958 100644 --- a/src/lib/protocols/telnet.c +++ b/src/lib/protocols/telnet.c @@ -90,10 +90,16 @@ static int search_telnet_again(struct ndpi_detection_module_struct *ndpi_struct, } if(packet->payload[0] == '\r') { + char buf[64]; + flow->protos.telnet.username_detected = 1; - ndpi_set_risk(ndpi_struct, flow, NDPI_CLEAR_TEXT_CREDENTIALS, "Found username"); flow->protos.telnet.username[flow->protos.telnet.character_id] = '\0'; flow->protos.telnet.character_id = 0; + + snprintf(buf, sizeof(buf), "Found Telnet username (%s)", + flow->protos.telnet.username); + ndpi_set_risk(ndpi_struct, flow, NDPI_CLEAR_TEXT_CREDENTIALS, buf); + return(1); } |