Update minimum supported Ruby version to 2.2
This commit is contained in:
6
beef
6
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
|
||||
|
||||
@@ -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?
|
||||
|
||||
4
install
4
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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user