datto / log4shell-tool

Log4Shell Enumeration, Mitigation and Attack Detection Tool
Apache License 2.0
15 stars 13 forks source link

ERROR: Unable to map scan scope variable to a value. #6

Open Bowen73 opened 2 years ago

Bowen73 commented 2 years ago

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>
theologos7 commented 2 years ago

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
Datto-StanLee commented 2 years ago

Well-put. You can also find this in the readme under "usage".