log errors into framework.log
parent
01daadcc49
commit
7b52bcb657
|
@ -151,17 +151,19 @@ 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.class.to_s != 'Msf::OptionValidateError')
|
||||||
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)
|
||||||
|
else
|
||||||
|
dlog("Call stack:\n#{$@.join("\n")}", 'core', LEV_3)
|
||||||
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
|
||||||
|
@ -182,4 +184,3 @@ end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,17 @@ 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.class.to_s != 'Msf::OptionValidateError')
|
||||||
|
mod.print_error("Call stack:")
|
||||||
|
e.backtrace.each do |line|
|
||||||
|
break if line =~ /lib.msf.base.simple.exploit.rb/
|
||||||
|
mod.print_error(" #{line}")
|
||||||
|
end
|
||||||
|
elog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_0)
|
||||||
|
else
|
||||||
|
dlog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_3)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return driver.session if driver
|
return driver.session if driver
|
||||||
|
@ -199,4 +209,3 @@ end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -121,17 +121,19 @@ 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.class.to_s != 'Msf::OptionValidateError')
|
||||||
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)
|
||||||
|
else
|
||||||
|
dlog("Call stack:\n#{$@.join("\n")}", 'core', LEV_3)
|
||||||
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
|
||||||
|
@ -154,4 +156,3 @@ end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue