From 997b269b0b7e53a456e2a0bd997ead6c2ae843bc Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Thu, 27 Feb 2020 15:26:09 -0800 Subject: [PATCH] btmp fix --- jc/parsers/last.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jc/parsers/last.py b/jc/parsers/last.py index 68188cb1..1b4d398c 100644 --- a/jc/parsers/last.py +++ b/jc/parsers/last.py @@ -87,7 +87,7 @@ def parse(data, raw=False, quiet=False): for entry in cleandata: output_line = {} - if entry.startswith('wtmp begins '): + if entry.startswith('wtmp begins ') or entry.startswith('btmp begins '): continue entry = entry.replace('system boot', 'system_boot') @@ -103,7 +103,6 @@ def parse(data, raw=False, quiet=False): output_line['login'] = ' '.join(linedata[3:7]) if len(linedata) > 8: - print(linedata) output_line['logout'] = linedata[8] if len(linedata) > 9: