-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwordpress.php
More file actions
61 lines (49 loc) · 1.53 KB
/
wordpress.php
File metadata and controls
61 lines (49 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
//read base path out of config
// define the path to your
//define("PATH_TO_ROOT", "/var/www/webservers/www.ra23.net/documents/phpips/trunk/" );
define("PATH_TO_ROOT", "/home/ar/eclipse-workspaces/eclipse_helios/php-ips/");
/*
* here: relative from PATH_TO_ROOT
*/
define("PATH_TO_PHPIDS", PATH_TO_ROOT."phpids-0.6.5/lib/");
define("PATH_TO_PHPIPS", PATH_TO_ROOT."phpips/");
// use phpids shipped with this package
set_include_path (get_include_path().":".PATH_TO_PHPIDS);
//define the request array
$request = array("GET" => $_GET, "POST" => $_POST, "COOKIE" => $_COOKIE);
//include the init Class from phpips
if($_GET["reset_session"]=="doit"){
session_start();
session_destroy();
}
if (file_exists(PATH_TO_PHPIDS."/IDS/Init.php")){
require_once(PATH_TO_PHPIDS."/IDS/Init.php");
}
else {
throw new Exception("PHPIDS not found");
}
// load PHPIDS
session_start();
$init=IDS_Init::init(PATH_TO_PHPIDS."IDS/Config/Config.ini.php");
$ids = new IDS_Monitor($request, $init);
//get the result object from PHPIDS
$result = $ids->run();
//check if something badly is found
//if something is found
// include the IPS Init Class
require_once (PATH_TO_PHPIPS . "lib/Ips/Init.php");
//initialise the system
$IpsInit=Ips_Init::init("phpips/etc/System.ini");
$registry=Ips_Registry::getInstance();
if ($registry->isSimulationEnabled()){
$registry->enableSimulation();
} else {
$registry->disableSimulation();
}
//var_dump(Ips_Registry::getInstance());
//die();
//run the IPS System
$ips=Ips_System::getInstance($result);
$ips->run();
?>