dirsearch icon indicating copy to clipboard operation
dirsearch copied to clipboard

Broken output folder name when scheme isn't provided

Open shelld3v opened this issue 5 months ago • 3 comments

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 avatar Jan 23 '24 15:01 shelld3v

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

maurosoria avatar Jan 27 '24 04:01 maurosoria

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

shelld3v avatar Jan 27 '24 08:01 shelld3v

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

nrathaus avatar Apr 30 '24 11:04 nrathaus