Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug and solution( in case of gz log files ^^) #37

Open
nhlee2k opened this issue Sep 7, 2021 · 0 comments
Open

Bug and solution( in case of gz log files ^^) #37

nhlee2k opened this issue Sep 7, 2021 · 0 comments

Comments

@nhlee2k
Copy link

nhlee2k commented Sep 7, 2021

Bug and solution

if want to parse gz log file, the parser has some bugs.
Exactly, the function parser_file() in parser/type.py,

To sove this problem
loglines = reversed(logfile.readlines())
===> loglines = reversed([x.decode('utf-8') for x in logfile.readlines()])

Because, in the original loglines is a list of bytes. python regular expression(re) can parse only strings.
So, the above solution i convert bytes list to strings list .

enjoy this project code and have a nice day :)

Specifications

  • Command tried:
  • logdissect version:
  • Python version:
  • Operating system:
  • Operating system version:
  • Log file type:
  • Other info that might be useful:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant