google / log4jscanner

A log4j vulnerability filesystem scanner and Go package for analyzing JAR files.
Apache License 2.0
1.56k stars 121 forks source link

sudo: log4jscanner: command not found #30

Closed cdo9 closed 2 years ago

cdo9 commented 2 years ago

With go version go1.17.5 darwin/amd64 on Mac OS. I did this command : go install github.com/google/log4jscanner@latest But when i type sudo log4jscanner /System/Volumes/Data it keeps saying sudo: log4jscanner: command not found First time using go, maybe there is an extra step that i am missing ?

loeffel-io commented 2 years ago

You could simply download the bin from the release page; no go required

ericchiang commented 2 years ago

sudo overrides the PATH environment variable before running your command, you can see that by running

sudo env

Since you've installed log4jscanner in a local user path, it's likely not in a root PATH directory. Either move it to one of those directories or run from a relative path

sudo ./log4jscanner