You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
foreach ($iterationin ('yara32.exe','yara64.exe')) {
if (!(test-path$iteration)) {
write-host"! ERROR: $iteration not found. It needs to be in the same directory as the script."write-host" Download Yara from https://github.com/virustotal/yara/releases/latest and place them here."exit1
} else {
write-host"- Verified presence of $iteration."
}
becomes this
foreach ($iterationin ('yara32.exe','yara64.exe')) {
if (!(test-path"$script:workingPath\$iteration")) {
write-host"! ERROR: $iteration not found. It needs to be in the same directory as the script."write-host" Download Yara from https://github.com/virustotal/yara/releases/latest and place them here."exit1
} else {
write-host"- Verified presence of $iteration."
}
Hi;
This is a great resource for people looking to bolster the script, thank you for adding it.
The reason the script is written the way it is is because originally it was intended for use with the Datto RMM solution which does not require the above steps to be taken; however, if we make "generic" scripts in future I will endeavour to bridge this gap a little closer.
I won't close this case so everyone can see it.
Cheers – SL
For completeness sake, and because with the initial proposed edits alone the script would break, I forked the repo and edited the script to include these edits. I'll also edit the initial issue with the link to the fork. https://github.com/ProVal-Tech/log4shell-tool
Add a param block similar to the following:
Use this to get the location of the script itself, not the current directory:
So that this:
becomes this
Hope this helps 😊
Edit: Link to the fork which implements these changes: https://github.com/ProVal-Tech/log4shell-tool
The text was updated successfully, but these errors were encountered: