fixed progress_bar scope
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user