Merge branch 'master' of github.com:wpscanteam/wpscan
This commit is contained in:
@@ -260,6 +260,7 @@ Published on https://hub.docker.com/r/wpscanteam/wpscan/
|
|||||||
--proxy-auth <username:password> Supply the proxy login credentials.
|
--proxy-auth <username:password> Supply the proxy login credentials.
|
||||||
--basic-auth <username:password> Set the HTTP Basic authentication.
|
--basic-auth <username:password> Set the HTTP Basic authentication.
|
||||||
--wordlist | -w <wordlist> Supply a wordlist for the password brute forcer.
|
--wordlist | -w <wordlist> Supply a wordlist for the password brute forcer.
|
||||||
|
If the "-" option is supplied, the wordlist is expected via STDIN.
|
||||||
--username | -U <username> Only brute force the supplied username.
|
--username | -U <username> Only brute force the supplied username.
|
||||||
--usernames <path-to-file> Only brute force the usernames from the file.
|
--usernames <path-to-file> Only brute force the usernames from the file.
|
||||||
--cache-dir <cache-directory> Set the cache directory.
|
--cache-dir <cache-directory> Set the cache directory.
|
||||||
@@ -283,6 +284,10 @@ Do wordlist password brute force on enumerated users using 50 threads...
|
|||||||
|
|
||||||
```ruby wpscan.rb --url www.example.com --wordlist darkc0de.lst --threads 50```
|
```ruby wpscan.rb --url www.example.com --wordlist darkc0de.lst --threads 50```
|
||||||
|
|
||||||
|
Do wordlist password brute force on enumerated users using STDIN as the wordlist...
|
||||||
|
|
||||||
|
```crunch 5 13 -f charset.lst mixalpha | ruby wpscan.rb --url www.example.com --wordlist -```
|
||||||
|
|
||||||
Do wordlist password brute force on the 'admin' username only...
|
Do wordlist password brute force on the 'admin' username only...
|
||||||
|
|
||||||
```ruby wpscan.rb --url www.example.com --wordlist darkc0de.lst --username admin```
|
```ruby wpscan.rb --url www.example.com --wordlist darkc0de.lst --username admin```
|
||||||
|
|||||||
@@ -28,9 +28,18 @@ class WpUser < WpItem
|
|||||||
queue_count = 0
|
queue_count = 0
|
||||||
found = false
|
found = false
|
||||||
|
|
||||||
create_progress_bar(count_file_lines(wordlist)+1, options)
|
if wordlist == '-'
|
||||||
|
words = ARGF
|
||||||
|
passwords_size = 10
|
||||||
|
options[:starting_at] = 0
|
||||||
|
else
|
||||||
|
words = File.open(wordlist)
|
||||||
|
passwords_size = count_file_lines(wordlist)+1
|
||||||
|
end
|
||||||
|
|
||||||
File.open(wordlist).each do |password|
|
create_progress_bar(passwords_size, options)
|
||||||
|
|
||||||
|
words.each do |password|
|
||||||
password.chomp!
|
password.chomp!
|
||||||
|
|
||||||
# A successfull login will redirect us to the redirect_to parameter
|
# A successfull login will redirect us to the redirect_to parameter
|
||||||
@@ -43,7 +52,13 @@ class WpUser < WpItem
|
|||||||
request = login_request(password, redirect_url)
|
request = login_request(password, redirect_url)
|
||||||
|
|
||||||
request.on_complete do |response|
|
request.on_complete do |response|
|
||||||
progress_bar.progress += 1 if options[:show_progression] && !found
|
if options[:show_progression] && !found
|
||||||
|
progress_bar.progress += 1
|
||||||
|
percentage = progress_bar.progress.fdiv(progress_bar.total)
|
||||||
|
if options[:starting_at] && percentage >= 0.8
|
||||||
|
progress_bar.total *= 2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
progress_bar.log(" Trying Username: #{login} Password: #{password}") if options[:verbose]
|
progress_bar.log(" Trying Username: #{login} Password: #{password}") if options[:verbose]
|
||||||
|
|
||||||
@@ -79,7 +94,8 @@ class WpUser < WpItem
|
|||||||
@progress_bar = ProgressBar.create(
|
@progress_bar = ProgressBar.create(
|
||||||
format: '%t %a <%B> (%c / %C) %P%% %e',
|
format: '%t %a <%B> (%c / %C) %P%% %e',
|
||||||
title: " Brute Forcing '#{login}'",
|
title: " Brute Forcing '#{login}'",
|
||||||
total: passwords_size
|
total: passwords_size,
|
||||||
|
starting_at: options[:starting_at]
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -118,7 +134,7 @@ class WpUser < WpItem
|
|||||||
elsif response.code.to_s =~ /^50/
|
elsif response.code.to_s =~ /^50/
|
||||||
progression = critical('ERROR: Server error, try reducing the number of threads or use the --throttle option.')
|
progression = critical('ERROR: Server error, try reducing the number of threads or use the --throttle option.')
|
||||||
else
|
else
|
||||||
progression = critical("ERROR: We received an unknown response for #{password}...")
|
progression = critical("ERROR: We received an unknown response for login: #{login} and password: #{password}")
|
||||||
verbose = critical(" Code: #{response.code}\n Body: #{response.body}\n")
|
verbose = critical(" Code: #{response.code}\n Body: #{response.body}\n")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class WpscanOptions
|
|||||||
end
|
end
|
||||||
|
|
||||||
def wordlist=(wordlist)
|
def wordlist=(wordlist)
|
||||||
if File.exists?(wordlist)
|
if File.exists?(wordlist) || wordlist == '-'
|
||||||
@wordlist = wordlist
|
@wordlist = wordlist
|
||||||
else
|
else
|
||||||
raise "The file #{wordlist} does not exist"
|
raise "The file #{wordlist} does not exist"
|
||||||
|
|||||||
Reference in New Issue
Block a user