From 7d9d169a1a97e1ad01457527fa1e9369b0a1a997 Mon Sep 17 00:00:00 2001 From: Joshua Drake Date: Sun, 7 Feb 2010 03:51:14 +0000 Subject: [PATCH] exploit/sunrpc: return nil on error git-svn-id: file:///home/svn/framework3/trunk@8394 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/core/exploit/sunrpc.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/msf/core/exploit/sunrpc.rb b/lib/msf/core/exploit/sunrpc.rb index 4261edbd18..6fc245658a 100644 --- a/lib/msf/core/exploit/sunrpc.rb +++ b/lib/msf/core/exploit/sunrpc.rb @@ -65,6 +65,7 @@ module Exploit::Remote::SunRPC err << 'RPC did not execute' if arr[4] != SUCCESS err << 'Program not available' if arr[5] == 0 print_error(err) + return nil end rpcobj.pport = arr[5] @@ -93,6 +94,7 @@ module Exploit::Remote::SunRPC end end print_error("#{rhost} - #{err}") + return nil end return ret end @@ -125,6 +127,7 @@ module Exploit::Remote::SunRPC else err << "Unknown Error" end print_error("#{rhost} - #{err}") + return nil end return ret