Fixes potential InvalidProgressBar error in Pwd Attack

This commit is contained in:
Erwan
2020-04-27 09:15:37 +02:00
committed by GitHub
parent 1cd8e6bad7
commit 8def256d7e

View File

@@ -76,12 +76,15 @@ module WPScan
break
end
begin
progress_bar.total = progress_bar.progress + ((passwords.size - wordlist_index) / current_passwords_size.round(1)).ceil
rescue ProgressBar::InvalidProgressError
end
end
end
# Maybe a progress_bar.stop ?
end
# rubocop:disable all
# rubocop:enable all
def passwords_size(max_passwords, users_size)
return 1 if max_passwords < users_size