Detect local changes before a git update. See issue #75.

This commit is contained in:
ethicalhack3r
2013-01-13 20:06:20 +01:00
parent 7522a44b0a
commit ecaf0894dd
3 changed files with 30 additions and 0 deletions

View File

@@ -39,6 +39,10 @@ begin
# Check for updates
if wpscan_options.update
unless @updater.nil?
if @updater.has_local_changes?
puts "#{red('[!]')} Local file changes detected, an update will override local changes, do you want to continue updating? [y/n]"
Readline.readline =~ /^y/i ? @updater.reset_head : raise('Update aborted')
end
puts @updater.update()
else
puts "Svn / Git not installed, or wpscan has not been installed with one of them."