How to know if a website is enabled/disabled the directory browsing using javascript

171 Views Asked by At

I want to know a random website is enabled/disabled the directory browsing like this (Link). Is there any way to know by using javascript or possible to know via headers?

1

There are 1 best solutions below

0
Igor Topolski On

Tools that check for enabled directory listing (like the one you shared) are looking for common patterns such as Index of /some/path present in the file (example for Apache).

What you could do is:

  • Fetch from a link using fetch, axios or similar
  • Identify patterns for different HTTP servers (apache2, nginx, lighthttpd)
  • Look for this patterns in the fetched content