cms_scanner 0.0.30 → 0.0.31
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 262fa29651e85bd873da5de15eddfc52f164b4e1
|
4
|
+
data.tar.gz: a30d0c63d358be3d8b759229093afeb90a104b8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39c20221b8fc77ce4cc06275b3b7c651921044698c5994af60792f09f73c2fecc9159a5ab6bb6f25fe41f7b64f84d0d0d7733ebe19dbacd100f51f4526af9b60
|
7
|
+
data.tar.gz: 1f3c35697e6a0b8783c6f91765b4a3266a18825ff4fe1797518981705cac6314877ddd9f6652f4bd62ee8205ba8f53f5d034c74e26d9c7958c7b26505a085fc6
|
@@ -16,7 +16,7 @@ module CMSScanner
|
|
16
16
|
normalize: :to_sym,
|
17
17
|
default: :mixed),
|
18
18
|
OptArray.new(['--scope DOMAINS',
|
19
|
-
'
|
19
|
+
'Comma separated (sub-)domains to consider in scope. ' \
|
20
20
|
'Wildcard(s) allowed in the trd of valid domains, e.g: *.target.tld'])
|
21
21
|
] + cli_browser_options
|
22
22
|
end
|
data/lib/cms_scanner/browser.rb
CHANGED
@@ -34,18 +34,24 @@ module CMSScanner
|
|
34
34
|
Typhoeus::Request.new(url, request_params(params))
|
35
35
|
end
|
36
36
|
|
37
|
+
# @return [ Hash ]
|
38
|
+
def typhoeus_to_browser_opts
|
39
|
+
{ connecttimeout: :connect_timeout, cache_ttl: :cache_ttl,
|
40
|
+
proxy: :proxy, timeout: :request_timeout, cookiejar: :cookie_jar,
|
41
|
+
cookiefile: :cookie_jar, cookie: :cookie_string
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
37
45
|
# @return [ Hash ]
|
38
46
|
def default_request_params
|
39
47
|
params = {
|
40
48
|
ssl_verifypeer: false, ssl_verifyhost: 2, # Disable SSL-Certificate checks
|
41
|
-
headers: { '
|
49
|
+
headers: { 'User-Agent' => user_agent },
|
50
|
+
accept_encoding: 'gzip, deflate',
|
42
51
|
method: :get
|
43
52
|
}
|
44
53
|
|
45
|
-
|
46
|
-
proxy: :proxy, timeout: :request_timeout, cookiejar: :cookie_jar,
|
47
|
-
cookiefile: :cookie_jar, cookie: :cookie_string
|
48
|
-
}.each do |typhoeus_opt, browser_opt|
|
54
|
+
typhoeus_to_browser_opts.each do |typhoeus_opt, browser_opt|
|
49
55
|
attr_value = public_send(browser_opt)
|
50
56
|
params[typhoeus_opt] = attr_value unless attr_value.nil?
|
51
57
|
end
|
@@ -24,7 +24,7 @@ module CMSScanner
|
|
24
24
|
#
|
25
25
|
# @return [ Array<String> ]
|
26
26
|
def passive_urls(_opts = {})
|
27
|
-
target.in_scope_urls(NS::Browser.
|
27
|
+
target.in_scope_urls(NS::Browser.get(target.url), passive_urls_xpath)
|
28
28
|
end
|
29
29
|
|
30
30
|
# @return [ String ]
|
data/lib/cms_scanner/version.rb
CHANGED
data/lib/cms_scanner/web_site.rb
CHANGED
@@ -74,6 +74,9 @@ module CMSScanner
|
|
74
74
|
# :nocov:
|
75
75
|
def redirection(url = nil)
|
76
76
|
url ||= @uri.to_s
|
77
|
+
|
78
|
+
return unless [301, 302].include?(NS::Browser.get(url).code)
|
79
|
+
|
77
80
|
res = NS::Browser.get(url, followlocation: true)
|
78
81
|
|
79
82
|
res.effective_url == url ? nil : res.effective_url
|
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.
|
4
|
+
version: 0.0.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- WPScanTeam - Erwan Le Rousseau
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opt_parse_validator
|