ModSecurity-log-utilities icon indicating copy to clipboard operation
ModSecurity-log-utilities copied to clipboard

Tabs and indentation errors prevent modsec-log-parser working with python3

Open cilex-ft opened this issue 3 years ago • 1 comments

Ubuntu 20.04 installs python3 by default.

When executing modsec-log-parser.py, error is raised:

File "./modsec-log-parser.py", line 50
    for xx in summary.split(","):
                                ^
TabError: inconsistent use of tabs and spaces in indentation

I tried to solve the error by replacing tabs with spaces, to no avail:

sed 's/\t/    /g' modsec-log-parser.py > modsec-log-parser.py3 

./modsec-log-parser.py3  --summary="uri,id,msg" /var/log/modsec_audit.log
  File "./modsec-log-parser.py3", line 62
    print str(i)
    ^
IndentationError: expected an indented block

Please fix these indentations!

cilex-ft avatar Sep 29 '21 07:09 cilex-ft

yeah. i've tried this on debian11 with python3 and on os x with python 3 and getting the exact same results.

    for xx in summary.split(","):
TabError: inconsistent use of tabs and spaces in indentation   

idlogin avatar Apr 24 '23 10:04 idlogin