Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

error-logs.sh scanner doesnt cater for .gz files #20

Closed
cybgit opened this issue Jan 31, 2020 · 0 comments
Closed

error-logs.sh scanner doesnt cater for .gz files #20

cybgit opened this issue Jan 31, 2020 · 0 comments

Comments

@cybgit
Copy link

cybgit commented Jan 31, 2020

I've noticed the error-log.sh scanner script doesnt look within the .gz files. It doesnt appear to cause an error, but when i ammend the script as follows and use zgrep, i get some hits on curl failing and other artefacts which could be useful.

hits=$(find "$root_directory/var/log/" -type f -iname "httperr.gz" -exec zgrep -HEi "$regex" {} ;);

You would need to cater for both the httperror.log as well as the gziped ones which i believe zgrep can do, in which case i'd suggest just replacing grep with zgrep in the original script.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant