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

Broken output folder name when scheme isn't provided #1357

Open
shelld3v opened this issue Jan 23, 2024 · 3 comments
Open

Broken output folder name when scheme isn't provided #1357

shelld3v opened this issue Jan 23, 2024 · 3 comments
Labels
bug Something isn't working Priority: Medium

Comments

@shelld3v
Copy link
Collaborator

What is the current behavior?

When you provide a target without an URI scheme (-u example.com), the URI scheme will be missing in the output folder name, as below

image

What is the expected behavior?

Because dirsearch detects the scheme anyway, the scheme should appear in the folder name, as below

image

@shelld3v shelld3v added bug Something isn't working Priority: Medium labels Jan 23, 2024
@maurosoria
Copy link
Owner

This should be easy to fix. Moreover, was the older behaviour

@shelld3v
Copy link
Collaborator Author

This should be easy to fix. Moreover, was the older behaviour

The fix is probably performing scheme detection before the creation of the report folder, I will work on this when I have time

@nrathaus
Copy link

nrathaus commented Apr 30, 2024

I believe offending code is inside def setup_reports(self):

parsed = urlparse(options["urls"][0]) on: scanme.nmap.org returns no scheme

In def set_target(self, url):

When there is no scheme the code detect_scheme(host, port) is called, which returns http or https depending on the port provided

We could use the same in setup_reports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority: Medium
Projects
None yet
Development

No branches or pull requests

3 participants