Skip to content

Instantly share code, notes, and snippets.

@delthas
Last active December 13, 2021 10:46
Show Gist options
  • Save delthas/65ad9fddf7e9a4b121cb61f709cc3921 to your computer and use it in GitHub Desktop.
Save delthas/65ad9fddf7e9a4b121cb61f709cc3921 to your computer and use it in GitHub Desktop.
Check for JAR files containing log4j on your system
#!/bin/sh -eux
# will list all JAR files containing log4j (log4j related classes)
for f in $(find / -name '*.jar' 2>/dev/null); do echo "Checking $f..."; unzip -l "$f" | grep -F org/apache/logging/log4j/core/lookup/JndiLookup.class; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment