From 99a573a013de05ea7e0b4bbff947ce4b3e9e309a Mon Sep 17 00:00:00 2001 From: wchen-r7 Date: Thu, 19 May 2016 19:21:45 -0500 Subject: [PATCH] Do unless instead "if !" to follow the Ruby guideline --- modules/exploits/multi/http/struts_code_exec.rb | 2 +- .../exploits/multi/http/struts_code_exec_exception_delegator.rb | 2 +- modules/exploits/windows/antivirus/ams_hndlrsvc.rb | 2 +- modules/exploits/windows/antivirus/ams_xfr.rb | 2 +- .../exploits/windows/http/ca_totaldefense_regeneratereports.rb | 2 +- modules/exploits/windows/http/osb_uname_jlist.rb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/exploits/multi/http/struts_code_exec.rb b/modules/exploits/multi/http/struts_code_exec.rb index 2ea170ee66..b6480099dc 100644 --- a/modules/exploits/multi/http/struts_code_exec.rb +++ b/modules/exploits/multi/http/struts_code_exec.rb @@ -133,7 +133,7 @@ class MetasploitModule < Msf::Exploit::Remote end def exploit - if !datastore['CMD'].blank? + unless datastore['CMD'].blank? print_status("Executing user supplied command") execute_command(datastore['CMD']) return diff --git a/modules/exploits/multi/http/struts_code_exec_exception_delegator.rb b/modules/exploits/multi/http/struts_code_exec_exception_delegator.rb index d01a21e6cc..9d9bcc461f 100644 --- a/modules/exploits/multi/http/struts_code_exec_exception_delegator.rb +++ b/modules/exploits/multi/http/struts_code_exec_exception_delegator.rb @@ -186,7 +186,7 @@ class MetasploitModule < Msf::Exploit::Remote end def exploit - if !datastore['CMD'].blank? + unless datastore['CMD'].blank? print_status("Executing user supplied command") execute_command(datastore['CMD']) return diff --git a/modules/exploits/windows/antivirus/ams_hndlrsvc.rb b/modules/exploits/windows/antivirus/ams_hndlrsvc.rb index 5b8f10d687..3a1f29e0f0 100644 --- a/modules/exploits/windows/antivirus/ams_hndlrsvc.rb +++ b/modules/exploits/windows/antivirus/ams_hndlrsvc.rb @@ -149,7 +149,7 @@ class MetasploitModule < Msf::Exploit::Remote def exploit - if !datastore['CMD'].blank? + unless datastore['CMD'].blank? print_status("Executing command '#{datastore['CMD']}'") execute_command(datastore['CMD']) return diff --git a/modules/exploits/windows/antivirus/ams_xfr.rb b/modules/exploits/windows/antivirus/ams_xfr.rb index e8570c3f11..73479bd7c3 100644 --- a/modules/exploits/windows/antivirus/ams_xfr.rb +++ b/modules/exploits/windows/antivirus/ams_xfr.rb @@ -92,7 +92,7 @@ class MetasploitModule < Msf::Exploit::Remote end def exploit - if !datastore['CMD'].blank? + unless datastore['CMD'].blank? print_status("Executing command '#{datastore['CMD']}'") execute_command(datastore['CMD']) return diff --git a/modules/exploits/windows/http/ca_totaldefense_regeneratereports.rb b/modules/exploits/windows/http/ca_totaldefense_regeneratereports.rb index 4b4c9cf3a5..1b994c17e7 100644 --- a/modules/exploits/windows/http/ca_totaldefense_regeneratereports.rb +++ b/modules/exploits/windows/http/ca_totaldefense_regeneratereports.rb @@ -110,7 +110,7 @@ class MetasploitModule < Msf::Exploit::Remote def exploit - if !datastore['CMD'].blank? + unless datastore['CMD'].blank? print_status("Executing command '#{datastore['CMD']}'") execute_command(datastore['CMD']) return diff --git a/modules/exploits/windows/http/osb_uname_jlist.rb b/modules/exploits/windows/http/osb_uname_jlist.rb index ae6ab788b5..792e5db124 100644 --- a/modules/exploits/windows/http/osb_uname_jlist.rb +++ b/modules/exploits/windows/http/osb_uname_jlist.rb @@ -93,7 +93,7 @@ class MetasploitModule < Msf::Exploit::Remote def exploit - if !datastore['CMD'].blank? + unless datastore['CMD'].blank? print_status("Executing command '#{datastore['CMD']}'") execute_command(datastore['CMD']) return