Merge github.com:fox-it/log4j-finder into war-patch

This commit is contained in:
Darius Braziunas
2021-12-17 06:14:13 -05:00
2 changed files with 25 additions and 1 deletions

View File

@@ -322,7 +322,10 @@ def main():
lookup_path = str(
zpath.parent.parent / "lookup/JndiLookup.class"
)
has_lookup = zipfile.Path(zfile, lookup_path).exists()
try:
has_lookup = zfile.open(lookup_path)
except KeyError:
has_lookup = False
check_vulnerable(zf, parents + [zpath], stats, has_lookup)
except IOError as e:
log.debug(f"{p}: {e}")