From d7fd3acf23b1adbc6d0b2f824966b4d8dc59f25e Mon Sep 17 00:00:00 2001 From: Brendan Coles Date: Mon, 10 Apr 2017 18:43:16 +0000 Subject: [PATCH] Update minimum supported Ruby version to 2.2 --- beef | 6 +++--- core/filters/browser.rb | 2 +- install | 4 ++-- test/common/ts_common.rb | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/beef b/beef index dbd9af564..40c65b1e0 100755 --- a/beef +++ b/beef @@ -9,10 +9,10 @@ # stop deprecation warning from being displayed $VERBOSE = nil -# @note Version check to ensure BeEF is running Ruby 2.1+ -if RUBY_VERSION < '2.1' +# @note Version check to ensure BeEF is running Ruby 2.2+ +if RUBY_VERSION < '2.2' puts "\n" - puts "Ruby version #{RUBY_VERSION} is no longer supported. Please upgrade to Ruby version 2.1 or later." + puts "Ruby version #{RUBY_VERSION} is no longer supported. Please upgrade to Ruby version 2.2 or later." puts "\n" exit 1 end diff --git a/core/filters/browser.rb b/core/filters/browser.rb index 5dfc1dd9c..550708ed7 100644 --- a/core/filters/browser.rb +++ b/core/filters/browser.rb @@ -146,7 +146,7 @@ module Filters def self.is_valid_browser_plugins?(str) return true unless is_non_empty_string?(str) return false if str.length > 1000 - if RUBY_VERSION >= "1.9" && str.encoding === Encoding.find('UTF-8') + if str.encoding === Encoding.find('UTF-8') return (str =~ /[^\w\d\s()-.,';_!\302\256]/u).nil? else return (str =~ /[^\w\d\s()-.,';_!\302\256]/n).nil? diff --git a/install b/install index 82ca609a6..689bb9fc9 100755 --- a/install +++ b/install @@ -8,9 +8,9 @@ puts "\nWelcome to the BeEF installer!" -if RUBY_VERSION < '2.0' +if RUBY_VERSION < '2.2' puts "\n" - puts "Ruby version #{RUBY_VERSION} is no longer supported. Please upgrade to Ruby version 2.0 or later." + puts "Ruby version #{RUBY_VERSION} is no longer supported. Please upgrade to Ruby version 2.2 or later." puts "\n" exit 1 end diff --git a/test/common/ts_common.rb b/test/common/ts_common.rb index 13d337308..a518e166a 100644 --- a/test/common/ts_common.rb +++ b/test/common/ts_common.rb @@ -5,9 +5,9 @@ # # @note Version check to ensure BeEF is running Ruby 2.0+ -if RUBY_VERSION < '2.0' +if RUBY_VERSION < '2.2' puts "\n" - puts "Ruby version #{RUBY_VERSION} is no longer supported. Please upgrade to Ruby version 2.0 or later." + puts "Ruby version #{RUBY_VERSION} is no longer supported. Please upgrade to Ruby version 2.2 or later." puts "\n" exit 1 end