fixed progress_bar scope

This commit is contained in:
jamesalbert
2017-04-11 03:09:24 -07:00
parent 9d7f35f3b2
commit beec0bd35a

View File

@@ -52,7 +52,12 @@ class WpUser < WpItem
request = login_request(password, redirect_url)
request.on_complete do |response|
progress_bar.progress += 1 if options[:show_progression] && !found
if options[:show_progression] && !found
progress_bar.progress += 1
if progress_bar.progress.fdiv(progress_bar.total) >= 0.8
progress_bar.total *= 2
end
end
progress_bar.log(" Trying Username: #{login} Password: #{password}") if options[:verbose]
@@ -60,8 +65,6 @@ class WpUser < WpItem
found = true
self.password = password
return
elsif progress_bar.progress.fdiv(progress_bar.total) >= 0.8
progress_bar.total *= 2
end
end