cms_scanner 0.0.41.6 → 0.0.41.7

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: e0ba19ae63f6644e591f38bf69e39d2bc6717b71d892b1d255a133bb4e29149f
4
- data.tar.gz: b11a64efcd5903fa221b35736b4dc51da3a46c72d0b85ac3fb112617005cfa7e
3
+ metadata.gz: 1ef5c1be437dab12929beff0312f7a646e817ec341b373afb34d045b57c290cf
4
+ data.tar.gz: f042c79b8da022d7da271fd3fd2a1aef14fc5226ebaf441ec7c45acc161508cc
5
5
  SHA512:
6
- metadata.gz: 5693b64ed449e3c32a3b5926f0e30d6562de3ad1d745cc739b728dbb2df1cdbb0a43b9840ae1b4b227c1c8d118502748f6c073952fcf7b74bbb6e904aa84b447
7
- data.tar.gz: edadc773c671d96f5d39e1ce48260d38dc803e0ca4e0eb47a0da3e53d3221df31c984fdf733a47f1779eb3454618443a2eb9ba60704634b60eb64ec9f7020fb8
6
+ metadata.gz: 23e084bee6d6aa6c1114d2623a8605a1de9a335b4faaf1ef581901ea628918b13d2517f2bdbe20e0a362cfd4948856a69101d2312091bee6be918353ae79e9fc
7
+ data.tar.gz: af876b5704a2f8d30f929300cd10f6cfbe900737b0249b8f5921df3a36aa1769942a2c92f4797c5fce3eaa9f407cbb19a36562fa4376bd8ba3ee2ddb86b09d06
@@ -27,12 +27,12 @@ module CMSScanner
27
27
  end
28
28
 
29
29
  # Weteher or not vulnerabilities have been found.
30
- # Used to set the exit code of the script
30
+ # Used to set the exit code of the scanner
31
31
  # and it should be overriden in the implementation
32
32
  #
33
33
  # @return [ Boolean ]
34
34
  def vulnerable?
35
- false
35
+ raise NotImplementedError
36
36
  end
37
37
 
38
38
  # @param [ String ] xpath
@@ -1,4 +1,4 @@
1
1
  # Version
2
2
  module CMSScanner
3
- VERSION = '0.0.41.6'.freeze
3
+ VERSION = '0.0.41.7'.freeze
4
4
  end
data/lib/cms_scanner.rb CHANGED
@@ -17,10 +17,8 @@ require 'timeout'
17
17
  require 'xmlrpc/client'
18
18
  # Monkey Patches
19
19
  require 'cms_scanner/typhoeus/response' # Adds a Response#html using Nokogiri to parse the body
20
- require 'cms_scanner/typhoeus/hydra' # https://github.com/typhoeus/typhoeus/issues/439
21
20
  require 'cms_scanner/public_suffix/domain' # Adds a Domain#match method and logic, used in scope stuff
22
21
  require 'cms_scanner/numeric' # Adds a Numeric#bytes_to_human
23
- require 'cms_scanner/progressbar_null_output'
24
22
  # Custom Libs
25
23
  require 'cms_scanner/helper'
26
24
  require 'cms_scanner/exit_code'
@@ -36,6 +34,7 @@ require 'cms_scanner/formatter'
36
34
  require 'cms_scanner/references'
37
35
  require 'cms_scanner/finders'
38
36
  require 'cms_scanner/vulnerability'
37
+ require 'cms_scanner/progressbar_null_output'
39
38
 
40
39
  # Module
41
40
  module CMSScanner
@@ -168,7 +167,13 @@ module CMSScanner
168
167
 
169
168
  # Hook to be able to have an exit code returned
170
169
  # depending on the findings / errors
170
+ # :nocov:
171
171
  def exit_hook
172
+ # Avoid hooking the exit when rspec is running, otherwise it will always return 0
173
+ # and Travis won't detect failed builds. Couldn't find a better way, even though
174
+ # some people managed to https://github.com/rspec/rspec-core/pull/410
175
+ return if defined?(RSpec)
176
+
172
177
  at_exit do
173
178
  exit(run_error_exit_code) if run_error
174
179
 
@@ -179,6 +184,7 @@ module CMSScanner
179
184
  exit(NS::ExitCode::OK)
180
185
  end
181
186
  end
187
+ # :nocov:
182
188
 
183
189
  # @return [ Integer ] The exit code related to the run_error
184
190
  def run_error_exit_code
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.0.41.6
4
+ version: 0.0.41.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - WPScanTeam
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-15 00:00:00.000000000 Z
11
+ date: 2019-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -315,7 +315,6 @@ files:
315
315
  - lib/cms_scanner/target/server/generic.rb
316
316
  - lib/cms_scanner/target/server/iis.rb
317
317
  - lib/cms_scanner/target/server/nginx.rb
318
- - lib/cms_scanner/typhoeus/hydra.rb
319
318
  - lib/cms_scanner/typhoeus/response.rb
320
319
  - lib/cms_scanner/version.rb
321
320
  - lib/cms_scanner/vulnerability.rb
@@ -1,10 +0,0 @@
1
- module Typhoeus
2
- # Ensure a clean abort of hydra
3
- # See https://github.com/typhoeus/typhoeus/issues/439
4
- class Hydra
5
- def abort
6
- super
7
- run
8
- end
9
- end
10
- end