Sha256: 980a4467a9c01009a8047c82ad932ed9511ec20d1ce2ebcb861b1f1d82a30019
Contents?: true
Size: 740 Bytes
Versions: 2
Compression:
Stored size: 740 Bytes
Contents
=begin Copyright 2010-2015 Tasos Laskos <tasos.laskos@arachni-scanner.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 # Extract paths from HTML comments. # # @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com> # @version 0.2 class Arachni::Parser::Extractors::Comments < Arachni::Parser::Extractors::Base def run return [] if !includes?( '<!--' ) document.xpath( '//comment()' ).map do |comment| comment.text.scan( /(\/[\/a-zA-Z0-9%._-]+)/ ) end.flatten.select { |s| s.include? '/' } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
arachni-1.2.1 | components/path_extractors/comments.rb |
arachni-1.2 | components/path_extractors/comments.rb |