improve version parsing

This commit is contained in:
tastyrce
2025-03-27 02:01:03 -04:00
parent cbfcc5bd13
commit e62038cfe5
@@ -83,7 +83,8 @@ class MetasploitModule < Msf::Exploit::Remote
set_cookie = res.get_cookies
return CheckCode::Safe unless set_cookie&.match?(/^CMSSESSID/)
version = Rex::Version.new(res.body.scan(%r{CMS Made Simple</a> version (\d+\.\d+\.\d+)}).flatten.first)
html = res.get_html_document
version = Rex::Version.new(html.at('p.copyright-info').text.scan(/\d+\.\d+\.\d+/).first)
vprint_status("#{peer} - CMS Made Simple Version: #{version}")
return CheckCode::Appears if version <= Rex::Version.new('2.2.21')