lib/wmap/utils/wp_detect.rb
# Main method to extract the WordPress version
Main method to extract the WordPress version
Main method to extract the WordPress version
def wp_ver(url)
  		if !wp_ver_readme(url).nil?
  			puts "WordPress version found by wp_ver_readme method. " if @verbose
  			return wp_ver_readme(url)
  		elsif !wp_ver_login(url,"login.min.css").nil?
  			puts "WordPress version found by login.min.css file. " if @verbose
  			return wp_ver_login(url,"login.min.css")
  		elsif !wp_ver_login(url,"buttons.min.css").nil?
  			puts "WordPress version found by buttons.min.css file. " if @verbose
  			return wp_ver_login(url,"buttons.min.css")
  		elsif !wp_ver_login(url,"wp-admin.min.css").nil?
  			puts "WordPress version found by wp-admin.min.css file. " if @verbose
  			return wp_ver_login(url,"wp-admin.min.css")
  		elsif !wp_ver_meta(url).nil?
  			puts "WordPress version found by wp_ver_meta method. " if @verbose
  			return wp_ver_meta(url)
  		elsif !wp_ver_generator(url).nil?
  			puts "WordPress version found by wp_ver_generator method. " if @verbose
  			return wp_ver_generator(url)
      elsif !wp_ver_load_styles(url).nil?
  			puts "WordPress version found by wp_ver_load_styles method. " if @verbose
  			return wp_ver_load_styles(url)
      else
  			return nil
  		end
  	rescue => ee
  		puts "Exception on method #{__method__} for url #{url}: #{ee}" if @verbose
  		return nil
  	end
def wp_ver ( url ) if ! wp_ver_readme ( url ) . nil? puts "WordPress version found by wp_ver_readme method. " if @verbose return wp_ver_readme ( url ) elsif ! wp_ver_login ( url , "login.min.css" ) . nil? puts "WordPress version found by login.min.css file. " if @verbose return wp_ver_login ( url , "login.min.css" ) elsif ! wp_ver_login ( url , "buttons.min.css" ) . nil? puts "WordPress version found by buttons.min.css file. " if @verbose return wp_ver_login ( url , "buttons.min.css" ) elsif ! wp_ver_login ( url , "wp-admin.min.css" ) . nil? puts "WordPress version found by wp-admin.min.css file. " if @verbose return wp_ver_login ( url , "wp-admin.min.css" ) elsif ! wp_ver_meta ( url ) . nil? puts "WordPress version found by wp_ver_meta method. " if @verbose return wp_ver_meta ( url ) elsif ! wp_ver_generator ( url ) . nil? puts "WordPress version found by wp_ver_generator method. " if @verbose return wp_ver_generator ( url ) elsif ! wp_ver_load_styles ( url ) . nil? puts "WordPress version found by wp_ver_load_styles method. " if @verbose return wp_ver_load_styles ( url ) else return nil end rescue => ee puts "Exception on method #{__method__} for url #{url}: #{ee}" if @verbose return nil end
Main method to extract the WordPress version
Main method to extract the WordPress version
url
<not_specific>