cms_scanner 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b19b3a68532625a8d0e1fc5687cebd6da0733cb2cabb03b318c2b419e49eebb
4
- data.tar.gz: 5e27c2b4c2a7095c33d61ff23be5489860ec440b217a3d95ebb2f0af2c171b29
3
+ metadata.gz: b99be1a5c9ca5480c3144bd7bf47158131b37d2384d0efdead0af974823e2f91
4
+ data.tar.gz: ca62945912501cca054acda5c3567428f6d5952ed144f27115ecfd7ac38a8d24
5
5
  SHA512:
6
- metadata.gz: 8339b08beac086a1370d7ed19539929106325ae8a441db57989069abafce5edc871830f0a4464b5c67324fdeceabda905a080c84637c93c144f451b6e6a50258
7
- data.tar.gz: f7216589aba47dd8cccad16ba17ad637b6bca2bdbd4e6ea3f8ed71ad0a9a57fc63540ad2345f98c62a8dc2354e61ca1eb256662a0943d46c36d92650ca5e0b15
6
+ metadata.gz: 92eefec3cc72a884f139077782486ba2bff6716f54566952f0f7d996400deeedc04131f704a2d0e63ba47d9eaaefe2ef8390cc98f411ccb231c876f3ff52c23c
7
+ data.tar.gz: 559ea905b19ec7657242e6a0ea4977dcc3f34b2e0159fab086496b138c8916df5b5920723ab0ea621c7141752ce6fc96e6191607fc3cd7c082e15ea5c4a4bce2
@@ -9,7 +9,7 @@ module CMSScanner
9
9
  module ClassMethods
10
10
  # @return [ Array<Symbol> ]
11
11
  def references_keys
12
- @references_keys ||= %i[cve exploitdb url metasploit packetstorm securityfocus]
12
+ @references_keys ||= %i[cve exploitdb url metasploit packetstorm securityfocus youtube]
13
13
  end
14
14
  end
15
15
 
@@ -18,7 +18,13 @@ module CMSScanner
18
18
  @references = {}
19
19
 
20
20
  self.class.references_keys.each do |key|
21
- @references[key] = [*refs[key]].map(&:to_s) if refs.key?(key)
21
+ next unless refs.key?(key)
22
+
23
+ @references[key] = if key == :youtube
24
+ [*refs[:youtube]].map { |id| youtube_url(id) }
25
+ else
26
+ [*refs[key]].map(&:to_s)
27
+ end
22
28
  end
23
29
  end
24
30
 
@@ -30,7 +36,7 @@ module CMSScanner
30
36
  # @return [ Array<String> ] All the references URLs
31
37
  def references_urls
32
38
  cve_urls + exploitdb_urls + urls + msf_urls +
33
- packetstorm_urls + securityfocus_urls
39
+ packetstorm_urls + securityfocus_urls + youtube_urls
34
40
  end
35
41
 
36
42
  # @return [ Array<String> ] The CVEs
@@ -112,5 +118,15 @@ module CMSScanner
112
118
  def securityfocus_url(id)
113
119
  "https://www.securityfocus.com/bid/#{id}/"
114
120
  end
121
+
122
+ # @return [ Array<String> ]
123
+ def youtube_urls
124
+ references[:youtube] || []
125
+ end
126
+
127
+ # @return [ String ]
128
+ def youtube_url(id)
129
+ "https://www.youtube.com/watch?v=#{id}"
130
+ end
115
131
  end
116
132
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Version
4
4
  module CMSScanner
5
- VERSION = '0.9.0'
5
+ VERSION = '0.10.0'
6
6
  end
@@ -5,22 +5,27 @@ module CMSScanner
5
5
  class Vulnerability
6
6
  include References
7
7
 
8
- attr_reader :title, :type, :fixed_in
8
+ attr_reader :title, :type, :fixed_in, :cvss
9
9
 
10
10
  # @param [ String ] title
11
11
  # @param [ Hash ] references
12
- # @option references [ Array<String>, String ] cve
13
- # @option references [ Array<String>, String ] secunia
14
- # @option references [ Array<String>, String ] osvdb
15
- # @option references [ Array<String>, String ] exploitdb
16
- # @option references [ Array<String> ] url URL(s) to related advisories etc
17
- # @option references [ Array<String>, String ] metasploit The related metasploit module(s)
12
+ # @option references [ Array<String>, String ] :cve
13
+ # @option references [ Array<String>, String ] :secunia
14
+ # @option references [ Array<String>, String ] :osvdb
15
+ # @option references [ Array<String>, String ] :exploitdb
16
+ # @option references [ Array<String> ] :url URL(s) to related advisories etc
17
+ # @option references [ Array<String>, String ] :metasploit The related metasploit module(s)
18
+ # @option references [ Array<String> ] :youtube
18
19
  # @param [ String ] type
19
20
  # @param [ String ] fixed_in
20
- def initialize(title, references = {}, type = nil, fixed_in = nil)
21
+ # @param [ HashSymbol ] cvss
22
+ # @option cvss [ String ] :score
23
+ # @option cvss [ String ] :vector
24
+ def initialize(title, references: {}, type: nil, fixed_in: nil, cvss: nil)
21
25
  @title = title
22
26
  @type = type
23
27
  @fixed_in = fixed_in
28
+ @cvss = { score: cvss[:score], vector: cvss[:vector] } if cvss
24
29
 
25
30
  self.references = references
26
31
  end
@@ -32,7 +37,8 @@ module CMSScanner
32
37
  title == other.title &&
33
38
  type == other.type &&
34
39
  references == other.references &&
35
- fixed_in == other.fixed_in
40
+ fixed_in == other.fixed_in &&
41
+ cvss == other.cvss
36
42
  end
37
43
  end
38
44
  end
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.9.0
4
+ version: 0.10.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-04-12 00:00:00.000000000 Z
11
+ date: 2020-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: get_process_mem