=begin Arachni Copyright (c) 2010-2012 Tasos "Zapotek" Laskos This is free software; you can copy and distribute and modify this program under the term of the GPL v2.0 License (See LICENSE file for details) =end module Arachni::Parser::Extractors # # Extracts meta refresh URLs. # # @author: Tasos "Zapotek" Laskos # # # @version: 0.1 # class MetaRefresh < Paths # # Returns an array of paths as plain strings # # @param [Nokogiri] Nokogiri document # # @return [Array] paths # def run( doc ) begin doc.search( "//meta[@http-equiv='refresh']" ). map { |url| url['content'].split( ';' )[1].split( '=' )[1] } rescue end end end end