WithSecureLabs / chainsaw

Rapidly Search and Hunt through Windows Forensic Artefacts
GNU General Public License v3.0
2.7k stars 242 forks source link

Check for potential I/0 error before processing #121

Closed jfstenuit closed 1 year ago

jfstenuit commented 1 year ago

When using the "--output" flag and directing to a file without write access, one should open the file before starting the processing, otherwise, the processing time is wasted and the [x] File exists (os error 17) error message only happens at the end.

Way to reproduce :

$ set -o noclobber
$ touch chainsaw-output.csv
$ chainsaw hunt ... --full --csv chainsaw-output.csv
alexkornitzer commented 1 year ago

Should be fixed in that above commit, will re-open if that is not the case.