Log the exploit name when the module raises an exception, helps track down bugs during automation
git-svn-id: file:///home/svn/framework3/trunk@7529 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
7fb9c4a791
commit
ba5da501bf
|
@ -129,7 +129,7 @@ module Exploit
|
|||
raise $!
|
||||
rescue ::Exception => e
|
||||
exploit.print_error("Exploit failed: #{e}")
|
||||
elog("Exploit failed: #{e}", 'core', LEV_0)
|
||||
elog("Exploit failed (#{exploit.refname}): #{e}", 'core', LEV_0)
|
||||
dlog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_3)
|
||||
return
|
||||
end
|
||||
|
@ -178,3 +178,4 @@ end
|
|||
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ protected
|
|||
rescue ::Exception
|
||||
|
||||
exploit.print_error("Exploit failed: #{$!}")
|
||||
elog("Exploit failed: #{$!}", 'core', LEV_0)
|
||||
elog("Exploit failed (#{exploit.refname}): #{$!}", 'core', LEV_0)
|
||||
dlog("Call stack:\n#{$@.join("\n")}", 'core', LEV_3)
|
||||
|
||||
payload.stop_handler
|
||||
|
@ -209,3 +209,4 @@ protected
|
|||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@ class Exploit
|
|||
rescue ::Interrupt
|
||||
raise $!
|
||||
rescue ::Exception => e
|
||||
print_error("Exploit failed: #{e.class} #{e}")
|
||||
print_error("Exploit failed (#{mod.refname}): #{e.class} #{e}")
|
||||
if(e.class.to_s != 'Msf::OptionValidateError')
|
||||
print_error("Call stack:")
|
||||
e.backtrace.each do |line|
|
||||
|
@ -215,3 +215,4 @@ class Exploit
|
|||
end
|
||||
|
||||
end end end end
|
||||
|
||||
|
|
Loading…
Reference in New Issue