diff --git a/modules/exploits/multi/http/horde_csv_rce.rb b/modules/exploits/multi/http/horde_csv_rce.rb index 2318633132..8e4b058ec6 100644 --- a/modules/exploits/multi/http/horde_csv_rce.rb +++ b/modules/exploits/multi/http/horde_csv_rce.rb @@ -98,12 +98,12 @@ class MetasploitModule < Msf::Exploit::Remote if check # deliver the payload and return the body res = send_request_cgi(options) - if not res or res.code != 200 + unless res && res.code == 200 fail_with(Failure::UnexpectedReply, 'Cannot execute the payload') - else - vprint_good('Payload executed successfully') - return res.body end + + vprint_good('Payload executed successfully') + return res.body else # deliver the payload in a a new thread since the meterpreter payload does # not terminate when successful this allows to poll for session creation