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

@@ -37,6 +37,16 @@ def main
exit(0)
end
# Initialize the browser to allow the db update
# to be done over a proxy if set
Browser.instance(
wpscan_options.to_h.merge(max_threads: wpscan_options.threads)
)
update_db if wpscan_options.update || missing_db_file?
exit
# Check for updates
if wpscan_options.update
if !@updater.nil?
@@ -50,10 +60,6 @@ def main
puts "#{red('[!]')} Update aborted"
end
puts 'Updating the DB ...'
DbUpdater.new(DATA_DIR).update
puts 'Done.'
exit(0)
end