cms_scanner 0.6.2 → 0.7.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/finders/finder.rb +10 -4
- data/lib/cms_scanner/version.rb +1 -1
- data/lib/cms_scanner/web_site.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a43eae35565741225f655162102b41bd67ce00d0d1ba7203ed418d7c3497b37c
|
4
|
+
data.tar.gz: e382dea43f37c75f72db92b725c122f278d9b298440172e23a559c0abd1af686
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb135c2e5cab45ee6ff4f149e837e6d651e56d29cc627ad6f19375e4a934b47960940f0d7a1ab1753f16f27947dc31ec44b9bbba837170aff891ec09e0b622fc
|
7
|
+
data.tar.gz: f5ed818207f80837ea873b7510d59cf0d9b1d52a5a315a2622cd02ce4c00cf0bc9771134fa9869739ccab619ca949c2d96ac61d3d4e77dda98245abbdaa9eb9f
|
@@ -20,7 +20,11 @@ module CMSScanner
|
|
20
20
|
|
21
21
|
# @return [ String ] The titleized name of the finder
|
22
22
|
def titleize
|
23
|
-
|
23
|
+
# Put a _ char before any digits except those at the end, which will be replaced by a space
|
24
|
+
# Otherwise, class such as Error404Page are returned as Error404 Page instead of Error 404 page
|
25
|
+
# The keep_id_suffix is to concevert classes such as CssId to Css Id instead of Css
|
26
|
+
|
27
|
+
@titleize ||= self.class.to_s.demodulize.gsub(/(\d+)[a-z]+/i, '_\0').titleize(keep_id_suffix: true)
|
24
28
|
end
|
25
29
|
|
26
30
|
# @param [ Hash ] _opts
|
@@ -50,15 +54,17 @@ module CMSScanner
|
|
50
54
|
@hydra ||= browser.hydra
|
51
55
|
end
|
52
56
|
|
53
|
-
# @param [
|
57
|
+
# @param [String, Class ] klass
|
54
58
|
# @return [ String ]
|
55
|
-
def found_by(klass = self)
|
59
|
+
def found_by(klass = self.class)
|
56
60
|
caller_locations.each do |call|
|
57
61
|
label = call.label
|
58
62
|
|
59
63
|
next unless %w[aggressive passive].include? label
|
60
64
|
|
61
|
-
|
65
|
+
title = klass.to_s.demodulize.gsub(/(\d+)[a-z]+/i, '_\0').titleize(keep_id_suffix: true)
|
66
|
+
|
67
|
+
return "#{title} (#{label.capitalize} Detection)"
|
62
68
|
end
|
63
69
|
nil
|
64
70
|
end
|
data/lib/cms_scanner/version.rb
CHANGED
data/lib/cms_scanner/web_site.rb
CHANGED
@@ -62,13 +62,13 @@ module CMSScanner
|
|
62
62
|
|
63
63
|
# @return [ String ] The URL of an unlikely existant page
|
64
64
|
def error_404_url
|
65
|
-
non_existant_page_url
|
65
|
+
@error_404_url ||= non_existant_page_url
|
66
66
|
end
|
67
67
|
|
68
68
|
# @return [ String ] The URL of an unlikely existant page
|
69
69
|
# TODO: This will be removed in the next major version (0.7)
|
70
70
|
def non_existant_page_url
|
71
|
-
uri.join(Digest::MD5.hexdigest(rand(999_999).to_s) + '.html').to_s
|
71
|
+
uri.join(Digest::MD5.hexdigest(rand(999_999).to_s)[0..6] + '.html').to_s
|
72
72
|
end
|
73
73
|
|
74
74
|
# Checks if the remote website is up.
|
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.7.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
|
+
date: 2019-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: get_process_mem
|