cms_scanner 0.13.0 → 0.13.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 72a6af6653b611521780cf690b877be65574e84416fd85f6cb510252cbd63f37
4
- data.tar.gz: 9004450478afb99a08c26e7fc6256d4c614491fe2fae1c91cf23a95d36583f5c
3
+ metadata.gz: d7cac4c9125791a009eef019b5ef6ccb107ecad9123813925ac8bd42f07d4fd4
4
+ data.tar.gz: b15f005bad40382d40ef86e065da7ec0be65df295ab8e2cb9cffcf364c9e990c
5
5
  SHA512:
6
- metadata.gz: 23a881867063dc089d9bc6efe581c3e631ead8ac0b09408d085ba54d4cd5584da9988cc947dbdeb707a2b74bfde3408c1e48f025942d782e7427ccf64d6380f1
7
- data.tar.gz: 0cda187347c63f48bb1bea47f2cb2d45089aa38aaa885e6c5a4e32384409e7b2eb71453187b7db0531e1850ed3d48390cd823b53fcd93e7f531ee386cd9646a1
6
+ metadata.gz: b77289442e06fafc7510db531c1b8e3288370aed6d605b3851105800c770ae1fb8bbbaf172cf5b99f413537bf5f71a18fe9f431740a7066929dd2dc778114291
7
+ data.tar.gz: 4472f7df03531464cbed7d4f14b48d769735eb3deb2a56fcb6386f0001d61dbac08375a3e4cb78c205eeb9cf7fd0eb37250ae0e0364595a628ff83b2adf4787e
@@ -59,6 +59,8 @@ module CMSScanner
59
59
 
60
60
  full_res = NS::Browser.get(head_res.effective_url, full_request_params)
61
61
 
62
+ return unless valid_response_codes.include?(full_res.code)
63
+
62
64
  return if target.homepage_or_404?(full_res) ||
63
65
  opts[:exclude_content] && full_res.body&.match(opts[:exclude_content])
64
66
 
@@ -86,7 +86,7 @@ module CMSScanner
86
86
 
87
87
  # @return [ String ] The URL to the metasploit module page
88
88
  def msf_url(mod)
89
- "https://www.rapid7.com/db/modules/#{mod.sub(%r{^/}, '')}"
89
+ "https://www.rapid7.com/db/modules/#{mod.sub(%r{^/}, '')}/"
90
90
  end
91
91
 
92
92
  # @return [ Array<String> ] The Packetstormsecurity IDs
@@ -29,12 +29,15 @@ module CMSScanner
29
29
  rescue NoMemoryError, ScriptError, SecurityError, SignalException, StandardError, SystemStackError => e
30
30
  @run_error = e
31
31
 
32
- formatter.output('@scan_aborted',
33
- url: controllers.first.target.url,
34
- reason: e.is_a?(Interrupt) ? 'Canceled by User' : e.message,
35
- trace: e.backtrace,
36
- verbose: NS::ParsedCli.verbose ||
37
- run_error_exit_code == NS::ExitCode::EXCEPTION)
32
+ output_params = {
33
+ reason: e.is_a?(Interrupt) ? 'Canceled by User' : e.message,
34
+ trace: e.backtrace,
35
+ verbose: NS::ParsedCli.verbose || run_error_exit_code == NS::ExitCode::EXCEPTION
36
+ }
37
+
38
+ output_params[:url] = controllers.first.target.url if NS::ParsedCli.url
39
+
40
+ formatter.output('@scan_aborted', output_params)
38
41
  ensure
39
42
  formatter.beautify
40
43
  end
@@ -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.include?('<h1>Index of') ? true : false
44
+ res.code == 200 && res.body.include?('<h1>Index of')
45
45
  end
46
46
 
47
47
  # @param [ String ] path
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Version
4
4
  module CMSScanner
5
- VERSION = '0.13.0'
5
+ VERSION = '0.13.5'
6
6
  end
@@ -5,7 +5,7 @@ module CMSScanner
5
5
  class Vulnerability
6
6
  include References
7
7
 
8
- attr_reader :title, :type, :fixed_in, :cvss
8
+ attr_reader :title, :type, :fixed_in, :introduced_in, :cvss
9
9
 
10
10
  # @param [ String ] title
11
11
  # @param [ Hash ] references
@@ -18,14 +18,16 @@ module CMSScanner
18
18
  # @option references [ Array<String> ] :youtube
19
19
  # @param [ String ] type
20
20
  # @param [ String ] fixed_in
21
+ # @param [ String ] introduced_in
21
22
  # @param [ HashSymbol ] cvss
22
23
  # @option cvss [ String ] :score
23
24
  # @option cvss [ String ] :vector
24
- def initialize(title, references: {}, type: nil, fixed_in: nil, cvss: nil)
25
- @title = title
26
- @type = type
27
- @fixed_in = fixed_in
28
- @cvss = { score: cvss[:score], vector: cvss[:vector] } if cvss
25
+ def initialize(title, references: {}, type: nil, fixed_in: nil, introduced_in: nil, cvss: nil)
26
+ @title = title
27
+ @type = type
28
+ @fixed_in = fixed_in
29
+ @introduced_in = introduced_in
30
+ @cvss = { score: cvss[:score], vector: cvss[:vector] } if cvss
29
31
 
30
32
  self.references = references
31
33
  end
@@ -8,19 +8,20 @@ module CMSScanner
8
8
  # @param [ String ] site_url
9
9
  # @param [ Hash ] opts
10
10
  def initialize(site_url, opts = {})
11
- self.url = +site_url
11
+ self.url = site_url
12
12
  @opts = opts
13
13
  end
14
14
 
15
15
  def url=(site_url)
16
- # Add a trailing slash to the site url
17
- # Making also sure the site_url is unfrozen
18
- +site_url << '/' if site_url[-1, 1] != '/'
16
+ new_url = site_url.dup
19
17
 
20
- # Use the validator to ensure the site_url has a correct format
21
- OptParseValidator::OptURL.new([]).validate(site_url)
18
+ # Add a trailing slash to the URL
19
+ new_url << '/' if new_url[-1, 1] != '/'
22
20
 
23
- @uri = Addressable::URI.parse(site_url).normalize
21
+ # Use the validator to ensure the URL has a correct format
22
+ OptParseValidator::OptURL.new([]).validate(new_url)
23
+
24
+ @uri = Addressable::URI.parse(new_url).normalize
24
25
  end
25
26
 
26
27
  # @param [ String ] path Optional path to merge with the uri
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.13.0
4
+ version: 0.13.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - WPScanTeam
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-12 00:00:00.000000000 Z
11
+ date: 2021-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: get_process_mem
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.11.0
33
+ version: 1.11.4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.11.0
40
+ version: 1.11.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: opt_parse_validator
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.9.3
47
+ version: 1.9.4
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.9.3
54
+ version: 1.9.4
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: public_suffix
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -106,6 +106,20 @@ dependencies:
106
106
  - - "<"
107
107
  - !ruby/object:Gem::Version
108
108
  version: '1.5'
109
+ - !ruby/object:Gem::Dependency
110
+ name: ethon
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - "~>"
114
+ - !ruby/object:Gem::Version
115
+ version: 0.14.0
116
+ type: :runtime
117
+ prerelease: false
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - "~>"
121
+ - !ruby/object:Gem::Version
122
+ version: 0.14.0
109
123
  - !ruby/object:Gem::Dependency
110
124
  name: xmlrpc
111
125
  requirement: !ruby/object:Gem::Requirement
@@ -210,28 +224,28 @@ dependencies:
210
224
  requirements:
211
225
  - - "~>"
212
226
  - !ruby/object:Gem::Version
213
- version: 1.8.0
227
+ version: 1.16.0
214
228
  type: :development
215
229
  prerelease: false
216
230
  version_requirements: !ruby/object:Gem::Requirement
217
231
  requirements:
218
232
  - - "~>"
219
233
  - !ruby/object:Gem::Version
220
- version: 1.8.0
234
+ version: 1.16.0
221
235
  - !ruby/object:Gem::Dependency
222
236
  name: rubocop-performance
223
237
  requirement: !ruby/object:Gem::Requirement
224
238
  requirements:
225
239
  - - "~>"
226
240
  - !ruby/object:Gem::Version
227
- version: 1.9.0
241
+ version: 1.11.0
228
242
  type: :development
229
243
  prerelease: false
230
244
  version_requirements: !ruby/object:Gem::Requirement
231
245
  requirements:
232
246
  - - "~>"
233
247
  - !ruby/object:Gem::Version
234
- version: 1.9.0
248
+ version: 1.11.0
235
249
  - !ruby/object:Gem::Dependency
236
250
  name: simplecov
237
251
  requirement: !ruby/object:Gem::Requirement
@@ -266,17 +280,17 @@ dependencies:
266
280
  requirements:
267
281
  - - "~>"
268
282
  - !ruby/object:Gem::Version
269
- version: 3.11.0
283
+ version: 3.13.0
270
284
  type: :development
271
285
  prerelease: false
272
286
  version_requirements: !ruby/object:Gem::Requirement
273
287
  requirements:
274
288
  - - "~>"
275
289
  - !ruby/object:Gem::Version
276
- version: 3.11.0
290
+ version: 3.13.0
277
291
  description: Framework to provide an easy way to implement CMS Scanners
278
292
  email:
279
- - team@wpscan.org
293
+ - contact@wpscan.com
280
294
  executables: []
281
295
  extensions: []
282
296
  extra_rdoc_files: []
@@ -393,7 +407,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
393
407
  - !ruby/object:Gem::Version
394
408
  version: '0'
395
409
  requirements: []
396
- rubygems_version: 3.0.3
410
+ rubygems_version: 3.0.3.1
397
411
  signing_key:
398
412
  specification_version: 4
399
413
  summary: CMS Scanner Framework (experimental)