Skip to content

Commit 3d7c9a9

Browse files
committed
Changed the path from TARGETURI
1 parent 7a7f4a1 commit 3d7c9a9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

modules/auxiliary/scanner/couchdb/couchdb_login.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def initialize(info={})
2323
register_options(
2424
[
2525
Opt::RPORT(5984),
26-
OptString.new('TARGETURI', [true, "TARGETURI for CouchDB. Default here is /_users/_all_docs", "/_users/_all_docs"]),
26+
OptString.new('TARGETURI', [false, "TARGETURI for CouchDB. Default here is /_users/_all_docs", "/"]),
2727
OptPath.new('USERPASS_FILE', [ false, "File containing users and passwords separated by space, one pair per line",
2828
File.join(Msf::Config.install_root, "data", "wordlists", "http_default_userpass.txt") ]),
2929
OptPath.new('USER_FILE', [ false, "File containing users, one per line",
@@ -40,8 +40,9 @@ def run_host(ip)
4040

4141
vprint_status("#{rhost}:#{rport} - Trying to login with '#{user}' : '#{pass}'")
4242

43+
uri = target_uri.path
4344
res = send_request_cgi({
44-
'uri' => normalize_uri(datastore['TARGETURI']),
45+
'uri' => normalize_uri(uri, '_users/_all_docs'),
4546
'method' => 'GET',
4647
'authorization' => basic_auth(user, pass)
4748
})
@@ -66,9 +67,10 @@ def run_host(ip)
6667
def do_login(user, pass)
6768
vprint_status("Trying username:'#{user}' with password:'#{pass}'")
6869
begin
70+
uri = target_uri.path
6971
res = send_request_cgi(
7072
{
71-
'uri' => normalize_uri(datastore['TARGETURI']),
73+
'uri' => normalize_uri(uri, '_users/_all_docs'),
7274
'method' => 'GET',
7375
'ctype' => 'text/plain',
7476
'authorization' => basic_auth(user, pass)

0 commit comments

Comments
 (0)