Skip to content

Commit

Permalink
move locate warning outside of locate output
Browse files Browse the repository at this point in the history
  • Loading branch information
rubo77 committed Dec 15, 2021
1 parent 18fc76b commit 958b83f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion log4j_checker_beta.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function ok() {

function locate_log4j() {
if [ "$(command -v locate)" ]; then
information "using locate, which could be using outdated data. besure to have called updatedb recently"
locate log4j
else
find \
Expand Down Expand Up @@ -72,6 +71,9 @@ if [[ $? = 0 && -s "$file_temp_hashes.in" ]]; then
fi

information "Looking for files containing log4j..."
if [ "$(command -v locate)" ]; then
information "using locate, which could be using outdated data. besure to have called updatedb recently"
fi
OUTPUT="$(locate_log4j | grep -iv log4js | grep -v log4j_checker_beta)"
if [ "$OUTPUT" ]; then
warning "Maybe vulnerable, those files contain the name:"
Expand Down

0 comments on commit 958b83f

Please sign in to comment.