Fixes #4630 as well. See also #4122 and #4552.bug/bundler_fix
commit
2ba0f8264e
|
@ -151,19 +151,17 @@ protected
|
||||||
rescue ::Exception => e
|
rescue ::Exception => e
|
||||||
mod.error = e
|
mod.error = e
|
||||||
mod.print_error("Auxiliary failed: #{e.class} #{e}")
|
mod.print_error("Auxiliary failed: #{e.class} #{e}")
|
||||||
elog("Auxiliary failed: #{e.class} #{e}", 'core', LEV_0)
|
if(e.class.to_s != 'Msf::OptionValidateError')
|
||||||
|
|
||||||
if e.kind_of?(Msf::OptionValidateError)
|
|
||||||
dlog("Call stack:\n#{$@.join("\n")}", 'core', LEV_3)
|
|
||||||
else
|
|
||||||
mod.print_error("Call stack:")
|
mod.print_error("Call stack:")
|
||||||
e.backtrace.each do |line|
|
e.backtrace.each do |line|
|
||||||
break if line =~ /lib.msf.base.simple.auxiliary.rb/
|
break if line =~ /lib.msf.base.simple.auxiliary.rb/
|
||||||
mod.print_error(" #{line}")
|
mod.print_error(" #{line}")
|
||||||
end
|
end
|
||||||
elog("Call stack:\n#{$@.join("\n")}", 'core', LEV_0)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
elog("Auxiliary failed: #{e.class} #{e}", 'core', LEV_0)
|
||||||
|
dlog("Call stack:\n#{$@.join("\n")}", 'core', LEV_3)
|
||||||
|
|
||||||
mod.cleanup
|
mod.cleanup
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -184,3 +182,4 @@ end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -147,17 +147,7 @@ module Exploit
|
||||||
exploit.error = e
|
exploit.error = e
|
||||||
exploit.print_error("Exploit failed: #{e}")
|
exploit.print_error("Exploit failed: #{e}")
|
||||||
elog("Exploit failed (#{exploit.refname}): #{e}", 'core', LEV_0)
|
elog("Exploit failed (#{exploit.refname}): #{e}", 'core', LEV_0)
|
||||||
|
dlog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_3)
|
||||||
if e.kind_of?(Msf::OptionValidateError)
|
|
||||||
dlog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_3)
|
|
||||||
else
|
|
||||||
exploit.print_error("Call stack:")
|
|
||||||
e.backtrace.each do |line|
|
|
||||||
break if line =~ /lib.msf.base.simple.exploit.rb/
|
|
||||||
exploit.print_error(" #{line}")
|
|
||||||
end
|
|
||||||
elog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_0)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return driver.session if driver
|
return driver.session if driver
|
||||||
|
@ -209,3 +199,4 @@ end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -121,19 +121,17 @@ protected
|
||||||
rescue ::Exception => e
|
rescue ::Exception => e
|
||||||
mod.error = e
|
mod.error = e
|
||||||
mod.print_error("Post failed: #{e.class} #{e}")
|
mod.print_error("Post failed: #{e.class} #{e}")
|
||||||
elog("Post failed: #{e.class} #{e}", 'core', LEV_0)
|
if(e.class.to_s != 'Msf::OptionValidateError')
|
||||||
|
|
||||||
if e.kind_of?(Msf::OptionValidateError)
|
|
||||||
dlog("Call stack:\n#{$@.join("\n")}", 'core', LEV_3)
|
|
||||||
else
|
|
||||||
mod.print_error("Call stack:")
|
mod.print_error("Call stack:")
|
||||||
e.backtrace.each do |line|
|
e.backtrace.each do |line|
|
||||||
break if line =~ /lib.msf.base.simple.post.rb/
|
break if line =~ /lib.msf.base.simple.post.rb/
|
||||||
mod.print_error(" #{line}")
|
mod.print_error(" #{line}")
|
||||||
end
|
end
|
||||||
elog("Call stack:\n#{$@.join("\n")}", 'core', LEV_0)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
elog("Post failed: #{e.class} #{e}", 'core', LEV_0)
|
||||||
|
dlog("Call stack:\n#{$@.join("\n")}", 'core', LEV_3)
|
||||||
|
|
||||||
mod.cleanup
|
mod.cleanup
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -156,3 +154,4 @@ end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -271,20 +271,14 @@ protected
|
||||||
exploit.fail_reason = Msf::Exploit::Failure::Unknown
|
exploit.fail_reason = Msf::Exploit::Failure::Unknown
|
||||||
end
|
end
|
||||||
|
|
||||||
elog("Exploit failed (#{exploit.refname}): #{msg}", 'core', LEV_0)
|
|
||||||
|
|
||||||
if exploit.fail_reason == Msf::Exploit::Failure::Unknown
|
if exploit.fail_reason == Msf::Exploit::Failure::Unknown
|
||||||
exploit.print_error("Exploit failed: #{msg}")
|
exploit.print_error("Exploit failed: #{msg}")
|
||||||
exploit.print_error("Call stack:")
|
|
||||||
e.backtrace.each do |line|
|
|
||||||
break if line =~ /lib.msf.base.core.exploit_driver.rb/
|
|
||||||
exploit.print_error(" #{line}")
|
|
||||||
end
|
|
||||||
elog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_0)
|
|
||||||
else
|
else
|
||||||
exploit.print_error("Exploit failed [#{exploit.fail_reason}]: #{msg}")
|
exploit.print_error("Exploit failed [#{exploit.fail_reason}]: #{msg}")
|
||||||
dlog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_3)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
elog("Exploit failed (#{exploit.refname}): #{msg}", 'core', LEV_0)
|
||||||
|
dlog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_3)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Record the error to various places
|
# Record the error to various places
|
||||||
|
@ -335,3 +329,4 @@ protected
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -120,17 +120,12 @@ class Auxiliary
|
||||||
print_error("Auxiliary interrupted by the console user")
|
print_error("Auxiliary interrupted by the console user")
|
||||||
rescue ::Exception => e
|
rescue ::Exception => e
|
||||||
print_error("Auxiliary failed: #{e.class} #{e}")
|
print_error("Auxiliary failed: #{e.class} #{e}")
|
||||||
elog("Auxiliary failed: #{e.class} #{e}", 'core', LEV_0)
|
if(e.class.to_s != 'Msf::OptionValidateError')
|
||||||
|
|
||||||
if e.kind_of?(Msf::OptionValidateError)
|
|
||||||
dlog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_3)
|
|
||||||
else
|
|
||||||
print_error("Call stack:")
|
print_error("Call stack:")
|
||||||
e.backtrace.each do |line|
|
e.backtrace.each do |line|
|
||||||
break if line =~ /lib.msf.base.simple/
|
break if line =~ /lib.msf.base.simple/
|
||||||
print_error(" #{line}")
|
print_error(" #{line}")
|
||||||
end
|
end
|
||||||
elog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_0)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return false
|
return false
|
||||||
|
@ -157,3 +152,4 @@ class Auxiliary
|
||||||
end
|
end
|
||||||
|
|
||||||
end end end end
|
end end end end
|
||||||
|
|
||||||
|
|
|
@ -121,18 +121,12 @@ class Exploit
|
||||||
raise $!
|
raise $!
|
||||||
rescue ::Exception => e
|
rescue ::Exception => e
|
||||||
print_error("Exploit exception (#{mod.refname}): #{e.class} #{e}")
|
print_error("Exploit exception (#{mod.refname}): #{e.class} #{e}")
|
||||||
|
if(e.class.to_s != 'Msf::OptionValidateError')
|
||||||
elog("Exploit exception (#{mod.refname}): #{e.class} #{e}", 'core', LEV_0)
|
|
||||||
|
|
||||||
if e.kind_of?(Msf::OptionValidateError)
|
|
||||||
dlog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_3)
|
|
||||||
else
|
|
||||||
print_error("Call stack:")
|
print_error("Call stack:")
|
||||||
e.backtrace.each do |line|
|
e.backtrace.each do |line|
|
||||||
break if line =~ /lib.msf.base.simple/
|
break if line =~ /lib.msf.base.simple/
|
||||||
print_error(" #{line}")
|
print_error(" #{line}")
|
||||||
end
|
end
|
||||||
elog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_0)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -122,18 +122,12 @@ class Post
|
||||||
print_error("Post interrupted by the console user")
|
print_error("Post interrupted by the console user")
|
||||||
rescue ::Exception => e
|
rescue ::Exception => e
|
||||||
print_error("Post failed: #{e.class} #{e}")
|
print_error("Post failed: #{e.class} #{e}")
|
||||||
|
if (e.class.to_s != 'Msf::OptionValidateError')
|
||||||
elog("Post failed: #{e.class} #{e}", 'core', LEV_0)
|
|
||||||
|
|
||||||
if e.kind_of?(Msf::OptionValidateError)
|
|
||||||
dlog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_3)
|
|
||||||
else
|
|
||||||
print_error("Call stack:")
|
print_error("Call stack:")
|
||||||
e.backtrace.each do |line|
|
e.backtrace.each do |line|
|
||||||
break if line =~ /lib.msf.base.simple/
|
break if line =~ /lib.msf.base.simple/
|
||||||
print_error(" #{line}")
|
print_error(" #{line}")
|
||||||
end
|
end
|
||||||
elog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_0)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return false
|
return false
|
||||||
|
@ -160,3 +154,4 @@ class Post
|
||||||
end
|
end
|
||||||
|
|
||||||
end end end end
|
end end end end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue