From bd5ce18bdc51c98ff2920924dbae0de2cf896478 Mon Sep 17 00:00:00 2001 From: Robert Graham Date: Sat, 5 Nov 2016 22:54:13 -0400 Subject: [PATCH] fixes --- telnetlogger.8 | 29 +++++++++++++++++++++++++++++ telnetlogger.8.markdown | 13 +++++++++++++ telnetlogger.c | 1 + 3 files changed, 43 insertions(+) diff --git a/telnetlogger.8 b/telnetlogger.8 index 6b60c43..b458be2 100644 --- a/telnetlogger.8 +++ b/telnetlogger.8 @@ -47,6 +47,35 @@ I then use the firewall to redirect incoming port 23 to my network to the Raspbe . .IP "" 0 . +.SH "OUTPUT FORMAT" +The internet addresses are output in either IPv4 or IPv6 format as appropriate\. Usernames and passwords are filter non\-printable characters and some punctuation, replacing them with the standard \exXX format\. +. +.P +The CSV format has the columns: +. +.IP "" 4 +. +.nf + +time_t, timestamp, address, username, password +. +.fi +. +.IP "" 0 +. +.P +An example line is: +. +.IP "" 4 +. +.nf + +1478398395,2016\-11\-06 02:13:15,127\.0\.0\.1,foo,bar +. +.fi +. +.IP "" 0 +. .SH "COMPATIBILITY" The tool runs on Windows and Linux, but should run on most other systems as well\. . diff --git a/telnetlogger.8.markdown b/telnetlogger.8.markdown index f49f91b..68e1f1c 100644 --- a/telnetlogger.8.markdown +++ b/telnetlogger.8.markdown @@ -45,6 +45,19 @@ to the Raspberry Pi on port 2323. port. If not specified, by default port 23 will be used. This may require root priveleges to run on low-numbered ports. +## OUTPUT FORMAT + +The internet addresses are output in either IPv4 or IPv6 format as +appropriate. Usernames and passwords are filter non-printable characters +and some punctuation, replacing them with the standard \xXX format. + +The CSV format has the columns: + + time_t, timestamp, address, username, password + +An example line is: + + 1478398395,2016-11-06 02:13:15,127.0.0.1,foo,bar ## COMPATIBILITY diff --git a/telnetlogger.c b/telnetlogger.c index 2a5bc05..b8fda3e 100644 --- a/telnetlogger.c +++ b/telnetlogger.c @@ -292,6 +292,7 @@ print_csv(FILE *fp, time_t now, const char *hostname, print_string(fp, password, password_len); fprintf(fp, "\n"); + fflush(fp); pthread_mutex_unlock(&output); }