williballenthin / EVTXtract

EVTXtract recovers and reconstructs fragments of EVTX log files from raw binary data, including unallocated space and memory images.
Apache License 2.0
189 stars 22 forks source link

Don't use Dict comprehensions and therefore support Python 2.6 #3

Closed gleeda closed 7 years ago

gleeda commented 10 years ago

Just got this error on the latest build:

File "extract_valid_evtx_records_and_templates.py", line 35
    _replacement_patterns = {i: re.compile("\[(Normal|Conditional) Substitution\(index=%d, type=\d+\)\]" % i) for i in
                                                                                                                ^
SyntaxError: invalid syntax

Maybe i've done something weird?

$ find FILES/ -type f -exec python extract_valid_evtx_records_and_templates.py '{}' testp test \;
williballenthin commented 10 years ago

Are you using Python 2.6 by any chance?

That statement is a dict comprehension, which I believe were added in 2.7. Either way, this warrants a fix.

gleeda commented 10 years ago

oh nm, i figured it out :-) sorry

williballenthin commented 7 years ago

I don't think we'll support py2.6 for EVTXtract. Just py27 onwards (py3 works, now!).