Skip to content

Commit ebde552

Browse files
author
h00die
committed
gem version
1 parent afc942c commit ebde552

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

modules/exploits/linux/http/centreon_useralias_exec.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,10 @@ def check
5656
'uri' => normalize_uri(target_uri.path, 'index.php'),
5757
'method' => 'GET'
5858
)
59-
/LoginInvitVersion"><br \/>[\s]+(?<version_high>[\d]{1,2})\.(?<version_med>[\d]{1,2})\.(?<version_low>[\d]{1,2})[\s]+<\/td>/ =~ res.body
59+
/LoginInvitVersion"><br \/>[\s]+(?<version>[\d]{1,2}\.[\d]{1,2}\.[\d]{1,2})[\s]+<\/td>/ =~ res.body
6060

61-
if version_high && version_med && version_low && \
62-
version_high.to_i <= 2 && \
63-
version_med.to_i <= 5 && \
64-
version_low.to_i <= 3
65-
vprint_good("Version Detected: #{[version_high, version_med, version_low].join('.')}")
61+
if version && Gem::Version.new(version) <= Gem::Version.new('2.5.3')
62+
vprint_good("Version Detected: #{version}")
6663
Exploit::CheckCode::Appears
6764
else
6865
Exploit::CheckCode::Safe

0 commit comments

Comments
 (0)