cms_scanner 0.0.42.0 → 0.0.43.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: 19ca3bad75160815e98141684a64b01032d20ab64b6ad9820bad8ee8312efa6a
4
- data.tar.gz: 0b26c2137534fea2e6ea40c79944a6db999819c93709239ae3a9786b8358d51e
3
+ metadata.gz: 809b3e49a77c2be19fe84fbf38e7001d3a6fbe76a1e6c65e23c6ec210e48e6bf
4
+ data.tar.gz: 7ac3e3fcd7150886258fec04c82a2ccab9ba70b39d8d3f2111dfbc35b7b9305a
5
5
  SHA512:
6
- metadata.gz: 89b98c3e832204d8cf90c6ae034a73c7478bfdd0a25722275f3d131bc578101257a8c471d070a5f3791ac50741579271940bd234ee5e2d0eb24e7eaa497d01be
7
- data.tar.gz: 4bde15301bb4262dfb0fc6029ad42c0f6ef4617895b84a8e3ef197f6cde7f79196f85264ca840f535b2eedf58c3fb0a55ac75e6e5695ff0893b84c557a4e56b5
6
+ metadata.gz: 670b0fbeb80007da87469166c5fb991a1201b27df5602595b21d6aa2e03ccb3273b14585e3e974ccdde614fac9de322b215ccecbb7ef09ec09e04ebdc2b68aee
7
+ data.tar.gz: a0e070df97dbcb7feb43e77c71c93cf05372fd0fd75cac1a37b418bccdddbd96f14498dc9ee0fff06064651523fc28be4a28c26d0acac1a7ef75339c608a1faf
@@ -1,3 +1,4 @@
1
+
1
2
  <%= info_icon %> Finished: <%= @stop_time.asctime %>
2
3
  <%= info_icon %> Requests Done: <%= @requests_done %>
3
4
  <%= info_icon %> Cached Requests: <%= @cached_requests %>
@@ -3,7 +3,7 @@
3
3
  module CMSScanner
4
4
  # Controllers Container
5
5
  class Controllers < Array
6
- attr_reader :option_parser
6
+ attr_reader :option_parser, :running
7
7
 
8
8
  # @param [ OptParsevalidator::OptParser ] options_parser
9
9
  def initialize(option_parser = OptParseValidator::OptParser.new(nil, 40))
@@ -43,11 +43,20 @@ module CMSScanner
43
43
 
44
44
  Timeout.timeout(parsed_options[:max_scan_duration], NS::Error::MaxScanDurationReached) do
45
45
  each(&:before_scan)
46
+
47
+ @running = true
48
+
46
49
  each(&:run)
47
- # Reverse is used here as the app/controllers/core#after_scan finishes the output
48
- # and must be the last one to be executed
49
- reverse_each(&:after_scan)
50
50
  end
51
+ ensure
52
+ Browser.instance.hydra.abort
53
+
54
+ # Reverse is used here as the app/controllers/core#after_scan finishes the output
55
+ # and must be the last one to be executed. It also guarantee that stats will be output
56
+ # even when an error occurs, which could help in debugging.
57
+ # However, the #after_scan methods are only executed if the scan was running, and won't be
58
+ # called when there is a CLI error, or just -h/--hh/--version for example
59
+ reverse_each(&:after_scan) if running
51
60
  end
52
61
  end
53
62
  end
@@ -33,8 +33,6 @@ module CMSScanner
33
33
  verbose: controllers.first.parsed_options[:verbose] ||
34
34
  run_error_exit_code == NS::ExitCode::EXCEPTION)
35
35
  ensure
36
- Browser.instance.hydra.abort
37
-
38
36
  formatter.beautify
39
37
  end
40
38
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Version
4
4
  module CMSScanner
5
- VERSION = '0.0.42.0'
5
+ VERSION = '0.0.43.0'
6
6
  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.0.42.0
4
+ version: 0.0.43.0
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-27 00:00:00.000000000 Z
11
+ date: 2019-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.0.17.0
33
+ version: 0.0.17.1
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: 0.0.17.0
40
+ version: 0.0.17.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: public_suffix
43
43
  requirement: !ruby/object:Gem::Requirement