From a1929719f35dd5d5cddac19f7fd300bf669aeb59 Mon Sep 17 00:00:00 2001 From: Christian Mehlmauer Date: Wed, 24 Feb 2016 23:48:50 +0100 Subject: [PATCH] version 2.1.8 minimum requirement --- README.md | 2 +- lib/common/common_helper.rb | 4 +++- lib/environment.rb | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8f38f581..9624402a 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ WPScan comes pre-installed on the following Linux distributions: Prerequisites: -- Ruby >= 2.1.0 - Recommended: 2.3.0 +- Ruby >= 2.1.8 - Recommended: 2.3.0 - Curl >= 7.21 - Recommended: latest - FYI the 7.29 has a segfault - RubyGems - Recommended: latest - Git diff --git a/lib/common/common_helper.rb b/lib/common/common_helper.rb index 58efa51e..87374818 100644 --- a/lib/common/common_helper.rb +++ b/lib/common/common_helper.rb @@ -28,7 +28,9 @@ LOCAL_FILES_XSD = File.join(DATA_DIR, 'local_vulnerable_files.xsd') USER_AGENTS_FILE = File.join(DATA_DIR, 'user-agents.txt') LAST_UPDATE_FILE = File.join(DATA_DIR, '.last_update') -WPSCAN_VERSION = '2.9' +MIN_RUBY_VERSION = '2.1.8' + +WPSCAN_VERSION = '2.9' $LOAD_PATH.unshift(LIB_DIR) $LOAD_PATH.unshift(WPSCAN_LIB_DIR) diff --git a/lib/environment.rb b/lib/environment.rb index 865a703e..0633075a 100644 --- a/lib/environment.rb +++ b/lib/environment.rb @@ -3,8 +3,9 @@ require 'rubygems' version = RUBY_VERSION.dup -if Gem::Version.create(version) < Gem::Version.create(2.1) - puts "Ruby >= 2.1.0 required to run wpscan (You have #{version})" + +if Gem::Version.create(version) < Gem::Version.create(MIN_RUBY_VERSION) + puts "Ruby >= #{MIN_RUBY_VERSION} required to run wpscan (You have #{version})" exit(1) end