Added checks for old ruby. Otherwise there will be syntax errors
This commit is contained in:
@@ -124,10 +124,6 @@ def banner
|
||||
puts ' Sponsored by the RandomStorm Open Source Initiative'
|
||||
puts '_____________________________________________________'
|
||||
puts
|
||||
if RUBY_VERSION < '1.9'
|
||||
puts '[WARNING] Ruby < 1.9 not officially supported, please upgrade.'
|
||||
puts
|
||||
end
|
||||
end
|
||||
|
||||
def colorize(text, color_code)
|
||||
|
||||
@@ -17,6 +17,13 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#++
|
||||
|
||||
require 'rubygems'
|
||||
|
||||
if Gem::Version.create(RUBY_VERSION) < Gem::Version.create(1.9)
|
||||
puts "Ruby >= 1.9 required to run wpscan (You have #{RUBY_VERSION})"
|
||||
exit(1)
|
||||
end
|
||||
|
||||
begin
|
||||
# Standard libs
|
||||
require 'rubygems'
|
||||
|
||||
Reference in New Issue
Block a user