make wpscan ruby 2.4.0 compatible

fixes #1044
This commit is contained in:
Christian Mehlmauer
2017-01-17 20:24:32 +01:00
parent 88bddd4f87
commit f6644eebf9
5 changed files with 7 additions and 17 deletions

View File

@@ -1 +1 @@
2.3.3
2.4.0

View File

@@ -1,4 +1,4 @@
FROM ruby:2.3-slim
FROM ruby:2.4-slim
MAINTAINER WPScan Team <team@wpscan.org>
RUN DEBIAN_FRONTEND=noninteractive && \

View File

@@ -1,11 +1,12 @@
source 'https://rubygems.org'
gem 'typhoeus', '>=1.0.0'
gem 'nokogiri', '>=1.6.7.2'
gem 'nokogiri', '>=1.7.0.1'
gem 'addressable'
gem 'yajl-ruby' # Better JSON parser regarding memory usage
gem 'terminal-table', '>=1.6.0'
gem 'ruby-progressbar', '>=1.6.0'
gem 'xmlrpc'
group :test do
gem 'webmock', '>=1.17.2'

View File

@@ -96,7 +96,9 @@ end
def update_required?
date = last_update
(true if date.nil?) or (date < 5.days.ago)
day_seconds = 24 * 60 * 60
five_days_ago = Time.now - (5 * day_seconds)
(true if date.nil?) or (date < five_days_ago)
end
# Define colors

View File

@@ -35,16 +35,3 @@ class Numeric
s.sub(/\.?0*$/, ' ' + units[e])
end
end
# time calculations
class Fixnum
SECONDS_IN_DAY = 24 * 60 * 60
def days
self * SECONDS_IN_DAY
end
def ago
Time.now - self
end
end