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

find command reports [wj]ar as listing log4j, but manual inspection diverges #43

Open
rennis250 opened this issue Dec 17, 2021 · 0 comments

Comments

@rennis250
Copy link

Hi there,

many thanks again for all the hard work!

The following command returns several matches for a Java program on a machine we have:

find . -name '*[wj]ar' -print -exec sh -c 'jar tvf {} | grep log4j' \;

But, a manual inspection of those matched files shows empty grep results. For example, the following file matches:

./lib/xml.jar

If I run jar tvf on that, then I get the output in the attached file:

https://www.dropbox.com/s/snzdgxzlx9fhucy/lib_xml_jar_tvf.txt?dl=0

Running this through grep log4j returns an empty result:

me@host:/opt/IBM/SPSS/Concurrent_Licensing_Tools/sentinellm/JRE$ jar tvf ./lib/xml.jar | grep log4j

me@host:/opt/IBM/SPSS/Concurrent_Licensing_Tools/sentinellm/JRE$

I am not a pro with the find command, so not sure how to adjust it.

Best wishes and many thanks,
Rob

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

1 participant