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

Not working with Plesk Apache error_log file without optional parameters #5

Open
andp97 opened this issue Oct 22, 2020 · 0 comments · May be fixed by #10
Open

Not working with Plesk Apache error_log file without optional parameters #5

andp97 opened this issue Oct 22, 2020 · 0 comments · May be fixed by #10

Comments

@andp97
Copy link

andp97 commented Oct 22, 2020

Python Version:

python3 -V                                                                                                                                                                                                                
Python 3.8.5
[user@localhost] python3 modsec-log-parser.py error_log
(['error_log'], None)
Traceback (most recent call last):
  File "./modsec-log-parser.py", line 64, in <module>
    main()
  File "./modsec-log-parser.py", line 37, in main
    if len(summary) == 0:
TypeError: object of type 'NoneType' has no len()

With optional parameters works fine:

[user@localhost] python3 modsec-log-parser.py error_log  --summary "id,client,uri" --delim "  " 
225170"  52.xxx.xx.xxx  /wp-json/wp/v2/users/"
942340"  93.xxx.xxx.xxx  /noindex/css/fonts/Bold/OpenSans-Bold.woff"
77210492"  64.xxx.xxx.xxx  /wp-content/plugins/eshop-magic/download.php"
942370"  93.xxx.xxx.xxx  /images/poweredby.png"

I've tried this script after using the fix applied on Pull Request #4

@bobcarroll bobcarroll linked a pull request May 5, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant