fixes the exception handling in #exploit_simple

The exception handling in the #exploit_simple method tries to set
error on exploit but exploit is defined within the begin block
causing a noMethodError on nilClass

MS-1608
bug/bundler_fix
David Maloney 2016-05-31 11:46:05 -05:00
parent c35322ec3f
commit a27d10c200
No known key found for this signature in database
GPG Key ID: DEDBA9DC3A913DB2
1 changed files with 2 additions and 2 deletions

View File

@ -56,11 +56,11 @@ module Exploit
# job. # job.
# #
def self.exploit_simple(oexploit, opts, &block) def self.exploit_simple(oexploit, opts, &block)
exploit = oexploit.replicant
# Trap and print errors here (makes them UI-independent) # Trap and print errors here (makes them UI-independent)
begin begin
# Clone the module to prevent changes to the original instance # Clone the module to prevent changes to the original instance
exploit = oexploit.replicant
Msf::Simple::Framework.simplify_module( exploit, false ) Msf::Simple::Framework.simplify_module( exploit, false )
yield(exploit) if block_given? yield(exploit) if block_given?