Fix #3 Checking for the debug.log in wp-content
This commit is contained in:
12
spec/fixtures/wpscan/wp_target/debug_log/debug.log
vendored
Normal file
12
spec/fixtures/wpscan/wp_target/debug_log/debug.log
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
[13-Jan-2009 01:53:25] PHP Fatal error: Class 'Log' not found in /home/****/public_html/svatba/wp-content/plugins/fbconnect/Log/null.php on line 19
|
||||
[13-Jan-2009 01:55:58] PHP Fatal error: Class 'Log' not found in /home/****/public_html/svatba/wp-content/plugins/fbconnect/Log/file.php on line 20
|
||||
[13-Jan-2009 02:13:34] PHP Fatal error: Class 'Log' not found in /home/****/public_html/svatba/wp-content/plugins/fbconnect/Log/error_log.php on line 19
|
||||
[15-Feb-2009 10:47:54] PHP Fatal error: Class 'Log' not found in /home/****/public_html/svatba/wp-content/plugins/fbconnect/Log/error_log.php on line 19
|
||||
[15-Feb-2009 11:36:15] PHP Fatal error: Class 'Log' not found in /home/****/public_html/svatba/wp-content/plugins/fbconnect/Log/null.php on line 19
|
||||
[15-Feb-2009 16:45:37] PHP Fatal error: Class 'Log' not found in /home/****/public_html/svatba/wp-content/plugins/fbconnect/Log/file.php on line 20
|
||||
[04-Mar-2009 18:54:31] PHP Fatal error: Class 'Log' not found in /home/****/public_html/svatba/wp-content/plugins/fbconnect/Log/file.php on line 20
|
||||
[21-Mar-2009 20:32:21] PHP Fatal error: Class 'Log' not found in /home/****/public_html/svatba/wp-content/plugins/fbconnect/Log/null.php on line 19
|
||||
[29-Mar-2009 16:25:40] PHP Fatal error: Class 'Log' not found in /home3/****/public_html/svatba/wp-content/plugins/fbconnect/Log/null.php on line 19
|
||||
[06-Apr-2009 01:17:56] PHP Fatal error: Class 'Log' not found in /home3/****/public_html/svatba/wp-content/plugins/fbconnect/Log/file.php on line 20
|
||||
[03-May-2009 00:07:57] PHP Fatal error: Class 'Log' not found in /home3/****/public_html/svatba/wp-content/plugins/fbconnect/Log/null.php on line 19
|
||||
[10-May-2009 05:57:57] PHP Fatal error: Class 'Log' not found in /home3/****/public_html/svatba/wp-content/plugins/fbconnect/Log/file.php on line 20
|
||||
@@ -109,8 +109,8 @@ describe WpTarget do
|
||||
|
||||
it "should also check in src attributes" do
|
||||
@target_url = "http://lamp/wordpress-3.4.1"
|
||||
@fixture = fixtures_dir + "/wordpress-3.4.1-in-src.htm"
|
||||
@expected = "wp-content"
|
||||
@fixture = fixtures_dir + "/wordpress-3.4.1-in-src.htm"
|
||||
@expected = "wp-content"
|
||||
end
|
||||
|
||||
end
|
||||
@@ -132,4 +132,31 @@ describe WpTarget do
|
||||
@expected = "wp-content/plugins"
|
||||
end
|
||||
end
|
||||
|
||||
describe "#debug_log_url" do
|
||||
it "should return 'http://example.localhost/wp-content/debug.log" do
|
||||
@wp_target.stub(:wp_content_dir => "wp-content")
|
||||
@wp_target.debug_log_url.should === "http://example.localhost/wp-content/debug.log"
|
||||
end
|
||||
end
|
||||
|
||||
describe "#has_debug_log?" do
|
||||
let(:fixtures_dir) { SPEC_FIXTURES_WPSCAN_WP_TARGET_DIR + "/debug_log" }
|
||||
|
||||
after :each do
|
||||
@wp_target.stub(:wp_content_dir => "wp-content")
|
||||
stub_request_to_fixture(:url => @wp_target.debug_log_url(), :fixture => @fixture)
|
||||
@wp_target.has_debug_log?.should === @expected
|
||||
end
|
||||
|
||||
it "should return false" do
|
||||
@fixture = SPEC_FIXTURES_DIR + "/empty-file"
|
||||
@expected = false
|
||||
end
|
||||
|
||||
it "should return true" do
|
||||
@fixture = fixtures_dir + "/debug.log"
|
||||
@expected = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user