Skip to content

Commit 4410f8d

Browse files
committed
Clean up module some more
1 parent 1d63009 commit 4410f8d

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

modules/auxiliary/scanner/couchdb/couchdb_enum.rb

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,16 @@ def initialize(info = {})
1414
super(update_info(info,
1515
'Name' => 'CouchDB Enum Utility',
1616
'Description' => %q{
17-
This module enumerates databases and your values on CouchDB
18-
(without authentication by default). It uses the REST API
19-
in order to make it.
17+
This module enumerates databases on CouchDB using the REST API
18+
(without authentication by default).
2019
},
21-
'References' =>
20+
'References' =>
2221
[
2322
['URL', 'https://wiki.apache.org/couchdb/HTTP_database_API']
2423
],
2524
'Author' => [ 'Roberto Soares Espreto <robertoespreto[at]gmail.com>' ],
2625
'License' => MSF_LICENSE
27-
))
26+
))
2827

2928
register_options(
3029
[
@@ -40,20 +39,19 @@ def run
4039
password = datastore['PASSWORD']
4140

4241
begin
43-
res = send_request_cgi({
42+
res = send_request_cgi(
4443
'uri' => normalize_uri(target_uri.path),
4544
'method' => 'GET',
4645
'authorization' => basic_auth(username, password)
47-
})
46+
)
4847

4948
temp = JSON.parse(res.body)
5049
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, JSON::ParserError => e
5150
print_error("#{peer} - The following Error was encountered: #{e.class}")
5251
return
5352
end
5453

55-
if res.code == 200 && res.headers['Server'] =~ /CouchDB/
56-
54+
if res.code == 200 && res.headers['Server'].include?('CouchDB')
5755
print_status('Enumerating...')
5856
results = JSON.pretty_generate(temp)
5957
print_good("Found:\n\n#{results}\n")

0 commit comments

Comments
 (0)