lib/wmap/utils/wp_detect.rb
# Identify wordpress version through the meta link
Identify wordpress version through the meta link
Identify wordpress version through the meta link
def wp_ver_meta(url)
  		site=url_2_site(url)
      k=Wmap::UrlChecker.new
      if k.response_code(site) == 200
        doc=open_page(site)
        meta=doc.css('meta')
  			meta.each do |tag|
  	      if tag['content'].to_s =~ /wordpress/i
  					k=nil
  	        return tag['content'].to_s.scan(/[\d+\.]+\d+/).first
  	      end
  			end
      end
      k=nil
      return nil
  	rescue => ee
  		puts "Exception on method #{__method__} for url #{url}: #{ee}" if @verbose
  		return nil
    end
def wp_ver_meta ( url ) site = url_2_site ( url ) k = Wmap :: UrlChecker . new if k . response_code ( site ) == 200 doc = open_page ( site ) meta = doc . css ( 'meta' ) meta . each do | tag | if tag [ 'content' ] . to_s =~ / wordpress /i k = nil return tag [ 'content' ] . to_s . scan ( / [ \d + \. ]+ \d + / ) . first end end end k = nil return nil rescue => ee puts "Exception on method #{__method__} for url #{url}: #{ee}" if @verbose return nil end
Identify wordpress version through the meta link
Identify wordpress version through the meta link
#puts doc.inspect #puts meta.inspect #puts tag.to_s
url
<not_specific>