cms_scanner 0.10.1 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/headers.rb +1 -1
- data/lib/cms_scanner/finders/base_finders.rb +2 -2
- data/lib/cms_scanner/finders/finder/breadth_first_dictionary_attack.rb +3 -1
- data/lib/cms_scanner/finders/finder/enumerator.rb +1 -1
- data/lib/cms_scanner/progressbar_null_output.rb +1 -1
- data/lib/cms_scanner/references.rb +2 -2
- data/lib/cms_scanner/target.rb +1 -1
- data/lib/cms_scanner/target/platform/php.rb +1 -1
- data/lib/cms_scanner/target/scope.rb +2 -2
- data/lib/cms_scanner/target/server/generic.rb +1 -1
- data/lib/cms_scanner/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16c22d4a89bddefca45e7f32b260f99c92469ad5f67ea66d1483bc27cb8b603c
|
4
|
+
data.tar.gz: 92fada2aa2d2c5109df300bffb72c2c44dec947fd2fb07d1dcc6ef106775042e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0191381badb3aeece273fc5da0b7384efbb29cc041cb3b21d5562e98263775cae3d748b895086e3f8f7d277bf34906b74ac6fcec610ff662a85835c1616b5e1
|
7
|
+
data.tar.gz: 4e41d6e2909160e17025141c6921c3a2e020943a571dd652cca9803c5801a5a56bb3105da82ebdeb44f42043a22504b14dbe0a02819fc683e223dabec9e95359
|
data/app/models/headers.rb
CHANGED
@@ -21,14 +21,14 @@ module CMSScanner
|
|
21
21
|
|
22
22
|
return symbols if mode.nil? || mode == :mixed
|
23
23
|
|
24
|
-
symbols.include?(mode) ?
|
24
|
+
symbols.include?(mode) ? Array(mode) : []
|
25
25
|
end
|
26
26
|
|
27
27
|
# @param [ CMSScanner::Finders::Finder ] finder
|
28
28
|
# @param [ Symbol ] symbol See return values of #symbols_from_mode
|
29
29
|
# @param [ Hash ] opts
|
30
30
|
def run_finder(finder, symbol, opts)
|
31
|
-
|
31
|
+
Array(finder.send(symbol, opts.merge(found: findings))).compact.each do |found|
|
32
32
|
findings << found
|
33
33
|
end
|
34
34
|
end
|
@@ -105,8 +105,10 @@ module CMSScanner
|
|
105
105
|
"No response from remote server. WAF/IPS? (#{response.return_message})"
|
106
106
|
elsif response.code.to_s.start_with?('50')
|
107
107
|
'Server error, try reducing the number of threads.'
|
108
|
-
|
108
|
+
elsif NS::ParsedCli.verbose?
|
109
109
|
"Unknown response received Code: #{response.code}\nBody: #{response.body}"
|
110
|
+
else
|
111
|
+
"Unknown response received Code: #{response.code}"
|
110
112
|
end
|
111
113
|
|
112
114
|
progress_bar.log("Error: #{error}")
|
@@ -55,7 +55,7 @@ module CMSScanner
|
|
55
55
|
# @return [ Typhoeus::Response, nil ]
|
56
56
|
def maybe_get_full_response(head_res, opts)
|
57
57
|
return head_res unless opts[:check_full_response] == true ||
|
58
|
-
|
58
|
+
Array(opts[:check_full_response]).include?(head_res.code)
|
59
59
|
|
60
60
|
full_res = NS::Browser.get(head_res.effective_url, full_request_params)
|
61
61
|
|
@@ -21,9 +21,9 @@ module CMSScanner
|
|
21
21
|
next unless refs.key?(key)
|
22
22
|
|
23
23
|
@references[key] = if key == :youtube
|
24
|
-
|
24
|
+
Array(refs[:youtube]).map { |id| youtube_url(id) }
|
25
25
|
else
|
26
|
-
|
26
|
+
Array(refs[key]).map(&:to_s)
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
data/lib/cms_scanner/target.rb
CHANGED
@@ -5,7 +5,7 @@ module CMSScanner
|
|
5
5
|
module Platform
|
6
6
|
# Some PHP specific implementation
|
7
7
|
module PHP
|
8
|
-
DEBUG_LOG_PATTERN = /(?:\[\d{2}
|
8
|
+
DEBUG_LOG_PATTERN = /(?:\[\d{2}-[a-zA-Z]{3}-\d{4}\s\d{2}:\d{2}:\d{2}\s[A-Z]{3}\]|
|
9
9
|
PHP\s(?:Fatal|Warning|Strict|Error|Notice):)/x.freeze
|
10
10
|
FPD_PATTERN = /Fatal error:.+? in (.+?) on/.freeze
|
11
11
|
ERROR_LOG_PATTERN = /PHP Fatal error/i.freeze
|
@@ -53,9 +53,9 @@ module CMSScanner
|
|
53
53
|
domains = [uri.host + uri.path]
|
54
54
|
|
55
55
|
domains += if scope.domains.empty?
|
56
|
-
|
56
|
+
Array(scope.invalid_domains[1..-1])
|
57
57
|
else
|
58
|
-
|
58
|
+
Array(scope.domains[1..-1]).map(&:to_s) + scope.invalid_domains
|
59
59
|
end
|
60
60
|
|
61
61
|
domains.map! { |d| Regexp.escape(d.delete_suffix('/')).gsub('\*', '.*').gsub('/', '\\\\\?/') }
|
@@ -41,7 +41,7 @@ module CMSScanner
|
|
41
41
|
def directory_listing?(path = nil, params = {})
|
42
42
|
res = NS::Browser.get(url(path), params)
|
43
43
|
|
44
|
-
res.code == 200 && res.body
|
44
|
+
res.code == 200 && res.body.include?('<h1>Index of') ? true : false
|
45
45
|
end
|
46
46
|
|
47
47
|
# @param [ String ] path
|
data/lib/cms_scanner/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cms_scanner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- WPScanTeam
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: get_process_mem
|
@@ -204,28 +204,28 @@ dependencies:
|
|
204
204
|
requirements:
|
205
205
|
- - "~>"
|
206
206
|
- !ruby/object:Gem::Version
|
207
|
-
version: 0.
|
207
|
+
version: 0.88.0
|
208
208
|
type: :development
|
209
209
|
prerelease: false
|
210
210
|
version_requirements: !ruby/object:Gem::Requirement
|
211
211
|
requirements:
|
212
212
|
- - "~>"
|
213
213
|
- !ruby/object:Gem::Version
|
214
|
-
version: 0.
|
214
|
+
version: 0.88.0
|
215
215
|
- !ruby/object:Gem::Dependency
|
216
216
|
name: rubocop-performance
|
217
217
|
requirement: !ruby/object:Gem::Requirement
|
218
218
|
requirements:
|
219
219
|
- - "~>"
|
220
220
|
- !ruby/object:Gem::Version
|
221
|
-
version: 1.
|
221
|
+
version: 1.7.0
|
222
222
|
type: :development
|
223
223
|
prerelease: false
|
224
224
|
version_requirements: !ruby/object:Gem::Requirement
|
225
225
|
requirements:
|
226
226
|
- - "~>"
|
227
227
|
- !ruby/object:Gem::Version
|
228
|
-
version: 1.
|
228
|
+
version: 1.7.0
|
229
229
|
- !ruby/object:Gem::Dependency
|
230
230
|
name: simplecov
|
231
231
|
requirement: !ruby/object:Gem::Requirement
|