lib/cms_scanner/target/server/apache.rb in cms_scanner-0.0.6 vs lib/cms_scanner/target/server/apache.rb in cms_scanner-0.0.7
- old
+ new
@@ -28,13 +28,14 @@
# @return [ Array<String> ] The first level of directories/files listed,
# or an empty array if none
def directory_listing_entries(path = nil, params = {})
return [] unless directory_listing?(path, params)
- doc = Nokogiri::HTML(NS::Browser.get(url(path), params).body)
found = []
- doc.css('td a').each { |node| found << node.text.to_s }
+ NS::Browser.get(url(path), params).html.css('td a').each do |node|
+ found << node.text.to_s
+ end
found[1..-1] # returns the array w/o the first element 'Parent Directory'
end
end
end