cms_scanner 0.0.41.2 → 0.0.41.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/core/cli_options.rb +4 -1
- data/lib/cms_scanner.rb +3 -1
- data/lib/cms_scanner/controllers.rb +7 -5
- data/lib/cms_scanner/errors/scan.rb +10 -0
- data/lib/cms_scanner/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 110b5b109b6dd1c9d09549e7deb8fb7508c9bfb0468b24dd6b6d2c2a4c83301d
|
4
|
+
data.tar.gz: 0c09f110f1c432518d16a21f87cd3787b29322bcb109a5180e5aec3f5facd637
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c070cc68a72da9669cefc5792e0d9a8f61ded544cddb4cdc78db2a4dbe9d5f6890e40004761b2f04646b7d685b86c2cd56624d0568b84f0f17fc51c0298b9edb
|
7
|
+
data.tar.gz: 9fd44567c3802590a41c8db6fec6c6ed0bfbdff3a91afb70c1832752d119fb61591bf5e24d8c4bad80fe53ef7f486212050b452c93101ef814efafb3f94be2ba
|
@@ -31,7 +31,10 @@ module CMSScanner
|
|
31
31
|
OptBoolean.new(['--ignore-main-redirect', 'Ignore the main redirect (if any) and scan the target url'],
|
32
32
|
advanced: true),
|
33
33
|
OptBoolean.new(['-v', '--verbose', 'Verbose mode']),
|
34
|
-
OptBoolean.new(['--[no-]banner', 'Whether or not to display the banner'], default: true)
|
34
|
+
OptBoolean.new(['--[no-]banner', 'Whether or not to display the banner'], default: true),
|
35
|
+
OptPositiveInteger.new(['--max-scan-duration SECONDS',
|
36
|
+
'Abort the scan if it exceeds the time provided in seconds'],
|
37
|
+
advanced: true)
|
35
38
|
]
|
36
39
|
end
|
37
40
|
|
data/lib/cms_scanner.rb
CHANGED
@@ -13,6 +13,7 @@ require 'erb'
|
|
13
13
|
require 'uri'
|
14
14
|
require 'fileutils'
|
15
15
|
require 'pathname'
|
16
|
+
require 'timeout'
|
16
17
|
require 'xmlrpc/client'
|
17
18
|
# Monkey Patches
|
18
19
|
require 'cms_scanner/typhoeus/response' # Adds a Response#html using Nokogiri to parse the body
|
@@ -24,6 +25,7 @@ require 'cms_scanner/progressbar_null_output'
|
|
24
25
|
require 'cms_scanner/helper'
|
25
26
|
require 'cms_scanner/exit_code'
|
26
27
|
require 'cms_scanner/errors/http'
|
28
|
+
require 'cms_scanner/errors/scan'
|
27
29
|
require 'cms_scanner/cache/typhoeus'
|
28
30
|
require 'cms_scanner/target'
|
29
31
|
require 'cms_scanner/browser'
|
@@ -185,7 +187,7 @@ module CMSScanner
|
|
185
187
|
|
186
188
|
return NS::ExitCode::INTERRUPTED if run_error.is_a?(Interrupt)
|
187
189
|
|
188
|
-
return NS::ExitCode::ERROR if run_error.is_a?(NS::Error)
|
190
|
+
return NS::ExitCode::ERROR if run_error.is_a?(NS::Error) || run_error.is_a?(CMSScanner::Error)
|
189
191
|
|
190
192
|
NS::ExitCode::EXCEPTION
|
191
193
|
end
|
@@ -39,11 +39,13 @@ module CMSScanner
|
|
39
39
|
|
40
40
|
redirect_output_to_file(parsed_options[:output]) if parsed_options[:output]
|
41
41
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
42
|
+
Timeout.timeout(parsed_options[:max_scan_duration], NS::MaxScanDurationReachedError) do
|
43
|
+
each(&:before_scan)
|
44
|
+
each(&:run)
|
45
|
+
# Reverse is used here as the app/controllers/core#after_scan finishes the output
|
46
|
+
# and must be the last one to be executed
|
47
|
+
reverse_each(&:after_scan)
|
48
|
+
end
|
47
49
|
end
|
48
50
|
end
|
49
51
|
end
|
data/lib/cms_scanner/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cms_scanner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.41.
|
4
|
+
version: 0.0.41.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- WPScanTeam
|
@@ -280,6 +280,7 @@ files:
|
|
280
280
|
- lib/cms_scanner/controller.rb
|
281
281
|
- lib/cms_scanner/controllers.rb
|
282
282
|
- lib/cms_scanner/errors/http.rb
|
283
|
+
- lib/cms_scanner/errors/scan.rb
|
283
284
|
- lib/cms_scanner/exit_code.rb
|
284
285
|
- lib/cms_scanner/finders.rb
|
285
286
|
- lib/cms_scanner/finders/base_finders.rb
|