cms_scanner 0.0.27 → 0.0.28
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.rb +1 -3
- data/lib/cms_scanner.rb +1 -1
- data/lib/cms_scanner/errors/{auth_errors.rb → http.rb} +19 -5
- data/lib/cms_scanner/finders/finder.rb +1 -0
- data/lib/cms_scanner/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae683c66a4944bbb795dd2226eb508bb5cd4b605
|
4
|
+
data.tar.gz: 1a857e71e73e5e2b3fff2b72c9f405ca6bf840db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb2ba5e94e801de333e9e92d9fb1116999a15e19db246f7916bad6d5a28ed5e4b31d2c1d7a4610d9e06c8917ea258dbbfc017425c35af21468108e734f11ae9c
|
7
|
+
data.tar.gz: 55afc0d62d3aefdba80e1057bfc99fb57b74a291beb1270bb1005da3856baefbc5f85ea8d5f40a74bbe22ee19733b11398edf7951a9d0432d4c3685c115a7ac4
|
data/app/controllers/core.rb
CHANGED
@@ -24,10 +24,8 @@ module CMSScanner
|
|
24
24
|
fail HTTPAuthRequiredError if target.http_auth?
|
25
25
|
fail ProxyAuthRequiredError if target.proxy_auth?
|
26
26
|
|
27
|
-
# TODO: ask if the redirection should be followed
|
28
|
-
# if user_interaction? is allowed (if followed, the Cache#storage_path should be updated)
|
29
27
|
redirection = target.redirection
|
30
|
-
fail
|
28
|
+
fail HTTPRedirectError, redirection if redirection
|
31
29
|
end
|
32
30
|
|
33
31
|
def run
|
data/lib/cms_scanner.rb
CHANGED
@@ -17,7 +17,7 @@ require 'cms_scanner/typhoeus/hydra'
|
|
17
17
|
require 'cms_scanner/public_suffix/domain'
|
18
18
|
# Custom Libs
|
19
19
|
require 'cms_scanner/helper'
|
20
|
-
require 'cms_scanner/errors/
|
20
|
+
require 'cms_scanner/errors/http'
|
21
21
|
require 'cms_scanner/cache/typhoeus'
|
22
22
|
require 'cms_scanner/target'
|
23
23
|
require 'cms_scanner/browser'
|
@@ -1,23 +1,37 @@
|
|
1
1
|
module CMSScanner
|
2
2
|
# HTTP Authentication Required Error
|
3
3
|
class HTTPAuthRequiredError < StandardError
|
4
|
-
def
|
4
|
+
def to_s
|
5
5
|
'HTTP authentication required (or was invalid), please provide it with --http-auth'
|
6
6
|
end
|
7
7
|
end
|
8
8
|
|
9
9
|
# Proxy Authentication Required Error
|
10
10
|
class ProxyAuthRequiredError < StandardError
|
11
|
-
def
|
11
|
+
def to_s
|
12
12
|
'Proxy authentication required (or was invalid), please provide it with --proxy-auth'
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
16
|
# Access Forbidden Error
|
17
17
|
class AccessForbiddenError < StandardError
|
18
|
-
def
|
19
|
-
|
20
|
-
'
|
18
|
+
def to_s
|
19
|
+
'The target is responding with a 403, this might be due to a WAF. ' \
|
20
|
+
'Please re-try with --random-user-agent'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# HTTP Redirect Error
|
25
|
+
class HTTPRedirectError < StandardError
|
26
|
+
attr_reader :redirect_uri
|
27
|
+
|
28
|
+
# @param [ String ] url
|
29
|
+
def initialize(url)
|
30
|
+
@redirect_uri = Addressable::URI.parse(url).normalize
|
31
|
+
end
|
32
|
+
|
33
|
+
def to_s
|
34
|
+
"The URL supplied redirects to #{redirect_uri}"
|
21
35
|
end
|
22
36
|
end
|
23
37
|
end
|
data/lib/cms_scanner/version.rb
CHANGED
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.28
|
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-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opt_parse_validator
|
@@ -259,7 +259,7 @@ files:
|
|
259
259
|
- lib/cms_scanner/cache/typhoeus.rb
|
260
260
|
- lib/cms_scanner/controller.rb
|
261
261
|
- lib/cms_scanner/controllers.rb
|
262
|
-
- lib/cms_scanner/errors/
|
262
|
+
- lib/cms_scanner/errors/http.rb
|
263
263
|
- lib/cms_scanner/finders.rb
|
264
264
|
- lib/cms_scanner/finders/finder.rb
|
265
265
|
- lib/cms_scanner/finders/finder/enumerator.rb
|