Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WindowsError occur when url.netloc contains ":" #20

Closed
esabear opened this issue Sep 22, 2017 · 2 comments
Closed

WindowsError occur when url.netloc contains ":" #20

esabear opened this issue Sep 22, 2017 · 2 comments

Comments

@esabear
Copy link
Contributor

esabear commented Sep 22, 2017

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(":","_"))

@esabear esabear changed the title An WindowsError occur when url.netloc contains ":" WindowsError occur when url.netloc contains ":" Sep 22, 2017
@esabear
Copy link
Contributor Author

esabear commented Sep 25, 2017

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:

lightos added a commit that referenced this issue Sep 27, 2017
Issue #20 for Windows environment
@lightos
Copy link
Owner

lightos commented Sep 27, 2017

Thanks!

@lightos lightos closed this as completed Sep 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants