Misc wording fixes

This commit is contained in:
g0tmi1k
2018-05-09 13:14:41 +01:00
parent e437b952da
commit 2c40913a64
3 changed files with 6 additions and 4 deletions

View File

@@ -95,6 +95,7 @@ def last_update
date
end
# Was it 5 days ago?
def update_required?
date = last_update
day_seconds = 24 * 60 * 60

View File

@@ -49,7 +49,7 @@ def usage
puts '-Use custom plugins directory ...'
puts "ruby #{script_name} -u www.example.com --wp-plugins-dir wp-content/custom-plugins"
puts
puts '-Update the DB ...'
puts '-Update the Database ...'
puts "ruby #{script_name} --update"
puts
puts '-Debug output ...'

View File

@@ -85,9 +85,10 @@ 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
# also no need to check if the user supplied the --update switch
# Check if db file needs upgrade (older than 5 days) and we are not running in --batch mode
# Also no need to check if the user supplied the --update switch
if update_required? && !wpscan_options.batch && !wpscan_options.update
puts
puts notice('It seems like you have not updated the database for some time.')
puts notice("Last database update: #{date.strftime('%Y-%m-%d')}") unless date.nil?
print '[?] Do you want to update now? [Y]es [N]o [A]bort, default: [N] > '
@@ -98,7 +99,7 @@ def main
exit(1)
else
if missing_db_file?
puts critical('You can not run a scan without any databases. Extract the data.zip file.')
puts critical('You can not run a scan without any databases. Manually extract the data.zip file.')
exit(1)
end
end