log4shell-tool
log4shell-tool copied to clipboard
ERROR: Unable to map scan scope variable to a value.
im running this via ps but when I run it I get the below error without asking what option I want to run:
PS D:\log4j> .\scanner-8b.ps1
Log4j/Log4Shell CVE-2021-44228 Scanning/Mitigation Tool (seagull/Datto)
=======================================================================
! ERROR: Unable to map scan scope variable to a value. (This should never happen!)
The acceptable values for env:usrScanScope are:
1: Scan files on Home Drive
2: Scan files on fixed and removable drives
3: Scan files on all detected drives, even network drives
PS D:\log4j>
Before running the script you need to set three variables:
$env:usrScanscope = # 1, 2, or 3 - 1 = Scan home drive, 2 = scan fixed and removable, 3 = scan all local and network drives
$env:usrUpdateDefs = # 'true' or 'false' - Update YARA definitions, true or false
$env:usrMitigate = # 'Y', 'N', or 'X' - Y = Set LOG4J_FORMAT_MSG_NO_LOOKUPS to true, N = Set LOG4J_FORMAT_MSG_NO_LOOKUPS to false, X = Don't set LOG4J_FORMAT_MSG_NO_LOOKUPS
Well-put. You can also find this in the readme under "usage".