|
6 | 6 | # Date: 16.12.2021
|
7 | 7 | #############################
|
8 | 8 | # Mod. Date: 23.12.2021
|
9 |
| -$scriptVersion = "1.6" |
| 9 | +$scriptVersion = "1.6.1" |
10 | 10 | #Change Log:
|
11 | 11 | # added additional if check to stop the process of bk file not found.
|
12 | 12 | # added PSScriptRoot for 7zip by default
|
@@ -174,10 +174,10 @@ else {
|
174 | 174 | Add-Content -Path $PathToLogFile -Value "$datelog Processing file $file"
|
175 | 175 | & $7zipPath d $file.fullname org/apache/logging/log4j/core/lookup/JndiLookup.class | Out-Null
|
176 | 176 | Write-Host " -- Checking if JNDILookup Class has been removed"
|
177 |
| - Start-Process -FilePath "$7zipPath" -ArgumentList "l `"$($file.FullName)`" org/apache/logging/log4j/core/lookup/JndiLookup.class" -NoNewWindow -Wait -RedirectStandardOutput "$tmpFile" |
| 177 | + Start-Process -FilePath $7zipPath -ArgumentList "l `"$($file.FullName)`" org/apache/logging/log4j/core/lookup/JndiLookup.class" -NoNewWindow -Wait -RedirectStandardOutput "$tmpFile" |
178 | 178 | Add-Content -Path $PathToLogFile -Value "$datelog --- Checking if JNDILookup Class has been removed"
|
179 | 179 | #check if jndilookup class was removed
|
180 |
| - $validate = Select-String -Path "$tmpOutFile" -Pattern "JndiLookup.class" -CaseSensitive -Quiet -SimpleMatch |
| 180 | + $validate = Select-String -Path "$tmpFile" -Pattern "JndiLookup.class" -CaseSensitive -Quiet -SimpleMatch |
181 | 181 | if (! $validate) {
|
182 | 182 | Write-Host " -- Verified: File successully cleaned up." -ForegroundColor Green
|
183 | 183 | Add-Content -Path $PathToLogFile -Value "$datelog --- Verified: File successully cleaned up."
|
@@ -222,7 +222,7 @@ else {
|
222 | 222 | Write-Host " -- Checking if JNDILookup Class has been removed"
|
223 | 223 | Start-Process -FilePath "$7zipPath" -ArgumentList "l `"$($file.FullName)`" org/apache/logging/log4j/core/lookup/JndiLookup.class" -NoNewWindow -Wait -RedirectStandardOutput "$tmpFile"
|
224 | 224 | Add-Content -Path $PathToLogFile -Value "$datelog --- Checking if JNDILookup Class has been removed"
|
225 |
| - $validate = Select-String -Path "$tmpOutFile" -Pattern "JndiLookup.class" -CaseSensitive -Quiet -SimpleMatch |
| 225 | + $validate = Select-String -Path "$tmpFile" -Pattern "JndiLookup.class" -CaseSensitive -Quiet -SimpleMatch |
226 | 226 | #check if jndilookup class was removed
|
227 | 227 | if (! $validate) {
|
228 | 228 | Write-Host " -- Verified: File successully cleaned up." -ForegroundColor Green
|
|
0 commit comments