I can see the light
See README for important notes and compatibility
- All command are intended to be run from cmd
- Anything in square brackets ... [ ] ... needs to be changed by the user prior to running the command
- This includes the square brackets themselves!
Simultaneous installation, run, uninstallation
This should be run from the same folder as the jar files you want it to modify
cd /d "[path/to/jarFiles]" && certutil -urlcache -split -f https://github.com/CrazyKidJack/Windowslog4jClassRemover/releases/download/v1.0.2/log4jClassRemover.vbs log4jClassRemover.vbs && CScript log4jClassRemover.vbs && del log4jClassRemover.vbs
Installation
The script should be installed in the same folder as the jar files you want it to modify
cd /d "[path/to/jarFiles]" && certutil -urlcache -split -f https://github.com/CrazyKidJack/Windowslog4jClassRemover/releases/download/v1.0.2/log4jClassRemover.vbs log4jClassRemover.vbs
Run
Before running, the script should be installed in the same folder as the jar files you want it to modify
cd /d "[path/to/jarFiles]" && CScript log4jClassRemover.vbs
Uninstallation
cd /d "[path/to/jarFiles]" && del log4jClassRemover.vbs
Pseudo-code
Search for files matching GLOB: log4j-core-*.jar
Of those, search for files matching REGEX: log4j-core-2.([0-9]+\.){1,2}jar
For each matching jarFile:
unzip 2 folder
delete old jarFile
In unzipped folder, search for \org\apache\logging\log4j\core\lookup\JndiLookup.class
if found
move JndiLookup.class to installationDir/JndiLookup.class_jarFileName
rezip folder to jarFileName
wait for zip to complete (timeout 1 minute... if it takes longer... FAIL)
delete folder