Beispiel #1
0
// Randomly generate an error just to "Keep it real"
// This was mainly done to fool w3af
$labyrinth_handle->SpinTheWheelOfErrors();
// If index.php is in the request URI, lob it off. Otherwise, lob off the trailing slash.
if (preg_match("/index.php/", $_SERVER['REQUEST_URI'])) {
    $directory = dirname($_SERVER['REQUEST_URI']);
} else {
    $directory = rtrim($_SERVER['REQUEST_URI'], "/");
}
// Alert
$base_level = sizeof(explode('/', rtrim($config['web_path'], '/')));
$uri_level = sizeof(explode('/', $directory));
//Log the crawler to the database
$labyrinth_handle->LogCrawler();
if ($uri_level - $base_level >= $config['alert_levels_deep']) {
    $labyrinth_handle->GenerateAlert("Crawler Ensnared!");
}
// Read the text into a variable for processing by the dissociated press class.
$fh = fopen($config['corpus'], 'r');
$corpus = fread($fh, filesize($config['corpus']));
fclose($fh);
?>

<link rel="stylesheet" type="text/css" href="<?php 
print $config['web_path'];
?>
/labyrinth.css">
<title><?php 
print basename($_SERVER['REQUEST_URI']);
?>
</title>