From b7887722153e72688998369840b4a3b46778eff2 Mon Sep 17 00:00:00 2001 From: jvazquez-r7 Date: Fri, 16 Oct 2015 13:28:37 -0500 Subject: [PATCH] break only if 'make_nops' is able generate the nop sled --- lib/msf/core/exploit.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/msf/core/exploit.rb b/lib/msf/core/exploit.rb index a80c8831c1..df878fa3eb 100644 --- a/lib/msf/core/exploit.rb +++ b/lib/msf/core/exploit.rb @@ -1034,12 +1034,11 @@ class Exploit < Msf::Module nop_sled = nop.generate_sled(count, 'BadChars' => payload_badchars || '', 'SaveRegisters' => save_regs) + break rescue wlog("#{self.refname}: Nop generator #{nop.refname} failed to generate sled for exploit: #{$!}", 'core', LEV_0) end - - break } nop_sled