lib/wmap/utils/wp_detect.rb
# Wordpress version detection via - readme.html
Wordpress version detection via - readme.html
Wordpress version detection via - readme . html
def wp_ver_readme(url)
  		site=url_2_site(url)
      readme_url=site + "readme.html"
      k=Wmap::UrlChecker.new
  		puts "Res code: #{k.response_code(readme_url)}" if @verbose
      if k.response_code(readme_url) == 200
        k=nil
        doc=open_page(readme_url)
  			puts doc if @verbose
        logo=doc.css('h1#logo')[0]
        puts logo.inspect if @verbose
  			return logo.to_s.scan(/[\d+\.]+\d+/).first
      end
      k=nil
      return nil
  	rescue => ee
  		puts "Exception on method #{__method__} for url #{url}: #{ee}" if @verbose
  		return nil
  	end
def wp_ver_readme ( url ) site = url_2_site ( url ) readme_url = site + "readme.html" k = Wmap :: UrlChecker . new puts "Res code: #{k.response_code(readme_url)}" if @verbose if k . response_code ( readme_url ) == 200 k = nil doc = open_page ( readme_url ) puts doc if @verbose logo = doc . css ( 'h1#logo' ) [ 0 ] puts logo . inspect if @verbose return logo . to_s . scan ( / [ \d + \. ]+ \d + / ) . first end k = nil return nil rescue => ee puts "Exception on method #{__method__} for url #{url}: #{ee}" if @verbose return nil end
Wordpress version detection via - readme.html
Wordpress version detection via - readme . html
url
<not_specific>