Land #11519, error check fix for Crock-Pot module

4.x
William Vu 2019-03-04 19:34:41 -06:00 committed by Metasploit
parent d94a54bd02
commit c390d968e5
No known key found for this signature in database
GPG Key ID: CDFB5FA52007B954
1 changed files with 1 additions and 3 deletions

View File

@ -88,9 +88,7 @@ class MetasploitModule < Msf::Auxiliary
res = send_request_cook('Off', 0)
end
time = res.get_xml_document.at('//time')
unless res && res.code == 200 && time
unless res && res.code == 200 && (time = res.get_xml_document.at('//time'))
print_error("Failed to #{action.name.downcase}, aborting!")
return
end