From 5dddb6c34d34b73b7685fda998a572794482e119 Mon Sep 17 00:00:00 2001 From: Yun Zheng Hu Date: Sun, 19 Dec 2021 15:05:41 +0100 Subject: [PATCH] Don't resolve() Path objects so relative scans paths show up relative --- log4j-finder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log4j-finder.py b/log4j-finder.py index 8ca4cc8..fcc7ea5 100755 --- a/log4j-finder.py +++ b/log4j-finder.py @@ -342,7 +342,7 @@ def main(): log.info(f"Found jar file: {p}") stats["scanned"] += 1 for (zinfo, zfile, zpath, parents) in iter_jarfile( - p.resolve().open("rb"), parents=[p.resolve()] + p.open("rb"), parents=[p] ): log.info(f"Found zfile: {zinfo} ({parents}") with zfile.open(zinfo.filename) as zf: