cms_scanner 0.5.4 → 0.5.5

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: 502fd0618a4a4de038a4223eec1aebd3154a1f7d1dfeea794d6e607a8e870444
4
- data.tar.gz: 4de1cdaa81b3546c14d73ceaac37e53b990a0e1de0ca1b9a7b1bf80465440cd7
3
+ metadata.gz: 1020c3db6514f4858bff48444c3c1e384871069da40723f7e8ef1b56eeb7a9bf
4
+ data.tar.gz: 117923c60ea26e4ce392e95679c64f64289c64a8389314e5aac039c0114ddc31
5
5
  SHA512:
6
- metadata.gz: f6a1747b6916ca83653d92df8d14cd118faaf446804fd7b1ea3bbc14c6f1717a4bbc1fa91b761f94b01c80db73aef8417300724755f4c6644476c4f181e13f90
7
- data.tar.gz: 818db4a4b58d5b1b7d598281f172a421f6fa8047fa5c36bb245309412302e3a520788ec5349e48e8679e61f214f525e6f450566ef745b5d00461fa8a5a644ad1
6
+ metadata.gz: 3aabbf18bea8843817633b96c8dc5adc20029308333a2437527de1ed31dd05d4db59aa2aae578827dfcfeed05a367b2c1c9cf34d56e02c903666f67d5c70a466
7
+ data.tar.gz: f4d9594308a2ad74f5c74a1102a84978c4748dfb5a060396e13959f49bd1e36f575115d3d306ff8b459769e071f539ca1c9f62315470e3296a2b03d33408aadd
@@ -9,7 +9,7 @@ module CMSScanner
9
9
  def aggressive(_opts = {})
10
10
  path = 'searchreplacedb2.php'
11
11
 
12
- return unless target.head_and_get(path).body =~ /by interconnect/i
12
+ return unless /by interconnect/i.match?(target.head_and_get(path).body)
13
13
 
14
14
  NS::Model::InterestingFinding.new(target.url(path),
15
15
  confidence: 100,
@@ -50,7 +50,7 @@ module CMSScanner
50
50
 
51
51
  res = NS::Browser.post(potential_url, body: Digest::MD5.hexdigest(rand(999_999).to_s[0..5]))
52
52
 
53
- next unless res&.body =~ /<methodResponse>/i
53
+ next unless /<methodResponse>/i.match?(res&.body)
54
54
 
55
55
  return NS::Model::XMLRPC.new(potential_url,
56
56
  confidence: 100,
@@ -9,7 +9,7 @@ module CMSScanner
9
9
  results = []
10
10
 
11
11
  entries.each do |entry|
12
- next unless entry =~ /(?:admin|\.log|\.sql|\.db)/i
12
+ next unless /(?:admin|\.log|\.sql|\.db)/i.match?(entry)
13
13
 
14
14
  results << entry
15
15
  end
@@ -48,7 +48,7 @@ module CMSScanner
48
48
  # @return [ Hash ]
49
49
  def default_request_params
50
50
  params = {
51
- headers: { 'User-Agent' => user_agent }.merge(headers || {}),
51
+ headers: { 'User-Agent' => user_agent, 'Referer' => url }.merge(headers || {}),
52
52
  accept_encoding: 'gzip, deflate',
53
53
  method: :get
54
54
  }
@@ -17,6 +17,7 @@ module CMSScanner
17
17
  random_user_agent
18
18
  request_timeout
19
19
  throttle
20
+ url
20
21
  user_agent
21
22
  user_agents_list
22
23
  vhost
@@ -117,7 +117,7 @@ module CMSScanner
117
117
  tpl = "#{controller_name}/#{tpl}"
118
118
  end
119
119
 
120
- raise "Wrong tpl format: '#{tpl}'" unless tpl =~ %r{\A[\w/_]+\z}
120
+ raise "Wrong tpl format: '#{tpl}'" unless %r{\A[\w/_]+\z}.match?(tpl)
121
121
 
122
122
  views_directories.reverse_each do |dir|
123
123
  formats.each do |format|
@@ -59,7 +59,7 @@ module CMSScanner
59
59
  NS::Browser.get(url(path), params).html.css(selector).each do |node|
60
60
  entry = node.text.to_s
61
61
 
62
- next if entry =~ ignore
62
+ next if entry&.match?(ignore)
63
63
 
64
64
  found << entry
65
65
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Version
4
4
  module CMSScanner
5
- VERSION = '0.5.4'
5
+ VERSION = '0.5.5'
6
6
  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.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - WPScanTeam
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-10 00:00:00.000000000 Z
11
+ date: 2019-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.7.3
33
+ version: 1.7.4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.7.3
40
+ version: 1.7.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: public_suffix
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -190,14 +190,14 @@ dependencies:
190
190
  requirements:
191
191
  - - "~>"
192
192
  - !ruby/object:Gem::Version
193
- version: 0.72.0
193
+ version: 0.73.0
194
194
  type: :development
195
195
  prerelease: false
196
196
  version_requirements: !ruby/object:Gem::Requirement
197
197
  requirements:
198
198
  - - "~>"
199
199
  - !ruby/object:Gem::Version
200
- version: 0.72.0
200
+ version: 0.73.0
201
201
  - !ruby/object:Gem::Dependency
202
202
  name: rubocop-performance
203
203
  requirement: !ruby/object:Gem::Requirement