Follow @bcoles recommendations for 'check' function.
This commit is contained in:
@@ -58,9 +58,15 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
sys_description = snmp.get_value('1.3.6.1.2.1.1.1.0').to_s
|
||||
print_status("Target system is #{sys_description}")
|
||||
# AM-100 and AM-101 considered EOL, no fix so no need to check version.
|
||||
return Exploit::CheckCode::Vulnerable if sys_description.include? "Crestron Electronics AM-100" or sys.description.include? "Crestron Electronics AM-101"
|
||||
# TODO: insert description check for other vulnerable models (that I don't have)
|
||||
# In the meantime, we return 'unknown'.
|
||||
model = sys_description.scan(/Crestron Electronics (AM-100|AM-101)/).flatten.first
|
||||
case model
|
||||
when 'AM-100', 'AM-101'
|
||||
return CheckCode::Vulnerable
|
||||
else
|
||||
# TODO: insert description check for other vulnerable models (that I don't have)
|
||||
# In the meantime, we return 'safe'.
|
||||
return CheckCode::Safe
|
||||
end
|
||||
rescue SNMP::RequestTimeout
|
||||
print_error("#{ip} SNMP request timeout.")
|
||||
rescue Rex::ConnectionError
|
||||
|
||||
Reference in New Issue
Block a user