warn the user to update his DB files

This commit is contained in:
Christian Mehlmauer
2015-05-01 11:29:03 +02:00
parent 0d806e6d74
commit 202180909c
4 changed files with 37 additions and 1 deletions

View File

@@ -45,6 +45,18 @@ def main
wpscan_options.to_h.merge(max_threads: wpscan_options.threads)
)
# check if db file needs upgrade and we are not running in batch mode
if update_required? && !wpscan_options.batch
puts "#{notice('[i]')} It seems like you have not updated the database for some time."
print '[?] Do you want to update now? [Y]es [N]o [A]bort, default: [N]'
if (input = Readline.readline) =~ /^y/i
wpscan_options.update = true
elsif input =~ /^a/i
puts 'Scan aborted'
exit(0)
end
end
if wpscan_options.update || missing_db_file?
puts "#{notice('[i]')} Updating the Database ..."
DbUpdater.new(DATA_DIR).update(wpscan_options.verbose)