mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-17 01:32:37 +02:00
btmp fix
This commit is contained in:
@ -87,7 +87,7 @@ def parse(data, raw=False, quiet=False):
|
|||||||
for entry in cleandata:
|
for entry in cleandata:
|
||||||
output_line = {}
|
output_line = {}
|
||||||
|
|
||||||
if entry.startswith('wtmp begins '):
|
if entry.startswith('wtmp begins ') or entry.startswith('btmp begins '):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
entry = entry.replace('system boot', 'system_boot')
|
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])
|
output_line['login'] = ' '.join(linedata[3:7])
|
||||||
|
|
||||||
if len(linedata) > 8:
|
if len(linedata) > 8:
|
||||||
print(linedata)
|
|
||||||
output_line['logout'] = linedata[8]
|
output_line['logout'] = linedata[8]
|
||||||
|
|
||||||
if len(linedata) > 9:
|
if len(linedata) > 9:
|
||||||
|
Reference in New Issue
Block a user