lib/scanner/plugins/http/directory_search.rb in yawast-0.5.2 vs lib/scanner/plugins/http/directory_search.rb in yawast-0.6.0.beta1
- old
+ new
@@ -1,10 +1,19 @@
+require 'securerandom'
+
module Yawast
module Scanner
module Plugins
module Http
class DirectorySearch
def self.search(uri, recursive, list_redirects, search_list = nil)
+ #first, we need to see if the site responds to 404 in a reasonable way
+ unless Yawast::Shared::Http.check_not_found(uri, false)
+ puts 'Site does not respond properly to non-existent directory requests; skipping some checks.'
+
+ return
+ end
+
@recursive = recursive
@list_redirects = list_redirects
if recursive
puts 'Recursively searching for common directories (this will take a while)...'