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 +4 -4
- data/lib/cms_scanner/version.rb +1 -1
- data/lib/cms_scanner/web_site.rb +3 -16
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89cb65e24d7efb97e8b4f31e9ce09dff25e59b2e6e17e2566c973ac6a4751606
|
4
|
+
data.tar.gz: d2a1fadc66b7dc757cbb1c704ddb1c4411b4308c537aa4d2e18d389e2e30ab4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2ef12981d6d9de6ee138e1d57e2587e5468df1f57a74b8d3368393c50d6af046f6a7e36407711fef475f3c1bc84b7c73ac0da413bc91de59d8d3f4852ecd243
|
7
|
+
data.tar.gz: 561b41a5c958a5bcfe4e8cccd6656442b818820a271105494446f6ba82e1178e4715922f0df4fbc0455838c699221da975ade1a26a487812b61cb41a880f7cf3
|
data/lib/cms_scanner/version.rb
CHANGED
data/lib/cms_scanner/web_site.rb
CHANGED
@@ -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 ||=
|
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.
|
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:
|
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.
|
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.
|
228
|
+
version: 0.78.0
|
229
229
|
- !ruby/object:Gem::Dependency
|
230
230
|
name: rubocop-performance
|
231
231
|
requirement: !ruby/object:Gem::Requirement
|