diff --git a/modules/exploits/multi/misc/consul_service_exec.rb b/modules/exploits/multi/misc/consul_service_exec.rb index 711a69900e..6573a6b36f 100644 --- a/modules/exploits/multi/misc/consul_service_exec.rb +++ b/modules/exploits/multi/misc/consul_service_exec.rb @@ -114,7 +114,7 @@ class MetasploitModule < Msf::Exploit::Remote 'X-Consul-Token' => datastore['ACL_TOKEN'] } }) - if res and not res.code == 200 + if res && res.code != 200 fail_with(Failure::Unknown, 'An error occured when contacting the Consul API.' )