Fix zip internal path issue on Windows
This commit is contained in:
@@ -296,8 +296,8 @@ def main():
|
||||
start_time = time.monotonic()
|
||||
hostname = magenta(HOSTNAME)
|
||||
|
||||
if not args.no_banner and not args.quiet:
|
||||
print(FIGLET)
|
||||
#if not args.no_banner and not args.quiet:
|
||||
# print(FIGLET)
|
||||
for directory in args.path:
|
||||
now = datetime.datetime.utcnow().replace(microsecond=0)
|
||||
if not args.quiet:
|
||||
@@ -325,11 +325,9 @@ def main():
|
||||
# If we find JndiManager.class, we also check if JndiLookup.class exists
|
||||
has_lookup = True
|
||||
if zpath.name.lower().endswith("JndiManager.class".lower()):
|
||||
lookup_path = str(
|
||||
zpath.parent.parent / "lookup/JndiLookup.class"
|
||||
)
|
||||
lookup_path = zpath.parent.parent / "lookup/JndiLookup.class"
|
||||
try:
|
||||
has_lookup = zfile.open(lookup_path)
|
||||
has_lookup = zfile.open(lookup_path.as_posix())
|
||||
except KeyError:
|
||||
has_lookup = False
|
||||
check_vulnerable(zf, parents + [zpath], stats, has_lookup)
|
||||
|
||||
Reference in New Issue
Block a user