Comments (7)
RHEL8 ships with 3.6.8 by default
RHEL7 ships with an installable version of 3.6.8
So if you aim for 3.6.8+ you should be good (RHEL6 which is no EOL doesn't come with python3 support and has to be manually installed so I wouldn't both trying to support that one :)
from log4j-finder.
- I compiled 1.0.1 on my centos 7.9 build machine.
And it does confirm the zpfile.Path issue.
[me@centos7t01 log4j-finder]$ ./dist/log4j-finder -bvv /tmp
2021-12-16 19:22:46,976 DEBUG debug logging enabled
[2021-12-17 00:22:46.976100] Scanning: /tmp
2021-12-16 19:22:46,976 DEBUG [Errno 13] Permission denied: '/tmp/vmware-root'
2021-12-16 19:22:46,977 DEBUG [Errno 13] Permission denied: '/tmp/systemd-private-8ae785b6677d4a3fa3cda29f9d336bae-rtkit-daemon.service-zNyLl1'
2021-12-16 19:22:46,977 DEBUG [Errno 13] Permission denied: '/tmp/systemd-private-8ae785b6677d4a3fa3cda29f9d336bae-colord.service-518gmC'
2021-12-16 19:22:46,977 DEBUG [Errno 13] Permission denied: '/tmp/systemd-private-7546a27e96df49dcb087991ab7126f6b-rtkit-daemon.service-W8h4mn'
2021-12-16 19:22:46,977 DEBUG [Errno 13] Permission denied: '/tmp/vmware-root_816-2965579223'
2021-12-16 19:22:46,977 DEBUG [Errno 13] Permission denied: '/tmp/systemd-private-7546a27e96df49dcb087991ab7126f6b-colord.service-iJUNZ1'
2021-12-16 19:22:46,977 DEBUG [Errno 13] Permission denied: '/tmp/systemd-private-e54fb00e2dd74bbd92d1339b114187d4-rtkit-daemon.service-XkK09E'
2021-12-16 19:22:46,977 DEBUG [Errno 13] Permission denied: '/tmp/vmware-root_18226-592564550'
2021-12-16 19:22:46,977 DEBUG [Errno 13] Permission denied: '/tmp/vmware-root_710-2990613080'
2021-12-16 19:22:46,977 DEBUG [Errno 13] Permission denied: '/tmp/vmware-root_695-4021718990'
2021-12-16 19:22:46,977 DEBUG [Errno 13] Permission denied: '/tmp/vmware-root_822-2965448144'
2021-12-16 19:22:46,977 DEBUG [Errno 13] Permission denied: '/tmp/vmware-root_696-2722173465'
2021-12-16 19:22:46,977 DEBUG [Errno 13] Permission denied: '/tmp/vmware-root_702-2722304542'
2021-12-16 19:22:46,977 DEBUG [Errno 13] Permission denied: '/tmp/vmware-root_777-4281777711'
2021-12-16 19:22:46,977 DEBUG [Errno 13] Permission denied: '/tmp/vmware-root_782-2965579254'
2021-12-16 19:22:46,978 DEBUG [Errno 13] Permission denied: '/tmp/vmware-root_784-2966103535'
2021-12-16 19:22:46,978 DEBUG [Errno 13] Permission denied: '/tmp/vmware-root_805-4257200540'
2021-12-16 19:22:46,978 DEBUG [Errno 13] Permission denied: '/tmp/systemd-private-e54fb00e2dd74bbd92d1339b114187d4-bolt.service-NWXq1U'
2021-12-16 19:22:46,978 DEBUG [Errno 13] Permission denied: '/tmp/systemd-private-e54fb00e2dd74bbd92d1339b114187d4-colord.service-xPQCKX'
2021-12-16 19:22:46,978 DEBUG [Errno 13] Permission denied: '/tmp/systemd-private-e54fb00e2dd74bbd92d1339b114187d4-httpd.service-whlNzm'
2021-12-16 19:22:46,979 INFO Found jar file: /tmp/log4j-core-2.16.0.jar
2021-12-16 19:22:47,003 INFO Found zfile: <ZipInfo filename='org/apache/logging/log4j/core/net/JndiManager.class' compress_type=deflate filemode='-rw-r--r--' file_size=9991 compress_size=4226> ([PosixPath('/tmp/log4j-core-2.16.0.jar')]
Traceback (most recent call last):
File "log4j-finder.py", line 329, in <module>
sys.exit(main())
File "log4j-finder.py", line 304, in main
has_lookup = zipfile.Path(zfile, lookup_path).exists()
AttributeError: module 'zipfile' has no attribute 'Path'
[122522] Failed to execute script 'log4j-finder' due to unhandled exception!
[me@centos7t01 log4j-finder]$
- the build OS info
[me@centos7t01 ~]$ python -V && pip3 -V && pyinstaller -v
Python 3.6.8
pip 9.0.3 from /usr/lib/python3.6/site-packages (python 3.6)
4.7
[me@va32centos7t01 ~]$ cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
[me@va32centos7t01 ~]$
- To be useful for production environment which have older OS, down to python2 support is vital.
from log4j-finder.
Found a nice tool called vermin
to detect the minimum version of Python your script works on:
$ pip3 install vermin
$ vermin -vv log4j-finder.py
Detecting python files..
Analyzing using 16 processes..
!2, 3.6 ./log4j-finder.py
'argparse' module requires 2.7, 3.2
'collections' module requires 2.4, 3.0
'collections.ChainMap' member requires !2, 3.3
'collections.Counter' member requires 2.7, 3.1
'datetime' module requires 2.3, 3.0
'functools' module requires 2.5, 3.0
'hashlib' module requires 2.5, 3.0
'io' module requires 2.6, 3.0
'iter' member requires 2.2, 3.0
'itertools' module requires 2.3, 3.0
'logging' module requires 2.3, 3.0
'logging.basicConfig(format)' requires 2.4, 3.0
'os.scandir' member requires !2, 3.5
'pathlib' module requires !2, 3.4
'platform' module requires 2.3, 3.0
'str.format' member requires 2.6, 3.0
'time.monotonic' member requires !2, 3.3
'zipfile.BadZipFile' member requires !2, 3.2
`"..{}..".format(..)` requires 2.7, 3.0
`with` requires 2.5, 3.0
`yield from` requires !2, 3.3
byte string (b'..') or `str` synonym requires 2.6, 3.0
f-strings requires !2, 3.6
print(expr) requires 2.0, 3.0
Tip: You're using potentially backported modules: argparse
If so, try using the following for better results: --backport argparse
Tip: Since '# novm' or '# novermin' weren't used, a speedup can be achieved using: --no-parse-comments
Minimum required versions: 3.6
Incompatible versions: 2
So it's good for Python 3.6 again after last commit. It also gives a nice overview what should be fixed/ported to get things working with Python 2.7.
from log4j-finder.
closing this issue, feel free to open a new issue to discuss compiling or creating a static linux binary that supports older Linux distributions.
from log4j-finder.
Argh, dangit... i have been thinking about refactoring the code to make it more compatible with older Python's. I think this is a good reason.
What Python version is RHEL shipped with?
from log4j-finder.
I got "/lib64/libc.so.6" not found on centos 7, when running log4j-finer compiled on RL8
Does pyinstaller support static library binding ?
[me@rocky8t01 log4j-finder]$ ldd dist/log4j-finder
linux-vdso.so.1 (0x00007ffe0e6fa000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f5e8e6f3000)
libz.so.1 => /lib64/libz.so.1 (0x00007f5e8e4dc000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f5e8e2bc000)
libc.so.6 => /lib64/libc.so.6 (0x00007f5e8def7000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5e8e8f7000)
[me@rocky8t01 log4j-finder]$ rpm -qf /lib64/libc.so.6
glibc-2.28-164.el8.x86_64
[me@rocky8t01 log4j-finder]$
from log4j-finder.
Does pyinstaller support static library binding ?
I have tried to make a truly static version using PyInstaller but have not succeeded yet. Not even on alpine linux.
The recommended way is to build on the oldest linux you can find with the oldest glibc and compile there to ensure it's compatible with forwards Linux distributions with newer glibc. This might be easy to do using a docker image, for example Python pypa provides the manylinux docker image for this purpose: https://github.com/pypa/manylinux
from log4j-finder.
Related Issues (20)
- Errors on one certain server - too long filename perhaps? HOT 5
- Critical issue on Windows HOT 3
- LICENSE is missing HOT 1
- Renamed class extensions are not found HOT 2
- Bug (Windows): Default path only scans the system partition. HOT 4
- GitHub Action didnt publish the release HOT 1
- Symantec Endpoint Protection detects as Trojan HOT 3
- Documentation could use a parameter list with their uses HOT 1
- log4j-finder will change acces time of a jar file HOT 2
- One-Click Windows Version (cmd stays open after execution) HOT 3
- Not working for log4j-1.x where JMSAppender.class exists HOT 1
- Missing 'known bad' hash for versions <2.1? HOT 2
- Scanning issue very large zip files HOT 6
- Very strange security issues from running the Log4j-finder.exe on a Windows 10 machine?
- Exit with error when Vulnerability is found (optional parameter)
- Error with a ZIP file HOT 6
- redhat linux 6 glibc_2.14 not found error HOT 1
- script (binary) requires executable option on /tmp mount HOT 2
- does not scan .nar files
- Signed Windows Binary Out-Of-Date
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from log4j-finder.