cms_scanner 0.13.2 → 0.13.6

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: fffe0c16f6997feb9d468326198beacc87eebffbf420704f06d4f0fcf75a1041
4
- data.tar.gz: a3bd4c7f63fb7b623a06a9d31383900dc00d0a28bbb4d453a22423feb28a8e82
3
+ metadata.gz: aa75f8f02c46d71e83a1046a0fb3e76c6ebfa35809158202cc251609031f436b
4
+ data.tar.gz: 3a7bc3d215a5b859e74c2bc7928fe210e87a10c609a0c6c4c8d166668e97865d
5
5
  SHA512:
6
- metadata.gz: 4bffc3ece3ecd360750bb67e82718b1bb13f7026d0c7aa84786db2f85122033b6df1273c558879c48feb364b69ea08e3d4c4df69580e39001bf63dc375a45490
7
- data.tar.gz: 57ccf22b7947670c969b72720e302c819c7aab0943a252c33b049d11664bc4f3b5c718dc3bd7c1904d48ba3d7c5c5b7ae0fbfe79402429e267ce55484e7f7f92
6
+ metadata.gz: 0ee139ea50a17e94bce5231f40c5b4934c2c68d507a6b8493f1af505525e1d18628de0e76e99675d7391310b76cbfde778420004a95a801484db687d27ab031d
7
+ data.tar.gz: e1fa8194c3b4edafcb3a62650b2a00bf99b7cf058b360d338b3ff7e537901b37f5b31b6346d26db5d95b438102241f41a8670a520b65796e9f51d88b52054c9d
@@ -55,7 +55,7 @@ module CMSScanner
55
55
  OptPositiveInteger.new(['-t', '--max-threads VALUE', 'The max threads to use'],
56
56
  default: 5),
57
57
  OptPositiveInteger.new(['--throttle MilliSeconds', 'Milliseconds to wait before doing another web request. ' \
58
- 'If used, the max threads will be set to 1.']),
58
+ 'If used, the max threads will be set to 1.']),
59
59
  OptPositiveInteger.new(['--request-timeout SECONDS', 'The request timeout in seconds'],
60
60
  default: 60),
61
61
  OptPositiveInteger.new(['--connect-timeout SECONDS', 'The connection timeout in seconds'],
@@ -64,7 +64,8 @@ module CMSScanner
64
64
 
65
65
  def to_s
66
66
  "The URL supplied redirects to #{redirect_uri}. Use the --ignore-main-redirect "\
67
- 'option to ignore the redirection and scan the target, or change the --url option value to the redirected URL.'
67
+ 'option to ignore the redirection and scan the target, or change the --url option ' \
68
+ 'value to the redirected URL.'
68
69
  end
69
70
  end
70
71
  end
@@ -59,8 +59,10 @@ 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
- opts[:exclude_content] && full_res.body&.match(opts[:exclude_content])
65
+ (opts[:exclude_content] && full_res.body&.match(opts[:exclude_content]))
64
66
 
65
67
  full_res
66
68
  end
@@ -6,7 +6,7 @@ class Numeric
6
6
  def bytes_to_human
7
7
  units = %w[B KB MB GB TB]
8
8
  e = abs.zero? ? abs : (Math.log(abs) / Math.log(1024)).floor
9
- s = format('%<s>.3f', s: (abs.to_f / 1024**e))
9
+ s = format('%<s>.3f', s: (abs.to_f / (1024**e)))
10
10
 
11
11
  s.sub(/\.?0*$/, " #{units[e]}")
12
12
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Version
4
4
  module CMSScanner
5
- VERSION = '0.13.2'
5
+ VERSION = '0.13.6'
6
6
  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,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cms_scanner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.2
4
+ version: 0.13.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - WPScanTeam
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-22 00:00:00.000000000 Z
11
+ date: 2021-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ethon
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.14.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.14.0
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: get_process_mem
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -28,30 +42,36 @@ dependencies:
28
42
  name: nokogiri
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
- - - "~>"
45
+ - - ">="
32
46
  - !ruby/object:Gem::Version
33
- version: 1.11.0
47
+ version: 1.11.4
48
+ - - "<"
49
+ - !ruby/object:Gem::Version
50
+ version: 1.13.0
34
51
  type: :runtime
35
52
  prerelease: false
36
53
  version_requirements: !ruby/object:Gem::Requirement
37
54
  requirements:
38
- - - "~>"
55
+ - - ">="
39
56
  - !ruby/object:Gem::Version
40
- version: 1.11.0
57
+ version: 1.11.4
58
+ - - "<"
59
+ - !ruby/object:Gem::Version
60
+ version: 1.13.0
41
61
  - !ruby/object:Gem::Dependency
42
62
  name: opt_parse_validator
43
63
  requirement: !ruby/object:Gem::Requirement
44
64
  requirements:
45
65
  - - "~>"
46
66
  - !ruby/object:Gem::Version
47
- version: 1.9.4
67
+ version: 1.9.5
48
68
  type: :runtime
49
69
  prerelease: false
50
70
  version_requirements: !ruby/object:Gem::Requirement
51
71
  requirements:
52
72
  - - "~>"
53
73
  - !ruby/object:Gem::Version
54
- version: 1.9.4
74
+ version: 1.9.5
55
75
  - !ruby/object:Gem::Dependency
56
76
  name: public_suffix
57
77
  requirement: !ruby/object:Gem::Requirement
@@ -210,28 +230,28 @@ dependencies:
210
230
  requirements:
211
231
  - - "~>"
212
232
  - !ruby/object:Gem::Version
213
- version: 1.11.0
233
+ version: 1.21.0
214
234
  type: :development
215
235
  prerelease: false
216
236
  version_requirements: !ruby/object:Gem::Requirement
217
237
  requirements:
218
238
  - - "~>"
219
239
  - !ruby/object:Gem::Version
220
- version: 1.11.0
240
+ version: 1.21.0
221
241
  - !ruby/object:Gem::Dependency
222
242
  name: rubocop-performance
223
243
  requirement: !ruby/object:Gem::Requirement
224
244
  requirements:
225
245
  - - "~>"
226
246
  - !ruby/object:Gem::Version
227
- version: 1.10.0
247
+ version: 1.11.0
228
248
  type: :development
229
249
  prerelease: false
230
250
  version_requirements: !ruby/object:Gem::Requirement
231
251
  requirements:
232
252
  - - "~>"
233
253
  - !ruby/object:Gem::Version
234
- version: 1.10.0
254
+ version: 1.11.0
235
255
  - !ruby/object:Gem::Dependency
236
256
  name: simplecov
237
257
  requirement: !ruby/object:Gem::Requirement
@@ -266,14 +286,14 @@ dependencies:
266
286
  requirements:
267
287
  - - "~>"
268
288
  - !ruby/object:Gem::Version
269
- version: 3.12.0
289
+ version: 3.13.0
270
290
  type: :development
271
291
  prerelease: false
272
292
  version_requirements: !ruby/object:Gem::Requirement
273
293
  requirements:
274
294
  - - "~>"
275
295
  - !ruby/object:Gem::Version
276
- version: 3.12.0
296
+ version: 3.13.0
277
297
  description: Framework to provide an easy way to implement CMS Scanners
278
298
  email:
279
299
  - contact@wpscan.com
@@ -393,7 +413,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
393
413
  - !ruby/object:Gem::Version
394
414
  version: '0'
395
415
  requirements: []
396
- rubygems_version: 3.0.3
416
+ rubygems_version: 3.0.3.1
397
417
  signing_key:
398
418
  specification_version: 4
399
419
  summary: CMS Scanner Framework (experimental)