cms_scanner 0.7.1 → 0.8.0

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: cb3d91dd9725dc7b11be0860de94d5e6b6578c180925ce61420f28cba1893248
4
- data.tar.gz: 3741539c2ee16d4f90de4a78d9abb2a85383280bb8ad31c881594de3349b1c12
3
+ metadata.gz: 89cb65e24d7efb97e8b4f31e9ce09dff25e59b2e6e17e2566c973ac6a4751606
4
+ data.tar.gz: d2a1fadc66b7dc757cbb1c704ddb1c4411b4308c537aa4d2e18d389e2e30ab4f
5
5
  SHA512:
6
- metadata.gz: 261e6f5efb45a46a567a4c94d7ff0b53d283ed7f0d6fd6013382f50d3216c42fd9d56765031c0937fc5d82a00316376383432c796f18ef85827bd8e6b67d38d7
7
- data.tar.gz: 6ad4fd531187e0e477afc0e6d20ae46c8600c65a2f95357ffc86901ca798fbfacc269fec93fba2f93b2e9868b572cd4f4463d5f4232bfed64a8c691caab187f3
6
+ metadata.gz: f2ef12981d6d9de6ee138e1d57e2587e5468df1f57a74b8d3368393c50d6af046f6a7e36407711fef475f3c1bc84b7c73ac0da413bc91de59d8d3f4852ecd243
7
+ data.tar.gz: 561b41a5c958a5bcfe4e8cccd6656442b818820a271105494446f6ba82e1178e4715922f0df4fbc0455838c699221da975ade1a26a487812b61cb41a880f7cf3
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Version
4
4
  module CMSScanner
5
- VERSION = '0.7.1'
5
+ VERSION = '0.8.0'
6
6
  end
@@ -23,20 +23,13 @@ module CMSScanner
23
23
  @uri = Addressable::URI.parse(site_url).normalize
24
24
  end
25
25
 
26
- # Used for convenience
27
- #
28
- # URI.encode is preferered over Addressable::URI.encode as it will encode
29
- # leading # character:
30
- # URI.encode('#t#') => %23t%23
31
- # Addressable::URI.encode('#t#') => #t%23
32
- #
33
26
  # @param [ String ] path Optional path to merge with the uri
34
27
  #
35
28
  # @return [ String ]
36
29
  def url(path = nil)
37
30
  return @uri.to_s unless path
38
31
 
39
- @uri.join(URI.encode(path)).to_s
32
+ @uri.join(Addressable::URI.encode(path)).to_s
40
33
  end
41
34
 
42
35
  attr_writer :homepage_res
@@ -62,13 +55,7 @@ module CMSScanner
62
55
 
63
56
  # @return [ String ] The URL of an unlikely existant page
64
57
  def error_404_url
65
- @error_404_url ||= non_existant_page_url
66
- end
67
-
68
- # @return [ String ] The URL of an unlikely existant page
69
- # TODO: This will be removed in the next major version (0.7)
70
- def non_existant_page_url
71
- uri.join(Digest::MD5.hexdigest(rand(999_999).to_s)[0..6] + '.html').to_s
58
+ @error_404_url ||= uri.join(Digest::MD5.hexdigest(rand(999_999).to_s)[0..6] + '.html').to_s
72
59
  end
73
60
 
74
61
  # Checks if the remote website is up.
@@ -112,7 +99,7 @@ module CMSScanner
112
99
 
113
100
  return unless [301, 302].include?(NS::Browser.get(url).code)
114
101
 
115
- res = NS::Browser.get(url, followlocation: true)
102
+ res = NS::Browser.get(url, followlocation: true, maxredirs: 10)
116
103
 
117
104
  res.effective_url == url ? nil : res.effective_url
118
105
  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.7.1
4
+ version: 0.8.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-11-05 00:00:00.000000000 Z
11
+ date: 2020-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: get_process_mem
@@ -218,14 +218,14 @@ dependencies:
218
218
  requirements:
219
219
  - - "~>"
220
220
  - !ruby/object:Gem::Version
221
- version: 0.76.0
221
+ version: 0.78.0
222
222
  type: :development
223
223
  prerelease: false
224
224
  version_requirements: !ruby/object:Gem::Requirement
225
225
  requirements:
226
226
  - - "~>"
227
227
  - !ruby/object:Gem::Version
228
- version: 0.76.0
228
+ version: 0.78.0
229
229
  - !ruby/object:Gem::Dependency
230
230
  name: rubocop-performance
231
231
  requirement: !ruby/object:Gem::Requirement