From 45ea59050cb7e0bc6a7b3d966d4ed9625d22c05e Mon Sep 17 00:00:00 2001 From: jvazquez-r7 Date: Tue, 17 Jun 2014 23:40:00 -0500 Subject: [PATCH] Fix the if cleanup --- .../linux/ids/alienvault_centerd_soap_exec.rb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/exploits/linux/ids/alienvault_centerd_soap_exec.rb b/modules/exploits/linux/ids/alienvault_centerd_soap_exec.rb index 7e189ec42e..0ac3e19cd3 100644 --- a/modules/exploits/linux/ids/alienvault_centerd_soap_exec.rb +++ b/modules/exploits/linux/ids/alienvault_centerd_soap_exec.rb @@ -40,7 +40,7 @@ class Metasploit3 < Msf::Exploit::Remote 'Arch' => ARCH_CMD, 'Payload' => { - #'BadChars' => "[;`$<>|]", # Don't apply bcuz of the perl stub applied + #'BadChars' => "[;`$<>|]", # Don't apply bcuz of the perl stub applied 'Compat' => { 'RequiredCmd' => 'perl netcat-e openssl python gawk' } @@ -66,12 +66,13 @@ class Metasploit3 < Msf::Exploit::Remote version = "" res = send_soap_request("get_dpkg") - if res && res.code == 200 - if res.headers['SOAPServer'] && res.headers['SOAPServer'] =~ /SOAP::Lite/ - if res.body.to_s =~ /alienvault-center\s*([\d\.]*)-\d/ - version = $1 - end - end + if res && + res.code == 200 && + res.headers['SOAPServer'] && + res.headers['SOAPServer'] =~ /SOAP::Lite/ && + res.body.to_s =~ /alienvault-center\s*([\d\.]*)-\d/ + + version = $1 end if version.empty? || version >= "4.7.0"