components/path_extractors/anchors.rb in arachni-1.4 vs components/path_extractors/anchors.rb in arachni-1.5

- old
+ new

@@ -1,22 +1,20 @@ =begin - Copyright 2010-2016 Tasos Laskos <tasos.laskos@arachni-scanner.com> + Copyright 2010-2017 Sarosys LLC <http://www.sarosys.com> This file is part of the Arachni Framework project and is subject to redistribution and commercial restrictions. Please see the Arachni Framework web site for more information on licensing and terms of use. =end # Extracts paths from anchor elements. # # @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com> -# -# @version 0.2 class Arachni::Parser::Extractors::Anchors < Arachni::Parser::Extractors::Base def run - return [] if !includes?( 'href' ) + return [] if !check_for?( 'href' ) - document.search( '//a[@href]' ).map { |a| a['href'] } + document.nodes_by_name( 'a' ).map { |a| a['href'] } end end