Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version 2021.12.20 not redirecting output anymore (in Windows) #65

Open
Haeckli opened this issue Dec 21, 2021 · 1 comment
Open

version 2021.12.20 not redirecting output anymore (in Windows) #65

Haeckli opened this issue Dec 21, 2021 · 1 comment

Comments

@Haeckli
Copy link

Haeckli commented Dec 21, 2021

It seems like the latest version (2021.12.20) does not redirect the output anmore. Instead all output goes to the screen and the output file has 0 bytes length.... Did I miss anything?
(it works as expected in vers: 2021.12.17)

See sample screen output below:

C:\log4j>java -jar log4j-detector-2021.12.20.jar c:\log4j\Test > test.txt
-- github.com/mergebase/log4j-detector v2021.12.20 (by mergebase.com) analyzing paths (could take a while).
-- Note: specify the '--verbose' flag to have every file examined printed to STDERR.
-- No vulnerable Log4J 2.x samples found in supplied paths: [c:\log4j\Test]
-- Congratulations, the supplied paths are not vulnerable to CVE-2021-44228 or CVE-2021-45046 ! :-)

C:\log4j>dir
21.12.2021 15:12

.
21.12.2021 15:12 ..
20.12.2021 12:11 59.642 log4j-detector-2021.12.20.jar
21.12.2021 15:04 Test
21.12.2021 15:12 0 test.txt
6 Datei(en), 113.731 Bytes
<<<<<<<

@Haeckli Haeckli changed the title version 2021.12.20 not redirecting otput anymore (in Windows) version 2021.12.20 not redirecting output anymore (in Windows) Dec 21, 2021
@juliusmusseau
Copy link
Contributor

juliusmusseau commented Dec 21, 2021

Yes, the tool now prints zero bytes to STDOUT if no bad log4j versions are found. And exits with exit-code zero (success).

You can use "--json" mode if you'd like to see output in this "no vulns found" case:

$ java -jar log4j-detector-2021.12.20.jar --json /tmp > hits.json

$ cat hits.json
{"hits":[
{"_THE_END_":true}]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants