From 508420f30f7b3e65d9995c6b89e1780c1c7941a3 Mon Sep 17 00:00:00 2001 From: Erwan Date: Fri, 24 Aug 2012 08:34:12 +0200 Subject: [PATCH] Debug.log detection if it contains only PHP notices --- lib/wpscan/wp_target.rb | 2 +- spec/lib/wpscan/wp_target_spec.rb | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/wpscan/wp_target.rb b/lib/wpscan/wp_target.rb index 0716b9e6..ce0d0693 100644 --- a/lib/wpscan/wp_target.rb +++ b/lib/wpscan/wp_target.rb @@ -106,7 +106,7 @@ class WpTarget end def has_debug_log? - Browser.instance.get(debug_log_url()).body[%r{\[[^\]]+\] PHP (?:Warning|Error):}] ? true : false + Browser.instance.get(debug_log_url()).body[%r{\[[^\]]+\] PHP (?:Warning|Error|Notice):}] ? true : false end def debug_log_url diff --git a/spec/lib/wpscan/wp_target_spec.rb b/spec/lib/wpscan/wp_target_spec.rb index 41870d13..582aff54 100644 --- a/spec/lib/wpscan/wp_target_spec.rb +++ b/spec/lib/wpscan/wp_target_spec.rb @@ -158,5 +158,10 @@ describe WpTarget do @fixture = fixtures_dir + "/debug.log" @expected = true end + + it "should also detect it if there are PHP notice" do + @fixture = fixtures_dir + "/debug-notice.log" + @expected = true + end end end