Adds the db update system

This commit is contained in:
erwanlr
2014-09-12 12:43:06 +02:00
parent fb46fd7101
commit 91de353307
8 changed files with 50 additions and 22 deletions

View File

@@ -87,6 +87,19 @@ def version
REVISION ? "v#{WPSCAN_VERSION}r#{REVISION}" : "v#{WPSCAN_VERSION}"
end
def missing_db_file?
DbUpdater::FILES.each do |db_file|
return true unless File.exist?(File.join(DATA_DIR, db_file))
end
false
end
def update_db
print 'Updating the DB ...'
DbUpdater.new(DATA_DIR).update
puts ' Done.'
end
# Define colors
def colorize(text, color_code)
if $COLORSWITCH