Created
December 16, 2021 15:37
-
-
Save spy86/73f772de95b73cb4b77d7cca9abdd924 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "checking for log4j vulnerability..."; | |
if [ "$(locate log4j|grep -v log4js)" ]; then | |
echo "### maybe vulnerable, those files contain the name:"; | |
locate log4j|grep -v log4js; | |
fi; | |
if [ "$(rpm -qa|grep log4j|grep -v log4js)" ]; then | |
echo "### maybe vulnerable, installed packages:"; | |
rpm -qa |grep log4j; | |
fi; | |
if [ "$(which java)" ]; then | |
echo "java is installed, so note that Java applications often bundle their libraries inside jar/war/ear files, so there still could be log4j in such applications."; | |
fi; | |
echo "If you see no output above this line, you are safe. Otherwise check the listed files and packages."; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment