lightos/Panoptic

WindowsError occur when url.netloc contains ":"

Closed this issue · 2 comments

Example URL: https://xxx.com:8080/blah

When creating output directory from parsed_target_url.netloc, ":" is not allowed on Windows.

A quick fix for line 432:
_ = os.path.join("output", kb.parsed_target_url.netloc)

to:
_ = os.path.join("output", kb.parsed_target_url.netloc.replace(":","_"))

And also, if --load from a list that contains ":" like C:\blahblah

That will cause output fail on Windows, too.

A similar fix:
with open(os.path.join(, "%s.txt" % case.location.replace(args.replace_slash if args.replace_slash else "/", "").replace(":", "_")), "w") as f:

Thanks!