first commit

This commit is contained in:
OPSXCQ 2016-12-02 17:19:11 -02:00
parent 985a5c928c
commit f40a84879c
No known key found for this signature in database
GPG key ID: 9AD730FE9CDE5661
551 changed files with 72374 additions and 24 deletions

165
dvwa/external/phpids/0.6/LICENSE vendored Normal file
View file

@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

18
dvwa/external/phpids/0.6/build.xml vendored Normal file
View file

@ -0,0 +1,18 @@
<project name="PHPIDS" default="info">
<target name="info"/>
<target name="docs">
<phpdoc
title="PHPIDS documentation"
destdir="docs"
quiet="true"
sourcecode="true"
output="Html:frames:default"
defaultpackagename="PHPIDS"
defaultcategoryname="PHPIDS">
<fileset dir="lib">
<include name="**/*.php"/>
</fileset>
</phpdoc>
</target>
</project>

View file

@ -0,0 +1,20 @@
PHPIDS
Requirements: PHP5, SimpleXML
Copyright (c) 2007 PHPIDS (http://php-ids.org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the license.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
== IMPORTANT ==
Please read header comments in ids.php for further information on how to
install this software
== IMPORTANT ==

View file

@ -0,0 +1,269 @@
<?php
/**
* PHP IDS
*
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2007 PHPIDS (http://php-ids.org)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* @package PHPIDS
*/
/**
* HOWTO - CakePHP with PHPIDS in ten steps
*
* 0. Install the intrusion table with the intrusions.sql
* 1. Place the phpids core files (see IDS/lib) in you vendors folder:
* vendors/
* phpids/
* IDS/
* Caching/..
* Config/..
* Filter/...
* Log/...
* tmp/... (this folder needs write access!)
* Converter.php
* Event.php
* Monitor.php
* Report.php
* default_filter.xml
*
* 2. Place the intrusion.php in your model folder
* 3. Add component ids to app_controller.php components like this:
*
* var $components = array('RequestHandler', 'Ids', ...);
*
* 4. Place the ids.php in you controllers/components folder
* 5. Add the following code to the app_controller.php - right
* beneath the function head of beforeFilter():
*
* //BOF
* $bare = isset($this->params['bare'])?$this->params['bare']:0;
* if(($bare === 0 || $this->RequestHandler->isAjax()) && DEBUG == 0 && ADMIN == 0) {
* $this->Ids->detect($this);
* }
* //EOF
*
* 6. Make sure DEBUG and ADMIN are 0 if you want to test
* 7. Customize some stuff in the Config/Config.ini if you like
* 8. Inject some XSS via URL or an arbitrary form of your webapp
* 9. Please make sure you tested the use of the PHPIDS before you go live
*
* If you have problems getting the PHPIDS to work just drop us a line via our forum
*
* http://forum.php-ids.org/
*
*/
/**
* The CakePHP IDS component
*
* @package PHPIDS
*/
class IdsComponent extends Object {
/**
* define the threshold for the ids reactions
*/
private $threshold = array(
'log' => 3,
'mail' => 9,
'warn' => 27,
'kick' => 81
);
/**
* define the email addresses for idsmail
*/
private $email = array(
'address1@what.ever',
'address2@what.ever'
);
/**
* the init object
*/
private $init = NULL;
/**
* This function includes the IDS vendor parts and runs the
* detection routines on the request array.
*
* @param object cake controller object
* @return boolean
*/
public function detect(&$controller) {
$this->controller = &$controller;
$this->name = Inflector::singularize($this->controller->name);
#set include path for IDS and store old one
$path = get_include_path();
set_include_path( VENDORS . 'phpids/');
#require the needed files
vendor('phpids/IDS/Init');
#add request url and user agent
$_REQUEST['IDS_request_uri'] = $_SERVER['REQUEST_URI'];
if (isset($_SERVER['HTTP_USER_AGENT'])) {
$_REQUEST['IDS_user_agent'] = $_SERVER['HTTP_USER_AGENT'];
}
#init the PHPIDS and pass the REQUEST array
$this->init = IDS_Init::init();
$ids = new IDS_Monitor($this->init, $_REQUEST);
$result = $ids->run();
// Re-set include path
set_include_path($path);
if (!$result->isEmpty()) {
$this->react($result);
}
return true;
}
/**
* This function rects on the values in
* the incoming results array.
*
* Depending on the impact value certain actions are
* performed.
*
* @param IDS_Report $result
* @return boolean
*/
private function react(IDS_Report $result) {
$new = $this->controller
->Session
->read('IDS.Impact') + $result->getImpact();
$this->controller->Session->write('IDS.Impact', $new);
$impact = $this->controller->Session->read('IDS.Impact');
if ($impact >= $this->threshold['kick']) {
$this->idslog($result, 3, $impact);
$this->idsmail($result);
$this->idskick($result);
return true;
} else if ($impact >= $this->threshold['warn']) {
$this->idslog($result, 2, $impact);
$this->idsmail($result);
$this->idswarn($result);
return true;
} else if ($impact >= $this->threshold['mail']) {
$this->idslog($result, 1, $impact);
$this->idsmail($result);
return true;
} else if ($impact >= $this->threshold['log']) {
$this->idslog($result, 0, $impact);
return true;
} else {
return true;
}
}
/**
* This function writes an entry about the intrusion
* to the intrusion database
*
* @param array $results
* @return boolean
*/
private function idslog($result, $reaction = 0) {
$user = $this->controller
->Session->read('User.id') ?
$this->controller->Session->read('User.id') :
0;
$ip = ($_SERVER['SERVER_ADDR'] != '127.0.0.1') ?
$_SERVER['SERVER_ADDR'] :
(isset($_SERVER['HTTP_X_FORWARDED_FOR']) ?
$_SERVER['HTTP_X_FORWARDED_FOR'] :
'127.0.0.1');
foreach ($result as $event) {
$data = array(
'Intrusion' => array(
'name' => $event->getName(),
'value' => stripslashes($event->getValue()),
'page' => $_SERVER['REQUEST_URI'],
'userid' => $user,
'session' => session_id() ? session_id() : '0',
'ip' => $ip,
'reaction' => $reaction,
'impact' => $result->getImpact()
)
);
}
loadModel('Intrusion');
$intrusion = new Intrusion;
$saveable = array('name', 'value', 'page', 'userid', 'session', 'ip', 'reaction', 'impact');
$intrusion->save($data, false, $saveable);
return true;
}
/**
* This function sends out a mail
* about the intrusion including the intrusion details
*
* @param array $results
* @return boolean
*/
private function idsmail($result) {
vendor('phpids/IDS/Log/Email.php');
vendor('phpids/IDS/Log/Composite.php');
$compositeLog = new IDS_Log_Composite();
$compositeLog->addLogger(
IDS_Log_Email::getInstance($this->init->config['IDS_Logging']['recipient'],
$this->config['IDS_Logging']['subject'],
NULL, //optional headers
$this->init->config['IDS_Logging']['safemode'],
$this->init->config['IDS_Logging']['allowed_rate'],
$this->init->config['IDS_Basic']['tmp_path'])
);
if (!$result->isEmpty()) {
$compositeLog->execute($result);
}
return true;
}
/**
* //todo
*
*
*/
private function idswarn($result) {
return $result;
}
/**
* //todo
*
*
*/
private function idskick($result) {
return $result;
}
}

View file

@ -0,0 +1,21 @@
<?php
/**
* PHP IDS
*
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2007 PHPIDS (http://php-ids.org)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
class Intrusion extends AppModel {
//nothing to do here - unless you want to
}

View file

@ -0,0 +1,124 @@
<?php
/**
* PHPIDS
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2007 PHPIDS group (http://php-ids.org)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
// set the include path properly for PHPIDS
set_include_path(
get_include_path()
. PATH_SEPARATOR
. '../../lib/'
);
if (!session_id()) {
session_start();
}
require_once 'IDS/Init.php';
try {
/*
* It's pretty easy to get the PHPIDS running
* 1. Define what to scan
*
* Please keep in mind what array_merge does and how this might interfer
* with your variables_order settings
*/
$request = array(
'REQUEST' => $_REQUEST,
'GET' => $_GET,
'POST' => $_POST,
'COOKIE' => $_COOKIE
);
$init = IDS_Init::init(dirname(__FILE__) . '/../../lib/IDS/Config/Config.ini');
/**
* You can also reset the whole configuration
* array or merge in own data
*
* This usage doesn't overwrite already existing values
* $config->setConfig(array('General' => array('filter_type' => 'xml')));
*
* This does (see 2nd parameter)
* $config->setConfig(array('General' => array('filter_type' => 'xml')), true);
*
* or you can access the config directly like here:
*/
$init->config['General']['base_path'] = dirname(__FILE__) . '/../../lib/IDS/';
$init->config['General']['use_base_path'] = true;
$init->config['Caching']['caching'] = 'none';
// 2. Initiate the PHPIDS and fetch the results
$ids = new IDS_Monitor($request, $init);
$result = $ids->run();
/*
* That's it - now you can analyze the results:
*
* In the result object you will find any suspicious
* fields of the passed array enriched with additional info
*
* Note: it is moreover possible to dump this information by
* simply echoing the result object, since IDS_Report implemented
* a __toString method.
*/
if (!$result->isEmpty()) {
echo $result;
/*
* The following steps are optional to log the results
*/
require_once 'IDS/Log/File.php';
require_once 'IDS/Log/Composite.php';
$compositeLog = new IDS_Log_Composite();
$compositeLog->addLogger(IDS_Log_File::getInstance($init));
/*
* Note that you might also use different logging facilities
* such as IDS_Log_Email or IDS_Log_Database
*
* Just uncomment the following lines to test the wrappers
*/
/*
*
require_once 'IDS/Log/Email.php';
require_once 'IDS/Log/Database.php';
$compositeLog->addLogger(
IDS_Log_Email::getInstance($init),
IDS_Log_Database::getInstance($init)
);
*/
$compositeLog->execute($result);
} else {
echo '<a href="?test=%22><script>eval(window.name)</script>">No attack detected - click for an example attack</a>';
}
} catch (Exception $e) {
/*
* sth went terribly wrong - maybe the
* filter rules weren't found?
*/
printf(
'An error occured: %s',
$e->getMessage()
);
}

View file

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class IDS_Caching</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class IDS_Caching</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Caching factory</p>
<p class="description"><p>This class is used as a factory to load the correct concrete caching implementation.</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">version:</span> Release: $Id:Factory.php 517 2007-09-15 15:04:13Z mario $</li>
<li><span class="field">copyright:</span> 2007 The PHPIDS Group</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">since:</span> Version 0.4</li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
<p class="notes">
Located in <a class="field" href="_Caching---Factory.php.html">/Caching/Factory.php</a> (line <span class="field">51</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
static <span class="method-result">object the</span>
<a href="#factory" title="details" class="method-name">factory</a>
(<span class="var-type">array</span>&nbsp;<span class="var-name">$init</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>)
</div>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodfactory" id="factory"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">static method factory</span> (line <span class="line-number">62</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Factory method</p>
<ul class="tags">
<li><span class="field">return:</span> caching facility</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">object the</span>
<span class="method-name">
factory
</span>
(<span class="var-type">array</span>&nbsp;<span class="var-name">$init</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">array</span>
<span class="var-name">$init</span><span class="var-description">: the IDS_Init object</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$type</span><span class="var-description">: the caching type</span> </li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:44 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,244 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class IDS_Caching_Database</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class IDS_Caching_Database</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<p class="implements">
Implements interfaces:
<ul>
<li><a href="../PHPIDS/IDS_Caching_Interface.html">IDS_Caching_Interface</a></li> </ul>
</p>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Database caching wrapper</p>
<p class="description"><p>This class inhabits functionality to get and set cache via a database.</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">version:</span> Release: $Id:Database.php 517 2007-09-15 15:04:13Z mario $</li>
<li><span class="field">copyright:</span> 2007 The PHPIDS Groupup</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">since:</span> Version 0.4</li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
<p class="notes">
Located in <a class="field" href="_Caching---Database.php.html">/Caching/Database.php</a> (line <span class="field">72</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
static <span class="method-result">object</span>
<a href="#getInstance" title="details" class="method-name">getInstance</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$init</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$init</span>)
</div>
<div class="method-definition">
<span class="method-result">mixed</span>
<a href="#getCache" title="details" class="method-name">getCache</a>
()
</div>
<div class="method-definition">
<span class="method-result">object</span>
<a href="#setCache" title="details" class="method-name">setCache</a>
(<span class="var-type"></span>&nbsp;<span class="var-name">$data</span>)
</div>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodgetInstance" id="getInstance"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">static method getInstance</span> (line <span class="line-number">129</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns an instance of this class</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">object</span>
<span class="method-name">
getInstance
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$init</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$type</span><span class="var-description">: caching type</span> </li>
<li>
<span class="var-type">array</span>
<span class="var-name">$init</span><span class="var-description">: the IDS_Init object</span> </li>
</ul>
</div>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">Constructor __construct</span> (line <span class="line-number">113</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
<p class="description"><p>Connects to database.</p></p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
__construct
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$init</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$type</span><span class="var-description">: caching type</span> </li>
<li>
<span class="var-type">array</span>
<span class="var-name">$init</span><span class="var-description">: the IDS_Init object</span> </li>
</ul>
</div>
<a name="methodgetCache" id="getCache"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getCache</span> (line <span class="line-number">181</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the cached data</p>
<p class="description"><p>Note that this method returns false if either type or file cache is not set</p></p>
<ul class="tags">
<li><span class="field">return:</span> cache data or false</li>
<li><span class="field">throws:</span> PDOException if a db error occurred</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">mixed</span>
<span class="method-name">
getCache
</span>
()
</div>
<hr class="separator" />
<div class="notes">Implementation of:</div>
<dl>
<dt><a href="../PHPIDS/IDS_Caching_Interface.html#methodgetCache">IDS_Caching_Interface::getCache()</a></dt>
<dd>Interface method</dd>
</dl>
</div>
<a name="methodsetCache" id="setCache"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">setCache</span> (line <span class="line-number">146</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Writes cache data into the database</p>
<ul class="tags">
<li><span class="field">throws:</span> PDOException if a db error occurred</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">object</span>
<span class="method-name">
setCache
</span>
(<span class="var-type"></span>&nbsp;<span class="var-name">$data</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">array</span>
<span class="var-name">$data</span><span class="var-description">: the caching data</span> </li>
</ul>
<hr class="separator" />
<div class="notes">Implementation of:</div>
<dl>
<dt><a href="../PHPIDS/IDS_Caching_Interface.html#methodsetCache">IDS_Caching_Interface::setCache()</a></dt>
<dd>Interface method</dd>
</dl>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:42 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,242 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class IDS_Caching_File</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class IDS_Caching_File</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<p class="implements">
Implements interfaces:
<ul>
<li><a href="../PHPIDS/IDS_Caching_Interface.html">IDS_Caching_Interface</a></li> </ul>
</p>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">File caching wrapper</p>
<p class="description"><p>This class inhabits functionality to get and set cache via a static flatfile.</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">version:</span> Release: $Id:File.php 517 2007-09-15 15:04:13Z mario $</li>
<li><span class="field">copyright:</span> 2007 The PHPIDS Group</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">since:</span> Version 0.4</li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
<p class="notes">
Located in <a class="field" href="_Caching---File.php.html">/Caching/File.php</a> (line <span class="field">52</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
static <span class="method-result">object</span>
<a href="#getInstance" title="details" class="method-name">getInstance</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$init</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$init</span>)
</div>
<div class="method-definition">
<span class="method-result">mixed</span>
<a href="#getCache" title="details" class="method-name">getCache</a>
()
</div>
<div class="method-definition">
<span class="method-result">object</span>
<a href="#setCache" title="details" class="method-name">setCache</a>
(<span class="var-type"></span>&nbsp;<span class="var-name">$data</span>)
</div>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodgetInstance" id="getInstance"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">static method getInstance</span> (line <span class="line-number">113</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns an instance of this class</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">object</span>
<span class="method-name">
getInstance
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$init</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$type</span><span class="var-description">: caching type</span> </li>
<li>
<span class="var-type">array</span>
<span class="var-name">$init</span><span class="var-description">: the IDS_Init object</span> </li>
</ul>
</div>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">Constructor __construct</span> (line <span class="line-number">91</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
__construct
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$init</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$type</span><span class="var-description">: caching type</span> </li>
<li>
<span class="var-type">array</span>
<span class="var-name">$init</span><span class="var-description">: the IDS_Init object</span> </li>
</ul>
</div>
<a name="methodgetCache" id="getCache"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getCache</span> (line <span class="line-number">163</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the cached data</p>
<p class="description"><p>Note that this method returns false if either type or file cache is not set</p></p>
<ul class="tags">
<li><span class="field">return:</span> cache data or false</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">mixed</span>
<span class="method-name">
getCache
</span>
()
</div>
<hr class="separator" />
<div class="notes">Implementation of:</div>
<dl>
<dt><a href="../PHPIDS/IDS_Caching_Interface.html#methodgetCache">IDS_Caching_Interface::getCache()</a></dt>
<dd>Interface method</dd>
</dl>
</div>
<a name="methodsetCache" id="setCache"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">setCache</span> (line <span class="line-number">130</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Writes cache data into the file</p>
<ul class="tags">
<li><span class="field">throws:</span> Exception if cache file couldn't be created</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">object</span>
<span class="method-name">
setCache
</span>
(<span class="var-type"></span>&nbsp;<span class="var-name">$data</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">array</span>
<span class="var-name">$data</span><span class="var-description">: the cache data</span> </li>
</ul>
<hr class="separator" />
<div class="notes">Implementation of:</div>
<dl>
<dt><a href="../PHPIDS/IDS_Caching_Interface.html#methodsetCache">IDS_Caching_Interface::setCache()</a></dt>
<dd>Interface method</dd>
</dl>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:44 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,146 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class IDS_Caching_Interface</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Interface IDS_Caching_Interface</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Caching wrapper interface</p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">version:</span> SVN: $Id:Interface.php 517 2007-09-15 15:04:13Z mario $</li>
<li><span class="field">copyright:</span> 2007 The PHPIDS Group</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">since:</span> Version 0.4</li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
<p class="notes">
Located in <a class="field" href="_Caching---Interface.php.html">/Caching/Interface.php</a> (line <span class="field">48</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">void</span>
<a href="#getCache" title="details" class="method-name">getCache</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#setCache" title="details" class="method-name">setCache</a>
(<span class="var-type"></span>&nbsp;<span class="var-name">$data</span>)
</div>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodgetCache" id="getCache"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getCache</span> (line <span class="line-number">64</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Interface method</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
getCache
</span>
()
</div>
</div>
<a name="methodsetCache" id="setCache"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">setCache</span> (line <span class="line-number">57</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Interface method</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
setCache
</span>
(<span class="var-type"></span>&nbsp;<span class="var-name">$data</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">array</span>
<span class="var-name">$data</span><span class="var-description">: the cache data</span> </li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:48 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,243 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class IDS_Caching_Memcached</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class IDS_Caching_Memcached</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<p class="implements">
Implements interfaces:
<ul>
<li><a href="../PHPIDS/IDS_Caching_Interface.html">IDS_Caching_Interface</a></li> </ul>
</p>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">File caching wrapper</p>
<p class="description"><p>This class inhabits functionality to get and set cache via memcached.</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">version:</span> Release: $Id:Memcached.php 517 2007-09-15 15:04:13Z mario $</li>
<li><span class="field">copyright:</span> 2007 The PHPIDS Groupoup</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">since:</span> Version 0.4</li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
<p class="notes">
Located in <a class="field" href="_Caching---Memcached.php.html">/Caching/Memcached.php</a> (line <span class="field">52</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
static <span class="method-result">object</span>
<a href="#getInstance" title="details" class="method-name">getInstance</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$init</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$init</span>)
</div>
<div class="method-definition">
<span class="method-result">mixed</span>
<a href="#getCache" title="details" class="method-name">getCache</a>
()
</div>
<div class="method-definition">
<span class="method-result">object</span>
<a href="#setCache" title="details" class="method-name">setCache</a>
(<span class="var-type"></span>&nbsp;<span class="var-name">$data</span>)
</div>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodgetInstance" id="getInstance"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">static method getInstance</span> (line <span class="line-number">124</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns an instance of this class</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">object</span>
<span class="method-name">
getInstance
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$init</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$type</span><span class="var-description">: caching type</span> </li>
<li>
<span class="var-type">array</span>
<span class="var-name">$init</span><span class="var-description">: the IDS_Init object</span> </li>
</ul>
</div>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">Constructor __construct</span> (line <span class="line-number">100</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
<ul class="tags">
<li><span class="field">throws:</span> Exception if necessary files aren't writeable</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
__construct
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$init</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$type</span><span class="var-description">: caching type</span> </li>
<li>
<span class="var-type">array</span>
<span class="var-name">$init</span><span class="var-description">: the IDS_Init object</span> </li>
</ul>
</div>
<a name="methodgetCache" id="getCache"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getCache</span> (line <span class="line-number">172</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the cached data</p>
<p class="description"><p>Note that this method returns false if either type or file cache is not set</p></p>
<ul class="tags">
<li><span class="field">return:</span> cache data or false</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">mixed</span>
<span class="method-name">
getCache
</span>
()
</div>
<hr class="separator" />
<div class="notes">Implementation of:</div>
<dl>
<dt><a href="../PHPIDS/IDS_Caching_Interface.html#methodgetCache">IDS_Caching_Interface::getCache()</a></dt>
<dd>Interface method</dd>
</dl>
</div>
<a name="methodsetCache" id="setCache"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">setCache</span> (line <span class="line-number">142</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Writes cache data</p>
<ul class="tags">
<li><span class="field">throws:</span> Exception if necessary files aren't writeable</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">object</span>
<span class="method-name">
setCache
</span>
(<span class="var-type"></span>&nbsp;<span class="var-name">$data</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">array</span>
<span class="var-name">$data</span><span class="var-description">: the caching data</span> </li>
</ul>
<hr class="separator" />
<div class="notes">Implementation of:</div>
<dl>
<dt><a href="../PHPIDS/IDS_Caching_Interface.html#methodsetCache">IDS_Caching_Interface::setCache()</a></dt>
<dd>Interface method</dd>
</dl>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:50 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,241 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class IDS_Caching_Session</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class IDS_Caching_Session</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<p class="implements">
Implements interfaces:
<ul>
<li><a href="../PHPIDS/IDS_Caching_Interface.html">IDS_Caching_Interface</a></li> </ul>
</p>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">File caching wrapper</p>
<p class="description"><p>This class inhabits functionality to get and set cache via session.</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">version:</span> Release: $Id:Session.php 517 2007-09-15 15:04:13Z mario $</li>
<li><span class="field">copyright:</span> 2007 The PHPIDS Group</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">since:</span> Version 0.4</li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
<p class="notes">
Located in <a class="field" href="_Caching---Session.php.html">/Caching/Session.php</a> (line <span class="field">52</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
static <span class="method-result">object</span>
<a href="#getInstance" title="details" class="method-name">getInstance</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$init</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$init</span>)
</div>
<div class="method-definition">
<span class="method-result">mixed</span>
<a href="#getCache" title="details" class="method-name">getCache</a>
()
</div>
<div class="method-definition">
<span class="method-result">object</span>
<a href="#setCache" title="details" class="method-name">setCache</a>
(<span class="var-type"></span>&nbsp;<span class="var-name">$data</span>)
</div>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodgetInstance" id="getInstance"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">static method getInstance</span> (line <span class="line-number">98</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns an instance of this class</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">object</span>
<span class="method-name">
getInstance
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$init</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$type</span><span class="var-description">: caching type</span> </li>
<li>
<span class="var-type">array</span>
<span class="var-name">$init</span><span class="var-description">: the IDS_Init object</span> </li>
</ul>
</div>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">Constructor __construct</span> (line <span class="line-number">84</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
__construct
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$init</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$type</span><span class="var-description">: caching type</span> </li>
<li>
<span class="var-type">array</span>
<span class="var-name">$init</span><span class="var-description">: the IDS_Init object</span> </li>
</ul>
</div>
<a name="methodgetCache" id="getCache"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getCache</span> (line <span class="line-number">129</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the cached data</p>
<p class="description"><p>Note that this method returns false if either type or file cache is not set</p></p>
<ul class="tags">
<li><span class="field">return:</span> cache data or false</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">mixed</span>
<span class="method-name">
getCache
</span>
()
</div>
<hr class="separator" />
<div class="notes">Implementation of:</div>
<dl>
<dt><a href="../PHPIDS/IDS_Caching_Interface.html#methodgetCache">IDS_Caching_Interface::getCache()</a></dt>
<dd>Interface method</dd>
</dl>
</div>
<a name="methodsetCache" id="setCache"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">setCache</span> (line <span class="line-number">115</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Writes cache data into the session</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">object</span>
<span class="method-name">
setCache
</span>
(<span class="var-type"></span>&nbsp;<span class="var-name">$data</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">array</span>
<span class="var-name">$data</span><span class="var-description">: the caching data</span> </li>
</ul>
<hr class="separator" />
<div class="notes">Implementation of:</div>
<dl>
<dt><a href="../PHPIDS/IDS_Caching_Interface.html#methodsetCache">IDS_Caching_Interface::setCache()</a></dt>
<dd>Interface method</dd>
</dl>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:53 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,720 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class IDS_Converter</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class IDS_Converter</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS specific utility class to convert charsets manually</p>
<p class="description"><p>Note that if you make use of IDS_Converter::runAll(), existing class methods will be executed in the same order as they are implemented in the class tree!</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">version:</span> Release: $Id:Converter.php 517 2007-09-15 15:04:13Z mario $</li>
<li><span class="field">copyright:</span> 2007 The PHPIDS Group</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
<p class="notes">
Located in <a class="field" href="_Converter.php.html">/Converter.php</a> (line <span class="field">51</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
static <span class="method-result">string</span>
<a href="#convertConcatenations" title="details" class="method-name">convertConcatenations</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<div class="method-definition">
static <span class="method-result">string</span>
<a href="#convertEntities" title="details" class="method-name">convertEntities</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<div class="method-definition">
static <span class="method-result">string</span>
<a href="#convertFromCommented" title="details" class="method-name">convertFromCommented</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<div class="method-definition">
static <span class="method-result">string</span>
<a href="#convertFromControlChars" title="details" class="method-name">convertFromControlChars</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<div class="method-definition">
static <span class="method-result">string</span>
<a href="#convertFromJSCharcode" title="details" class="method-name">convertFromJSCharcode</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<div class="method-definition">
static <span class="method-result">string</span>
<a href="#convertFromJSUnicode" title="details" class="method-name">convertFromJSUnicode</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<div class="method-definition">
static <span class="method-result">string</span>
<a href="#convertFromNestedBase64" title="details" class="method-name">convertFromNestedBase64</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<div class="method-definition">
static <span class="method-result">string</span>
<a href="#convertFromNewLines" title="details" class="method-name">convertFromNewLines</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<div class="method-definition">
static <span class="method-result">string</span>
<a href="#convertFromOutOfRangeChars" title="details" class="method-name">convertFromOutOfRangeChars</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<div class="method-definition">
static <span class="method-result">string</span>
<a href="#convertFromProprietaryEncodings" title="details" class="method-name">convertFromProprietaryEncodings</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>, <span class="var-type"><a href="../PHPIDS/IDS_Monitor.html">IDS_Monitor</a></span>&nbsp;<span class="var-name">$monitor</span>)
</div>
<div class="method-definition">
static <span class="method-result">string</span>
<a href="#convertFromSQLHex" title="details" class="method-name">convertFromSQLHex</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<div class="method-definition">
static <span class="method-result">string</span>
<a href="#convertFromSQLKeywords" title="details" class="method-name">convertFromSQLKeywords</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<div class="method-definition">
static <span class="method-result">string</span>
<a href="#convertFromUTF7" title="details" class="method-name">convertFromUTF7</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<div class="method-definition">
static <span class="method-result">string</span>
<a href="#convertFromXML" title="details" class="method-name">convertFromXML</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<div class="method-definition">
static <span class="method-result">string</span>
<a href="#convertJSRegexModifiers" title="details" class="method-name">convertJSRegexModifiers</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<div class="method-definition">
static <span class="method-result">string</span>
<a href="#convertQuotes" title="details" class="method-name">convertQuotes</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<div class="method-definition">
static <span class="method-result">string</span>
<a href="#runAll" title="details" class="method-name">runAll</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<div class="method-definition">
static <span class="method-result">string</span>
<a href="#runCentrifuge" title="details" class="method-name">runCentrifuge</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>, [<span class="var-type"><a href="../PHPIDS/IDS_Monitor.html">IDS_Monitor</a></span>&nbsp;<span class="var-name">$monitor</span> = <span class="var-default">null</span>])
</div>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodconvertConcatenations" id="convertConcatenations"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">static method convertConcatenations</span> (line <span class="line-number">506</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Converts basic concatenations</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">string</span>
<span class="method-name">
convertConcatenations
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$value</span><span class="var-description">: the value to convert</span> </li>
</ul>
</div>
<a name="methodconvertEntities" id="convertEntities"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">static method convertEntities</span> (line <span class="line-number">229</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Converts from hex/dec entities</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">string</span>
<span class="method-name">
convertEntities
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$value</span><span class="var-description">: the value to convert</span> </li>
</ul>
</div>
<a name="methodconvertFromCommented" id="convertFromCommented"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">static method convertFromCommented</span> (line <span class="line-number">86</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Check for comments and erases them if available</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">string</span>
<span class="method-name">
convertFromCommented
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$value</span><span class="var-description">: the value to convert</span> </li>
</ul>
</div>
<a name="methodconvertFromControlChars" id="convertFromControlChars"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">static method convertFromControlChars</span> (line <span class="line-number">321</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Detects nullbytes and controls chars via ord()</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">string</span>
<span class="method-name">
convertFromControlChars
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$value</span><span class="var-description">: the value to convert</span> </li>
</ul>
</div>
<a name="methodconvertFromJSCharcode" id="convertFromJSCharcode"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">static method convertFromJSCharcode</span> (line <span class="line-number">134</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Checks for common charcode pattern and decodes them</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">string</span>
<span class="method-name">
convertFromJSCharcode
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$value</span><span class="var-description">: the value to convert</span> </li>
</ul>
</div>
<a name="methodconvertFromJSUnicode" id="convertFromJSUnicode"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">static method convertFromJSUnicode</span> (line <span class="line-number">422</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method converts JS unicode code points to regular characters</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">string</span>
<span class="method-name">
convertFromJSUnicode
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$value</span><span class="var-description">: the value to convert</span> </li>
</ul>
</div>
<a name="methodconvertFromNestedBase64" id="convertFromNestedBase64"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">static method convertFromNestedBase64</span> (line <span class="line-number">359</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method matches and translates base64 strings and fragments used in data URIs</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">string</span>
<span class="method-name">
convertFromNestedBase64
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$value</span><span class="var-description">: the value to convert</span> </li>
</ul>
</div>
<a name="methodconvertFromNewLines" id="convertFromNewLines"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">static method convertFromNewLines</span> (line <span class="line-number">116</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Strip newlines</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">string</span>
<span class="method-name">
convertFromNewLines
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$value</span><span class="var-description">: the value to convert</span> </li>
</ul>
</div>
<a name="methodconvertFromOutOfRangeChars" id="convertFromOutOfRangeChars"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">static method convertFromOutOfRangeChars</span> (line <span class="line-number">383</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Detects nullbytes and controls chars via ord()</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">string</span>
<span class="method-name">
convertFromOutOfRangeChars
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$value</span><span class="var-description">: the value to convert</span> </li>
</ul>
</div>
<a name="methodconvertFromProprietaryEncodings" id="convertFromProprietaryEncodings"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">static method convertFromProprietaryEncodings</span> (line <span class="line-number">558</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method collects and decodes proprietary encoding types</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">string</span>
<span class="method-name">
convertFromProprietaryEncodings
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>, <span class="var-type"><a href="../PHPIDS/IDS_Monitor.html">IDS_Monitor</a></span>&nbsp;<span class="var-name">$monitor</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$value</span><span class="var-description">: the value to convert</span> </li>
<li>
<span class="var-type"><a href="../PHPIDS/IDS_Monitor.html">IDS_Monitor</a></span>
<span class="var-name">$monitor</span><span class="var-description">: the monitor object</span> </li>
</ul>
</div>
<a name="methodconvertFromSQLHex" id="convertFromSQLHex"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">static method convertFromSQLHex</span> (line <span class="line-number">266</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Converts SQLHEX to plain text</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">string</span>
<span class="method-name">
convertFromSQLHex
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$value</span><span class="var-description">: the value to convert</span> </li>
</ul>
</div>
<a name="methodconvertFromSQLKeywords" id="convertFromSQLKeywords"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">static method convertFromSQLKeywords</span> (line <span class="line-number">291</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Converts basic SQL keywords and obfuscations</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">string</span>
<span class="method-name">
convertFromSQLKeywords
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$value</span><span class="var-description">: the value to convert</span> </li>
</ul>
</div>
<a name="methodconvertFromUTF7" id="convertFromUTF7"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">static method convertFromUTF7</span> (line <span class="line-number">449</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Converts relevant UTF-7 tags to UTF-8</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">string</span>
<span class="method-name">
convertFromUTF7
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$value</span><span class="var-description">: the value to convert</span> </li>
</ul>
</div>
<a name="methodconvertFromXML" id="convertFromXML"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">static method convertFromXML</span> (line <span class="line-number">403</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Strip XML patterns</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">string</span>
<span class="method-name">
convertFromXML
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$value</span><span class="var-description">: the value to convert</span> </li>
</ul>
</div>
<a name="methodconvertJSRegexModifiers" id="convertJSRegexModifiers"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">static method convertJSRegexModifiers</span> (line <span class="line-number">214</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Eliminate JS regex modifiers</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">string</span>
<span class="method-name">
convertJSRegexModifiers
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$value</span><span class="var-description">: the value to convert</span> </li>
</ul>
</div>
<a name="methodconvertQuotes" id="convertQuotes"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">static method convertQuotes</span> (line <span class="line-number">249</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Normalize quotes</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">string</span>
<span class="method-name">
convertQuotes
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$value</span><span class="var-description">: the value to convert</span> </li>
</ul>
</div>
<a name="methodrunAll" id="runAll"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">static method runAll</span> (line <span class="line-number">65</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Runs all converter functions</p>
<p class="description"><p>Note that if you make use of IDS_Converter::runAll(), existing class methods will be executed in the same order as they are implemented in the class tree!</p></p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">string</span>
<span class="method-name">
runAll
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$value</span><span class="var-description">: the value to convert</span> </li>
</ul>
</div>
<a name="methodrunCentrifuge" id="runCentrifuge"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">static method runCentrifuge</span> (line <span class="line-number">603</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method is the centrifuge prototype</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">string</span>
<span class="method-name">
runCentrifuge
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>, [<span class="var-type"><a href="../PHPIDS/IDS_Monitor.html">IDS_Monitor</a></span>&nbsp;<span class="var-name">$monitor</span> = <span class="var-default">null</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$value</span><span class="var-description">: the value to convert</span> </li>
<li>
<span class="var-type"><a href="../PHPIDS/IDS_Monitor.html">IDS_Monitor</a></span>
<span class="var-name">$monitor</span><span class="var-description">: the monitor object</span> </li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:41 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,513 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class IDS_Event</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class IDS_Event</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<p class="implements">
Implements interfaces:
<ul>
<li>Countable (internal interface)</li><li>IteratorAggregate (internal interface)</li> </ul>
</p>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS event object</p>
<p class="description"><p>This class represents a certain event that occured while applying the filters to the supplied data. It aggregates a bunch of IDS_Filter implementations and is a assembled in IDS_Report.</p><p>Note that this class implements both Countable and IteratorAggregate</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">version:</span> Release: $Id:Event.php 517 2007-09-15 15:04:13Z mario $</li>
<li><span class="field">copyright:</span> 2007 The PHPIDS Group</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
<p class="notes">
Located in <a class="field" href="_Event.php.html">/Event.php</a> (line <span class="field">53</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-var-summary"></a>
<div class="info-box">
<div class="info-box-title">Variable Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="var-summary">
<div class="var-title">
<span class="var-type">array</span>
<a href="#$filters" title="details" class="var-name">$filters</a>
</div>
<div class="var-title">
<span class="var-type">integer</span>
<a href="#$impact" title="details" class="var-name">$impact</a>
</div>
<div class="var-title">
<span class="var-type">scalar</span>
<a href="#$name" title="details" class="var-name">$name</a>
</div>
<div class="var-title">
<span class="var-type">array</span>
<a href="#$tags" title="details" class="var-name">$tags</a>
</div>
<div class="var-title">
<span class="var-type">scalar</span>
<a href="#$value" title="details" class="var-name">$value</a>
</div>
</div>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">void</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
(<span class="var-type">scalar</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">scalar</span>&nbsp;<span class="var-name">$value</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$filters</span>)
</div>
<div class="method-definition">
<span class="method-result">integer</span>
<a href="#count" title="details" class="method-name">count</a>
()
</div>
<div class="method-definition">
<span class="method-result">array</span>
<a href="#getFilters" title="details" class="method-name">getFilters</a>
()
</div>
<div class="method-definition">
<span class="method-result">integer</span>
<a href="#getImpact" title="details" class="method-name">getImpact</a>
()
</div>
<div class="method-definition">
<span class="method-result">Iterator|IteratorAggregate</span>
<a href="#getIterator" title="details" class="method-name">getIterator</a>
()
</div>
<div class="method-definition">
<span class="method-result">scalar</span>
<a href="#getName" title="details" class="method-name">getName</a>
()
</div>
<div class="method-definition">
<span class="method-result">array</span>
<a href="#getTags" title="details" class="method-name">getTags</a>
()
</div>
<div class="method-definition">
<span class="method-result">scalar</span>
<a href="#getValue" title="details" class="method-name">getValue</a>
()
</div>
</div>
</div>
</div>
<a name="sec-vars"></a>
<div class="info-box">
<div class="info-box-title">Variables</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<a name="var$filters" id="$filters"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">array</span>
<span class="var-name">$filters</span>
= <span class="var-default">array()</span> (line <span class="line-number">77</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">List of filter objects</p>
<p class="description"><p>Filter objects in this array are those that matched the events value</p></p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$impact" id="$impact"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">integer</span>
<span class="var-name">$impact</span>
= <span class="var-default"> 0</span> (line <span class="line-number">86</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Calculated impact</p>
<p class="description"><p>Total impact of the event</p></p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$name" id="$name"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">scalar</span>
<span class="var-name">$name</span>
= <span class="var-default"> null</span> (line <span class="line-number">61</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Event name</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$tags" id="$tags"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">array</span>
<span class="var-name">$tags</span>
= <span class="var-default">array()</span> (line <span class="line-number">93</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Affecte tags</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$value" id="$value"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">scalar</span>
<span class="var-name">$value</span>
= <span class="var-default"> null</span> (line <span class="line-number">68</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Value of the event</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">Constructor __construct</span> (line <span class="line-number">106</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
<p class="description"><p>Fills event properties</p></p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
__construct
</span>
(<span class="var-type">scalar</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">scalar</span>&nbsp;<span class="var-name">$value</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$filters</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">scalar</span>
<span class="var-name">$name</span><span class="var-description">: the event name</span> </li>
<li>
<span class="var-type">scalar</span>
<span class="var-name">$value</span><span class="var-description">: the event value</span> </li>
<li>
<span class="var-type">array</span>
<span class="var-name">$filters</span><span class="var-description">: the corresponding filters</span> </li>
</ul>
</div>
<a name="methodcount" id="count"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">count</span> (line <span class="line-number">211</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns number of filters</p>
<p class="description"><p>To implement interface Countable this returns the number of filters appended.</p></p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">integer</span>
<span class="method-name">
count
</span>
()
</div>
<hr class="separator" />
<div class="notes">Implementation of:</div>
<dl>
<dt>Countable::count</dt>
</dl>
</div>
<a name="methodgetFilters" id="getFilters"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getFilters</span> (line <span class="line-number">198</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns list of filter objects</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
getFilters
</span>
()
</div>
</div>
<a name="methodgetImpact" id="getImpact"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getImpact</span> (line <span class="line-number">162</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns calculated impact</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">integer</span>
<span class="method-name">
getImpact
</span>
()
</div>
</div>
<a name="methodgetIterator" id="getIterator"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getIterator</span> (line <span class="line-number">223</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">IteratorAggregate iterator getter</p>
<p class="description"><p>Returns an iterator to iterate over the appended filters.</p></p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">Iterator|IteratorAggregate</span>
<span class="method-name">
getIterator
</span>
()
</div>
<hr class="separator" />
<div class="notes">Implementation of:</div>
<dl>
<dt>IteratorAggregate::getIterator</dt>
</dl>
</div>
<a name="methodgetName" id="getName"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getName</span> (line <span class="line-number">142</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns event name</p>
<p class="description"><p>The name of the event usually is the key of the variable that was considered to be malicious</p></p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">scalar</span>
<span class="method-name">
getName
</span>
()
</div>
</div>
<a name="methodgetTags" id="getTags"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getTags</span> (line <span class="line-number">179</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns affected tags</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
getTags
</span>
()
</div>
</div>
<a name="methodgetValue" id="getValue"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getValue</span> (line <span class="line-number">152</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns event value</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">scalar</span>
<span class="method-name">
getValue
</span>
()
</div>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:44 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,452 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class IDS_Filter</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class IDS_Filter</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS Filter object</p>
<p class="description"><p>Each object of this class serves as a container for a specific filter. The object provides methods to get information about this particular filter and also to match an arbitrary string against it.</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">version:</span> Release: $Id:Filter.php 517 2007-09-15 15:04:13Z mario $</li>
<li><span class="field">copyright:</span> 2007 The PHPIDS Group</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">since:</span> Version 0.4</li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
<p class="notes">
Located in <a class="field" href="_Filter.php.html">/Filter.php</a> (line <span class="field">52</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-var-summary"></a>
<div class="info-box">
<div class="info-box-title">Variable Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="var-summary">
<div class="var-title">
<span class="var-type">string</span>
<a href="#$description" title="details" class="var-name">$description</a>
</div>
<div class="var-title">
<span class="var-type">integer</span>
<a href="#$impact" title="details" class="var-name">$impact</a>
</div>
<div class="var-title">
<span class="var-type">string</span>
<a href="#$rule" title="details" class="var-name">$rule</a>
</div>
<div class="var-title">
<span class="var-type">array</span>
<a href="#$tags" title="details" class="var-name">$tags</a>
</div>
</div>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">void</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
(<span class="var-type"></span>&nbsp;<span class="var-name">$id</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$rule</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$description</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$tags</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$impact</span>)
</div>
<div class="method-definition">
<span class="method-result">string</span>
<a href="#getDescription" title="details" class="method-name">getDescription</a>
()
</div>
<div class="method-definition">
<span class="method-result">integer</span>
<a href="#getId" title="details" class="method-name">getId</a>
()
</div>
<div class="method-definition">
<span class="method-result">integer</span>
<a href="#getImpact" title="details" class="method-name">getImpact</a>
()
</div>
<div class="method-definition">
<span class="method-result">string</span>
<a href="#getRule" title="details" class="method-name">getRule</a>
()
</div>
<div class="method-definition">
<span class="method-result">array</span>
<a href="#getTags" title="details" class="method-name">getTags</a>
()
</div>
<div class="method-definition">
<span class="method-result">boolean</span>
<a href="#match" title="details" class="method-name">match</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$string</span>)
</div>
</div>
</div>
</div>
<a name="sec-vars"></a>
<div class="info-box">
<div class="info-box-title">Variables</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<a name="var$description" id="$description"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">string</span>
<span class="var-name">$description</span>
= <span class="var-default"> null</span> (line <span class="line-number">81</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Filter description</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$impact" id="$impact"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">integer</span>
<span class="var-name">$impact</span>
= <span class="var-default"> 0</span> (line <span class="line-number">74</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Filter impact level</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$rule" id="$rule"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">string</span>
<span class="var-name">$rule</span>
(line <span class="line-number">60</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Filter rule</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$tags" id="$tags"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">array</span>
<span class="var-name">$tags</span>
= <span class="var-default">array()</span> (line <span class="line-number">67</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">List of tags of the filter</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">Constructor __construct</span> (line <span class="line-number">93</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
__construct
</span>
(<span class="var-type"></span>&nbsp;<span class="var-name">$id</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$rule</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$description</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$tags</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$impact</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">mixed</span>
<span class="var-name">$rule</span><span class="var-description">: filter rule</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$description</span><span class="var-description">: filter description</span> </li>
<li>
<span class="var-type">array</span>
<span class="var-name">$tags</span><span class="var-description">: list of tags</span> </li>
<li>
<span class="var-type">integer</span>
<span class="var-name">$impact</span><span class="var-description">: filter impact level</span> </li>
<li>
<span class="var-type"></span>
<span class="var-name">$id</span> </li>
</ul>
</div>
<a name="methodgetDescription" id="getDescription"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getDescription</span> (line <span class="line-number">131</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns filter description</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">string</span>
<span class="method-name">
getDescription
</span>
()
</div>
</div>
<a name="methodgetId" id="getId"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getId</span> (line <span class="line-number">174</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get filter ID</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">integer</span>
<span class="method-name">
getId
</span>
()
</div>
</div>
<a name="methodgetImpact" id="getImpact"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getImpact</span> (line <span class="line-number">164</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get filter impact level</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">integer</span>
<span class="method-name">
getImpact
</span>
()
</div>
</div>
<a name="methodgetRule" id="getRule"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getRule</span> (line <span class="line-number">154</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns filter rule</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">string</span>
<span class="method-name">
getRule
</span>
()
</div>
</div>
<a name="methodgetTags" id="getTags"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getTags</span> (line <span class="line-number">144</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return list of affected tags</p>
<p class="description"><p>Each filter rule is concerned with a certain kind of attack vectors. This method returns those affected kinds.</p></p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
getTags
</span>
()
</div>
</div>
<a name="methodmatch" id="match"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">match</span> (line <span class="line-number">113</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Matches a string against current filter</p>
<p class="description"><p>Matches given string against the filter rule the specific object of this class represents</p></p>
<ul class="tags">
<li><span class="field">throws:</span> InvalidArgumentException if argument is no string</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">boolean</span>
<span class="method-name">
match
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$string</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$string</span><span class="var-description">: the string to match</span> </li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:45 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,419 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class IDS_Filter_Storage</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class IDS_Filter_Storage</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Filter Storage</p>
<p class="description"><p>This class provides various default functions for gathering filter patterns to be used later on by the detection mechanism. You might extend this class to your requirements.</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">version:</span> Release: $Id:Storage.php 517 2007-09-15 15:04:13Z mario $</li>
<li><span class="field">copyright:</span> 2007 The PHPIDS Group</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
<p class="notes">
Located in <a class="field" href="_Filter---Storage.php.html">/Filter/Storage.php</a> (line <span class="field">51</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-var-summary"></a>
<div class="info-box">
<div class="info-box-title">Variable Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="var-summary">
<div class="var-title">
<span class="var-type"><a href="../PHPIDS/IDS_Caching.html">object IDS_Caching</a></span>
<a href="#$cache" title="details" class="var-name">$cache</a>
</div>
<div class="var-title">
<span class="var-type">array</span>
<a href="#$cacheSettings" title="details" class="var-name">$cacheSettings</a>
</div>
<div class="var-title">
<span class="var-type">array</span>
<a href="#$filterSet" title="details" class="var-name">$filterSet</a>
</div>
<div class="var-title">
<span class="var-type">string</span>
<a href="#$source" title="details" class="var-name">$source</a>
</div>
</div>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">void</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
(<span class="var-type"><a href="../PHPIDS/IDS_Init.html">IDS_Init</a></span>&nbsp;<span class="var-name">$init</span>)
</div>
<div class="method-definition">
<span class="method-result">object</span>
<a href="#addFilter" title="details" class="method-name">addFilter</a>
(<span class="var-type"><a href="../PHPIDS/IDS_Filter.html">IDS_Filter</a></span>&nbsp;<span class="var-name">$filter</span>)
</div>
<div class="method-definition">
<span class="method-result">object</span>
<a href="#getFilterFromJson" title="details" class="method-name">getFilterFromJson</a>
()
</div>
<div class="method-definition">
<span class="method-result">object</span>
<a href="#getFilterFromXML" title="details" class="method-name">getFilterFromXML</a>
()
</div>
<div class="method-definition">
<span class="method-result">array</span>
<a href="#getFilterSet" title="details" class="method-name">getFilterSet</a>
()
</div>
<div class="method-definition">
<span class="method-result">object</span>
<a href="#setFilterSet" title="details" class="method-name">setFilterSet</a>
(<span class="var-type">array</span>&nbsp;<span class="var-name">$filterSet</span>)
</div>
</div>
</div>
</div>
<a name="sec-vars"></a>
<div class="info-box">
<div class="info-box-title">Variables</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<a name="var$cache" id="$cache"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type"><a href="../PHPIDS/IDS_Caching.html">object IDS_Caching</a></span>
<span class="var-name">$cache</span>
= <span class="var-default"> null</span> (line <span class="line-number">73</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Cache container</p>
<ul class="tags">
<li><span class="field">var:</span> wrapper</li>
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$cacheSettings" id="$cacheSettings"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">array</span>
<span class="var-name">$cacheSettings</span>
= <span class="var-default"> null</span> (line <span class="line-number">66</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Holds caching settings</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$filterSet" id="$filterSet"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">array</span>
<span class="var-name">$filterSet</span>
= <span class="var-default">array()</span> (line <span class="line-number">80</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Filter container</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$source" id="$source"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">string</span>
<span class="var-name">$source</span>
= <span class="var-default"> null</span> (line <span class="line-number">59</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Filter source file</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">Constructor __construct</span> (line <span class="line-number">92</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
<p class="description"><p>Loads filters based on provided IDS_Init settings.</p></p>
<ul class="tags">
<li><span class="field">throws:</span> Exception if unsupported filter type is given</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
__construct
</span>
(<span class="var-type"><a href="../PHPIDS/IDS_Init.html">IDS_Init</a></span>&nbsp;<span class="var-name">$init</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">object</span>
<span class="var-name">$init</span><span class="var-description">: IDS_Init instance</span> </li>
</ul>
</div>
<a name="methodaddFilter" id="addFilter"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">addFilter</span> (line <span class="line-number">155</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Adds a filter</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">object</span>
<span class="method-name">
addFilter
</span>
(<span class="var-type"><a href="../PHPIDS/IDS_Filter.html">IDS_Filter</a></span>&nbsp;<span class="var-name">$filter</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">object</span>
<span class="var-name">$filter</span><span class="var-description">: IDS_Filter instance</span> </li>
</ul>
</div>
<a name="methodgetFilterFromJson" id="getFilterFromJson"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getFilterFromJson</span> (line <span class="line-number">290</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Loads filters from Json file using ext/Json</p>
<p class="description"><p>This function parses the provided source file and stores the result. If caching mode is enabled the result will be cached to increase the performance.</p></p>
<ul class="tags">
<li><span class="field">throws:</span> Exception if problems with fetching the JSON data occur</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">object</span>
<span class="method-name">
getFilterFromJson
</span>
()
</div>
</div>
<a name="methodgetFilterFromXML" id="getFilterFromXML"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getFilterFromXML</span> (line <span class="line-number">190</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Loads filters from XML using SimpleXML</p>
<p class="description"><p>This function parses the provided source file and stores the result. If caching mode is enabled the result will be cached to increase the performance.</p></p>
<ul class="tags">
<li><span class="field">throws:</span> Exception if problems with fetching the XML data occur</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">object</span>
<span class="method-name">
getFilterFromXML
</span>
()
</div>
</div>
<a name="methodgetFilterSet" id="getFilterSet"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getFilterSet</span> (line <span class="line-number">143</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns registered filters</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
getFilterSet
</span>
()
</div>
</div>
<a name="methodsetFilterSet" id="setFilterSet"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">setFilterSet</span> (line <span class="line-number">129</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets the filter array</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">object</span>
<span class="method-name">
setFilterSet
</span>
(<span class="var-type">array</span>&nbsp;<span class="var-name">$filterSet</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">array</span>
<span class="var-name">$filterSet</span><span class="var-description">: array containing multiple IDS_Filter instances</span> </li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:53 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,326 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class IDS_Filter_Storage_Abstract</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class IDS_Filter_Storage_Abstract</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-descendents">Descendents</a>
| <a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Abstract Filter Storage</p>
<p class="description"><p>Class to assure the systems API</p></p>
<ul class="tags">
<li><span class="field">author:</span> christ1an &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">version:</span> $Id: Storage.php 494 2007-09-11 20:59:11Z mario $</li>
<li><span class="field">abstract:</span> </li>
</ul>
<p class="notes">
Located in <a class="field" href="_Filter---Storage---Abstract.php.html">/Filter/Storage/Abstract.php</a> (line <span class="field">31</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-descendents"></a>
<div class="info-box">
<div class="info-box-title">Direct descendents</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Descendents</span>
| <a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em"><a href="../PHPIDS/IDS_Filter_Storage.html">IDS_Filter_Storage</a></td>
<td>
Filter Storage Class
</td>
</tr>
</table>
</div>
</div>
<a name="sec-var-summary"></a>
<div class="info-box">
<div class="info-box-title">Variable Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-descendents">Descendents</a> |
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="var-summary">
<div class="var-title">
<span class="var-type">mixed</span>
<a href="#$caching" title="details" class="var-name">$caching</a>
</div>
<div class="var-title">
<span class="var-type">mixed</span>
<a href="#$filterPath" title="details" class="var-name">$filterPath</a>
</div>
</div>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-descendents">Descendents</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">void</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
(<span class="var-type"><a href="../PHPIDS/IDS_Init.html">IDS_Init</a></span>&nbsp;<span class="var-name">$init</span>)
</div>
<div class="method-definition">
<span class="method-result">object</span>
<a href="#addFilter" title="details" class="method-name">addFilter</a>
(<span class="var-type"><a href="../PHPIDS/IDS_Filter.html">IDS_Filter</a></span>&nbsp;<span class="var-name">$filter</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#getFilterSet" title="details" class="method-name">getFilterSet</a>
()
</div>
<div class="method-definition">
<span class="method-result">object</span>
<a href="#setFilterSet" title="details" class="method-name">setFilterSet</a>
(<span class="var-type">array</span>&nbsp;<span class="var-name">$filterSet</span>)
</div>
</div>
</div>
</div>
<a name="sec-vars"></a>
<div class="info-box">
<div class="info-box-title">Variables</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-descendents">Descendents</a> |
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<a name="var$caching" id="$caching"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">mixed</span>
<span class="var-name">$caching</span>
= <span class="var-default"> NULL</span> (line <span class="line-number">35</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$filterPath" id="$filterPath"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">mixed</span>
<span class="var-name">$filterPath</span>
= <span class="var-default"> NULL</span> (line <span class="line-number">33</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-descendents">Descendents</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">Constructor __construct</span> (line <span class="line-number">44</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
__construct
</span>
(<span class="var-type"><a href="../PHPIDS/IDS_Init.html">IDS_Init</a></span>&nbsp;<span class="var-name">$init</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">object</span>
<span class="var-name">$init</span> </li>
</ul>
</div>
<a name="methodaddFilter" id="addFilter"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">addFilter</span> (line <span class="line-number">96</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Adds one particular filter</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">object</span>
<span class="method-name">
addFilter
</span>
(<span class="var-type"><a href="../PHPIDS/IDS_Filter.html">IDS_Filter</a></span>&nbsp;<span class="var-name">$filter</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">object</span>
<span class="var-name">$filter</span> </li>
</ul>
</div>
<a name="methodgetFilterSet" id="getFilterSet"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getFilterSet</span> (line <span class="line-number">85</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns array containing all filters</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
getFilterSet
</span>
()
</div>
</div>
<a name="methodsetFilterSet" id="setFilterSet"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">setFilterSet</span> (line <span class="line-number">71</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets filter array manually</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">object</span>
<span class="method-name">
setFilterSet
</span>
(<span class="var-type">array</span>&nbsp;<span class="var-name">$filterSet</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">array</span>
<span class="var-name">$filterSet</span> </li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Thu, 13 Sep 2007 22:36:58 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.0</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,413 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class IDS_Init</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class IDS_Init</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Framework initiation</p>
<p class="description"><p>This class is used for the purpose to initiate the framework and inhabits functionality to parse the needed configuration file.</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">version:</span> Release: $Id:Init.php 517 2007-09-15 15:04:13Z mario $</li>
<li><span class="field">copyright:</span> 2007 The PHPIDS Groupup</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">since:</span> Version 0.4</li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
<p class="notes">
Located in <a class="field" href="_Init.php.html">/Init.php</a> (line <span class="field">51</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-var-summary"></a>
<div class="info-box">
<div class="info-box-title">Variable Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="var-summary">
<div class="var-title">
<span class="var-type">array</span>
<a href="#$config" title="details" class="var-name">$config</a>
</div>
</div>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
static <span class="method-result">object</span>
<a href="#init" title="details" class="method-name">init</a>
([<span class="var-type">string</span>&nbsp;<span class="var-name">$configPath</span> = <span class="var-default">null</span>])
</div>
<div class="method-definition">
<span class="method-result">string</span>
<a href="#getBasePath" title="details" class="method-name">getBasePath</a>
()
</div>
<div class="method-definition">
<span class="method-result">array</span>
<a href="#getConfig" title="details" class="method-name">getConfig</a>
()
</div>
<div class="method-definition">
<span class="method-result">string</span>
<a href="#getConfigPath" title="details" class="method-name">getConfigPath</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#setConfig" title="details" class="method-name">setConfig</a>
(<span class="var-type"></span>&nbsp;<span class="var-name">$config</span>, [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$overwrite</span> = <span class="var-default">false</span>])
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#setConfigPath" title="details" class="method-name">setConfigPath</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$path</span>)
</div>
<div class="method-definition">
<span class="method-result">array</span>
<a href="#_mergeConfig" title="details" class="method-name">_mergeConfig</a>
(<span class="var-type">array</span>&nbsp;<span class="var-name">$current</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$successor</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#__clone" title="details" class="method-name">__clone</a>
()
</div>
</div>
</div>
</div>
<a name="sec-vars"></a>
<div class="info-box">
<div class="info-box-title">Variables</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<a name="var$config" id="$config"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">array</span>
<span class="var-name">$config</span>
= <span class="var-default">array()</span> (line <span class="line-number">59</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Holds config settings</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodinit" id="init"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">static method init</span> (line <span class="line-number">115</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns an instance of this class. Also a PHP version check is being performed to avoid compatibility problems with PHP &lt; 5.1.6</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">object</span>
<span class="method-name">
init
</span>
([<span class="var-type">string</span>&nbsp;<span class="var-name">$configPath</span> = <span class="var-default">null</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$configPath</span><span class="var-description">: the path to the config file</span> </li>
</ul>
</div>
<a name="methodgetBasePath" id="getBasePath"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getBasePath</span> (line <span class="line-number">161</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method checks if a base path is given and usage is set to true.</p>
<p class="description"><p>If all that tests succeed the base path will be returned as a string - else null will be returned.</p></p>
<ul class="tags">
<li><span class="field">return:</span> the base path or null</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">string</span>
<span class="method-name">
getBasePath
</span>
()
</div>
</div>
<a name="methodgetConfig" id="getConfig"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getConfig</span> (line <span class="line-number">220</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the config array</p>
<ul class="tags">
<li><span class="field">return:</span> the config array</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
getConfig
</span>
()
</div>
</div>
<a name="methodgetConfigPath" id="getConfigPath"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getConfigPath</span> (line <span class="line-number">149</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns path to configuration file</p>
<ul class="tags">
<li><span class="field">return:</span> the config path</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">string</span>
<span class="method-name">
getConfigPath
</span>
()
</div>
</div>
<a name="methodsetConfig" id="setConfig"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">setConfig</span> (line <span class="line-number">178</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Merges new settings into the exsiting ones or overwrites them</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
setConfig
</span>
(<span class="var-type"></span>&nbsp;<span class="var-name">$config</span>, [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$overwrite</span> = <span class="var-default">false</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">array</span>
<span class="var-name">$config</span><span class="var-description">: the config array</span> </li>
<li>
<span class="var-type">boolean</span>
<span class="var-name">$overwrite</span><span class="var-description">: config overwrite flag</span> </li>
</ul>
</div>
<a name="methodsetConfigPath" id="setConfigPath"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">setConfigPath</span> (line <span class="line-number">132</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets the path to the configuration file</p>
<ul class="tags">
<li><span class="field">throws:</span> Exception if file not found</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
setConfigPath
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$path</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$path</span><span class="var-description">: the path to the config</span> </li>
</ul>
</div>
<a name="method_mergeConfig" id="_mergeConfig"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">_mergeConfig</span> (line <span class="line-number">198</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Merge config hashes recursivly</p>
<p class="description"><p>The algorithm merges configuration arrays recursively. If an element is an array in both, the values will be appended. If it is a scalar in both, the value will be replaced.</p></p>
<ul class="tags">
<li><span class="field">return:</span> Merged hash</li>
<li><span class="field">access:</span> protected</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
_mergeConfig
</span>
(<span class="var-type">array</span>&nbsp;<span class="var-name">$current</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$successor</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">array</span>
<span class="var-name">$current</span><span class="var-description">: The legacy hash</span> </li>
<li>
<span class="var-type">array</span>
<span class="var-name">$successor</span><span class="var-description">: The hash which values count more when in doubt</span> </li>
</ul>
</div>
<a name="method__clone" id="__clone"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">__clone</span> (line <span class="line-number">103</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Permitting to clone this object</p>
<p class="description"><p>For the sake of correctness of a singleton pattern, this is necessary</p></p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
__clone
</span>
()
</div>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:48 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,243 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class IDS_Log_Composite</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class IDS_Log_Composite</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Log Composite</p>
<p class="description"><p>This class implements the composite pattern to allow to work with multiple logging wrappers at once.</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">version:</span> Release: $Id:Composite.php 517 2007-09-15 15:04:13Z mario $</li>
<li><span class="field">copyright:</span> 2007 The PHPIDS Group</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
<p class="notes">
Located in <a class="field" href="_Log---Composite.php.html">/Log/Composite.php</a> (line <span class="field">52</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-var-summary"></a>
<div class="info-box">
<div class="info-box-title">Variable Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="var-summary">
<div class="var-title">
<span class="var-type">array</span>
<a href="#$loggers" title="details" class="var-name">$loggers</a>
</div>
</div>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">void</span>
<a href="#addLogger" title="details" class="method-name">addLogger</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#execute" title="details" class="method-name">execute</a>
(<span class="var-type"><a href="../PHPIDS/IDS_Report.html">IDS_Report</a></span>&nbsp;<span class="var-name">$data</span>)
</div>
<div class="method-definition">
<span class="method-result">boolean</span>
<a href="#removeLogger" title="details" class="method-name">removeLogger</a>
(<span class="var-type"><a href="../PHPIDS/IDS_Log_Interface.html">IDS_Log_Interface</a></span>&nbsp;<span class="var-name">$logger</span>)
</div>
</div>
</div>
</div>
<a name="sec-vars"></a>
<div class="info-box">
<div class="info-box-title">Variables</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<a name="var$loggers" id="$loggers"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">array</span>
<span class="var-name">$loggers</span>
= <span class="var-default">array()</span> (line <span class="line-number">60</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Holds registered logging wrapper</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodaddLogger" id="addLogger"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">addLogger</span> (line <span class="line-number">84</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Registers a new logging wrapper</p>
<p class="description"><p>Only valid IDS_Log_Interface instances passed to this function will be registered</p></p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
addLogger
</span>
()
</div>
</div>
<a name="methodexecute" id="execute"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">execute</span> (line <span class="line-number">69</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Iterates through registered loggers and executes them</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
execute
</span>
(<span class="var-type"><a href="../PHPIDS/IDS_Report.html">IDS_Report</a></span>&nbsp;<span class="var-name">$data</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">object</span>
<span class="var-name">$data</span><span class="var-description">: IDS_Report object</span> </li>
</ul>
</div>
<a name="methodremoveLogger" id="removeLogger"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">removeLogger</span> (line <span class="line-number">104</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Removes a logger</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">boolean</span>
<span class="method-name">
removeLogger
</span>
(<span class="var-type"><a href="../PHPIDS/IDS_Log_Interface.html">IDS_Log_Interface</a></span>&nbsp;<span class="var-name">$logger</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">object</span>
<span class="var-name">$logger</span><span class="var-description">: IDS_Log_Interface object</span> </li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:40 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,200 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class IDS_Log_Database</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class IDS_Log_Database</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<p class="implements">
Implements interfaces:
<ul>
<li><a href="../PHPIDS/IDS_Log_Interface.html">IDS_Log_Interface</a></li> </ul>
</p>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Database logging wrapper</p>
<p class="description"><p>The database wrapper is designed to store reports into an sql database. It implements the singleton pattern and is based in PDO, supporting different database types.</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">version:</span> Release: $Id:Database.php 517 2007-09-15 15:04:13Z mario $</li>
<li><span class="field">copyright:</span> 2007 The PHPIDS Group</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
<p class="notes">
Located in <a class="field" href="_Log---Database.php.html">/Log/Database.php</a> (line <span class="field">75</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
static <span class="method-result">object</span>
<a href="#getInstance" title="details" class="method-name">getInstance</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$config</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$config</span>)
</div>
<div class="method-definition">
<span class="method-result">boolean</span>
<a href="#execute" title="details" class="method-name">execute</a>
(<span class="var-type"><a href="../PHPIDS/IDS_Report.html">IDS_Report</a></span>&nbsp;<span class="var-name">$data</span>)
</div>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodgetInstance" id="getInstance"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">static method getInstance</span> (line <span class="line-number">212</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns an instance of this class</p>
<p class="description"><p>This method allows the passed argument to be either an instance of IDS_Init or an array.</p></p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">object</span>
<span class="method-name">
getInstance
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$config</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">mixed</span>
<span class="var-name">$config</span><span class="var-description">: IDS_Init | array</span> </li>
</ul>
</div>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">Constructor __construct</span> (line <span class="line-number">146</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
<p class="description"><p>Prepares the SQL statement</p></p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
__construct
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$config</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">mixed</span>
<span class="var-name">$config</span><span class="var-description">: IDS_Init instance | array</span> </li>
</ul>
</div>
<a name="methodexecute" id="execute"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">execute</span> (line <span class="line-number">246</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Stores given data into the database</p>
<ul class="tags">
<li><span class="field">throws:</span> Exception if db error occurred</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">boolean</span>
<span class="method-name">
execute
</span>
(<span class="var-type"><a href="../PHPIDS/IDS_Report.html">IDS_Report</a></span>&nbsp;<span class="var-name">$data</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">object</span>
<span class="var-name">$data</span><span class="var-description">: IDS_Report instance</span> </li>
</ul>
<hr class="separator" />
<div class="notes">Implementation of:</div>
<dl>
<dt><a href="../PHPIDS/IDS_Log_Interface.html#methodexecute">IDS_Log_Interface::execute()</a></dt>
<dd>Interface method</dd>
</dl>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:42 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,307 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class IDS_Log_Email</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class IDS_Log_Email</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<p class="implements">
Implements interfaces:
<ul>
<li><a href="../PHPIDS/IDS_Log_Interface.html">IDS_Log_Interface</a></li> </ul>
</p>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Email logging wrapper</p>
<p class="description"><p>The Email wrapper is designed to send reports via email. It implements the singleton pattern.</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">version:</span> Release: $Id:Email.php 517 2007-09-15 15:04:13Z mario $</li>
<li><span class="field">copyright:</span> 2007 The PHPIDS Group</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
<p class="notes">
Located in <a class="field" href="_Log---Email.php.html">/Log/Email.php</a> (line <span class="field">52</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
static <span class="method-result">object</span>
<a href="#getInstance" title="details" class="method-name">getInstance</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$config</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$config</span>)
</div>
<div class="method-definition">
<span class="method-result">boolean</span>
<a href="#execute" title="details" class="method-name">execute</a>
(<span class="var-type"><a href="../PHPIDS/IDS_Report.html">IDS_Report</a></span>&nbsp;<span class="var-name">$data</span>)
</div>
<div class="method-definition">
<span class="method-result">boolean</span>
<a href="#isSpamAttempt" title="details" class="method-name">isSpamAttempt</a>
()
</div>
<div class="method-definition">
<span class="method-result">string</span>
<a href="#prepareData" title="details" class="method-name">prepareData</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$data</span>)
</div>
<div class="method-definition">
<span class="method-result">boolean</span>
<a href="#send" title="details" class="method-name">send</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$address</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$data</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$headers</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$envelope</span> = <span class="var-default">null</span>])
</div>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodgetInstance" id="getInstance"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">static method getInstance</span> (line <span class="line-number">182</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns an instance of this class</p>
<p class="description"><p>This method allows the passed argument to be either an instance of IDS_Init or an array.</p></p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">object</span>
<span class="method-name">
getInstance
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$config</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">mixed</span>
<span class="var-name">$config</span><span class="var-description">: IDS_Init | array</span> </li>
</ul>
</div>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">Constructor __construct</span> (line <span class="line-number">146</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
__construct
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$config</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">mixed</span>
<span class="var-name">$config</span><span class="var-description">: IDS_Init instance | array</span> </li>
</ul>
</div>
<a name="methodexecute" id="execute"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">execute</span> (line <span class="line-number">316</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sends the report to registered recipients</p>
<ul class="tags">
<li><span class="field">throws:</span> Exception if data is no string</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">boolean</span>
<span class="method-name">
execute
</span>
(<span class="var-type"><a href="../PHPIDS/IDS_Report.html">IDS_Report</a></span>&nbsp;<span class="var-name">$data</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">object</span>
<span class="var-name">$data</span><span class="var-description">: IDS_Report instance</span> </li>
</ul>
<hr class="separator" />
<div class="notes">Implementation of:</div>
<dl>
<dt><a href="../PHPIDS/IDS_Log_Interface.html#methodexecute">IDS_Log_Interface::execute()</a></dt>
<dd>Interface method</dd>
</dl>
</div>
<a name="methodisSpamAttempt" id="isSpamAttempt"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">isSpamAttempt</span> (line <span class="line-number">210</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Detects spam attempts</p>
<p class="description"><p>To avoid mail spam through this logging class this function is used to detect such attempts based on the alert frequency.</p></p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
<div class="method-signature">
<span class="method-result">boolean</span>
<span class="method-name">
isSpamAttempt
</span>
()
</div>
</div>
<a name="methodprepareData" id="prepareData"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">prepareData</span> (line <span class="line-number">270</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Prepares data</p>
<p class="description"><p>Converts given data into a format that can be read in an email. You might edit this method to your requirements.</p></p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
<div class="method-signature">
<span class="method-result">string</span>
<span class="method-name">
prepareData
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$data</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">mixed</span>
<span class="var-name">$data</span><span class="var-description">: the report data</span> </li>
</ul>
</div>
<a name="methodsend" id="send"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">send</span> (line <span class="line-number">385</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sends an email</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
<div class="method-signature">
<span class="method-result">boolean</span>
<span class="method-name">
send
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$address</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$data</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$headers</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$envelope</span> = <span class="var-default">null</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$address</span><span class="var-description">: email address</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$data</span><span class="var-description">: the report data</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$headers</span><span class="var-description">: the mail headers</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$envelope</span><span class="var-description">: the optional envelope string</span> </li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:43 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,234 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class IDS_Log_File</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class IDS_Log_File</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<p class="implements">
Implements interfaces:
<ul>
<li><a href="../PHPIDS/IDS_Log_Interface.html">IDS_Log_Interface</a></li> </ul>
</p>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">File logging wrapper</p>
<p class="description"><p>The file wrapper is designed to store data into a flatfile. It implements the singleton pattern.</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">version:</span> Release: $Id:File.php 517 2007-09-15 15:04:13Z mario $</li>
<li><span class="field">copyright:</span> 2007 The PHPIDS Group</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
<p class="notes">
Located in <a class="field" href="_Log---File.php.html">/Log/File.php</a> (line <span class="field">52</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
static <span class="method-result">object</span>
<a href="#getInstance" title="details" class="method-name">getInstance</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$config</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$logfile</span>)
</div>
<div class="method-definition">
<span class="method-result">mixed</span>
<a href="#execute" title="details" class="method-name">execute</a>
(<span class="var-type"><a href="../PHPIDS/IDS_Report.html">IDS_Report</a></span>&nbsp;<span class="var-name">$data</span>)
</div>
<div class="method-definition">
<span class="method-result">string</span>
<a href="#prepareData" title="details" class="method-name">prepareData</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$data</span>)
</div>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodgetInstance" id="getInstance"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">static method getInstance</span> (line <span class="line-number">110</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns an instance of this class</p>
<p class="description"><p>This method allows the passed argument to be either an instance of IDS_Init or a path to a log file. Due to the singleton pattern only one instance for each file can be initiated.</p></p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
static
<span class="method-result">object</span>
<span class="method-name">
getInstance
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$config</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">mixed</span>
<span class="var-name">$config</span><span class="var-description">: IDS_Init or path to a file</span> </li>
</ul>
</div>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">Constructor __construct</span> (line <span class="line-number">86</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
__construct
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$logfile</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$logfile</span><span class="var-description">: path to the log file</span> </li>
</ul>
</div>
<a name="methodexecute" id="execute"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">execute</span> (line <span class="line-number">184</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Stores given data into a file</p>
<ul class="tags">
<li><span class="field">throws:</span> Exception if the logfile isn't writeable</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">mixed</span>
<span class="method-name">
execute
</span>
(<span class="var-type"><a href="../PHPIDS/IDS_Report.html">IDS_Report</a></span>&nbsp;<span class="var-name">$data</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">object</span>
<span class="var-name">$data</span><span class="var-description">: IDS_Report</span> </li>
</ul>
<hr class="separator" />
<div class="notes">Implementation of:</div>
<dl>
<dt><a href="../PHPIDS/IDS_Log_Interface.html#methodexecute">IDS_Log_Interface::execute()</a></dt>
<dd>Interface method</dd>
</dl>
</div>
<a name="methodprepareData" id="prepareData"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">prepareData</span> (line <span class="line-number">146</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Prepares data</p>
<p class="description"><p>Converts given data into a format that can be stored into a file. You might edit this method to your requirements.</p></p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
<div class="method-signature">
<span class="method-result">string</span>
<span class="method-name">
prepareData
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$data</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">mixed</span>
<span class="var-name">$data</span><span class="var-description">: incoming report data</span> </li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:44 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,116 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class IDS_Log_Interface</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Interface IDS_Log_Interface</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Interface for logging wrappers</p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">version:</span> Release: $Id:Interface.php 517 2007-09-15 15:04:13Z mario $</li>
<li><span class="field">copyright:</span> 2007 The PHPIDS Group</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
<p class="notes">
Located in <a class="field" href="_Log---Interface.php.html">/Log/Interface.php</a> (line <span class="field">47</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">void</span>
<a href="#execute" title="details" class="method-name">execute</a>
(<span class="var-type"><a href="../PHPIDS/IDS_Report.html">IDS_Report</a></span>&nbsp;<span class="var-name">$data</span>)
</div>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="methodexecute" id="execute"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">execute</span> (line <span class="line-number">56</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Interface method</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
execute
</span>
(<span class="var-type"><a href="../PHPIDS/IDS_Report.html">IDS_Report</a></span>&nbsp;<span class="var-name">$data</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type"><a href="../PHPIDS/IDS_Report.html">IDS_Report</a></span>
<span class="var-name">$data</span><span class="var-description">: the report data</span> </li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:48 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,538 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class IDS_Monitor</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class IDS_Monitor</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Monitoring engine</p>
<p class="description"><p>This class represents the core of the frameworks attack detection mechanism and provides functions to scan incoming data for malicious appearing script fragments.</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">version:</span> Release: $Id:Monitor.php 949 2008-06-28 01:26:03Z christ1an $</li>
<li><span class="field">copyright:</span> 2007 The PHPIDS Group</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
<p class="notes">
Located in <a class="field" href="_Monitor.php.html">/Monitor.php</a> (line <span class="field">51</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-var-summary"></a>
<div class="info-box">
<div class="info-box-title">Variable Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="var-summary">
<div class="var-title">
<span class="var-type">boolean</span>
<a href="#$scanKeys" title="details" class="var-name">$scanKeys</a>
</div>
</div>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">void</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
(<span class="var-type"></span>&nbsp;<span class="var-name">$request</span>, <span class="var-type"><a href="../PHPIDS/IDS_Init.html">IDS_Init</a></span>&nbsp;<span class="var-name">$init</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$tags</span> = <span class="var-default">null</span>])
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#addHtml" title="details" class="method-name">addHtml</a>
(<span class="var-type"></span>&nbsp;<span class="var-name">$value</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#addJson" title="details" class="method-name">addJson</a>
(<span class="var-type"></span>&nbsp;<span class="var-name">$value</span>)
</div>
<div class="method-definition">
<span class="method-result">array</span>
<a href="#getExceptions" title="details" class="method-name">getExceptions</a>
()
</div>
<div class="method-definition">
<span class="method-result">array</span>
<a href="#getHtml" title="details" class="method-name">getHtml</a>
()
</div>
<div class="method-definition">
<span class="method-result">array</span>
<a href="#getJson" title="details" class="method-name">getJson</a>
()
</div>
<div class="method-definition">
<span class="method-result"><a href="../PHPIDS/IDS_Report.html">object IDS_Report</a></span>
<a href="#getReport" title="details" class="method-name">getReport</a>
()
</div>
<div class="method-definition">
<span class="method-result">array</span>
<a href="#getStorage" title="details" class="method-name">getStorage</a>
()
</div>
<div class="method-definition">
<span class="method-result"><a href="../PHPIDS/IDS_Report.html">object IDS_Report</a></span>
<a href="#run" title="details" class="method-name">run</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#setExceptions" title="details" class="method-name">setExceptions</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$exceptions</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#setHtml" title="details" class="method-name">setHtml</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$html</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#setJson" title="details" class="method-name">setJson</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$json</span>)
</div>
</div>
</div>
</div>
<a name="sec-vars"></a>
<div class="info-box">
<div class="info-box-title">Variables</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<a name="var$scanKeys" id="$scanKeys"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">boolean</span>
<span class="var-name">$scanKeys</span>
= <span class="var-default"> false</span> (line <span class="line-number">99</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Scan keys switch</p>
<p class="description"><p>Enabling this property will cause the monitor to scan both the key and the value of variables</p></p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">Constructor __construct</span> (line <span class="line-number">175</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
__construct
</span>
(<span class="var-type"></span>&nbsp;<span class="var-name">$request</span>, <span class="var-type"><a href="../PHPIDS/IDS_Init.html">IDS_Init</a></span>&nbsp;<span class="var-name">$init</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$tags</span> = <span class="var-default">null</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">array</span>
<span class="var-name">$request</span><span class="var-description">: array to scan</span> </li>
<li>
<span class="var-type">object</span>
<span class="var-name">$init</span><span class="var-description">: instance of IDS_Init</span> </li>
<li>
<span class="var-type">array</span>
<span class="var-name">$tags</span><span class="var-description">: list of tags to which filters should be applied</span> </li>
</ul>
</div>
<a name="methodaddHtml" id="addHtml"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">addHtml</span> (line <span class="line-number">589</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Adds a value to the html array</p>
<ul class="tags">
<li><span class="field">since:</span> 0.5</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
addHtml
</span>
(<span class="var-type"></span>&nbsp;<span class="var-name">$value</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type"></span>
<span class="var-name">$value</span> </li>
</ul>
</div>
<a name="methodaddJson" id="addJson"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">addJson</span> (line <span class="line-number">630</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Adds a value to the json array</p>
<ul class="tags">
<li><span class="field">since:</span> 0.5.3</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
addJson
</span>
(<span class="var-type"></span>&nbsp;<span class="var-name">$value</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type"></span>
<span class="var-name">$value</span> </li>
</ul>
</div>
<a name="methodgetExceptions" id="getExceptions"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getExceptions</span> (line <span class="line-number">560</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns exception array</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
getExceptions
</span>
()
</div>
</div>
<a name="methodgetHtml" id="getHtml"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getHtml</span> (line <span class="line-number">601</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns html array</p>
<ul class="tags">
<li><span class="field">return:</span> the fields that contain allowed html</li>
<li><span class="field">since:</span> 0.5</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
getHtml
</span>
()
</div>
</div>
<a name="methodgetJson" id="getJson"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getJson</span> (line <span class="line-number">642</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns json array</p>
<ul class="tags">
<li><span class="field">return:</span> the fields that contain json</li>
<li><span class="field">since:</span> 0.5.3</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
getJson
</span>
()
</div>
</div>
<a name="methodgetReport" id="getReport"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getReport</span> (line <span class="line-number">664</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns report object providing various functions to work with detected results. Also the centrifuge data is being set as property of the report object.</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result"><a href="../PHPIDS/IDS_Report.html">object IDS_Report</a></span>
<span class="method-name">
getReport
</span>
()
</div>
</div>
<a name="methodgetStorage" id="getStorage"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getStorage</span> (line <span class="line-number">652</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns storage container</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
getStorage
</span>
()
</div>
</div>
<a name="methodrun" id="run"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">run</span> (line <span class="line-number">233</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Starts the scan mechanism</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result"><a href="../PHPIDS/IDS_Report.html">object IDS_Report</a></span>
<span class="method-name">
run
</span>
()
</div>
</div>
<a name="methodsetExceptions" id="setExceptions"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">setExceptions</span> (line <span class="line-number">546</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets exception array</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
setExceptions
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$exceptions</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">mixed</span>
<span class="var-name">$exceptions</span><span class="var-description">: the thrown exceptions</span> </li>
</ul>
</div>
<a name="methodsetHtml" id="setHtml"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">setHtml</span> (line <span class="line-number">573</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets html array</p>
<ul class="tags">
<li><span class="field">since:</span> 0.5</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
setHtml
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$html</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">mixed</span>
<span class="var-name">$html</span><span class="var-description">: the fields containing html</span> </li>
</ul>
</div>
<a name="methodsetJson" id="setJson"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">setJson</span> (line <span class="line-number">614</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets json array</p>
<ul class="tags">
<li><span class="field">since:</span> 0.5.3</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
setJson
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$json</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">mixed</span>
<span class="var-name">$json</span><span class="var-description">: the fields containing json</span> </li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:50 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,651 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class IDS_Report</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class IDS_Report</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<p class="implements">
Implements interfaces:
<ul>
<li>Countable (internal interface)</li><li>IteratorAggregate (internal interface)</li> </ul>
</p>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS report object</p>
<p class="description"><p>The report objects collects a number of events and thereby presents the detected results. It provides a convenient API to work with the results.</p><p>Note that this class implements Countable, IteratorAggregate and a __toString() method</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">version:</span> Release: $Id:Report.php 517 2007-09-15 15:04:13Z mario $</li>
<li><span class="field">copyright:</span> 2007 The PHPIDS Group</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
<p class="notes">
Located in <a class="field" href="_Report.php.html">/Report.php</a> (line <span class="field">53</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-var-summary"></a>
<div class="info-box">
<div class="info-box-title">Variable Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="var-summary">
<div class="var-title">
<span class="var-type">array</span>
<a href="#$centrifuge" title="details" class="var-name">$centrifuge</a>
</div>
<div class="var-title">
<span class="var-type">array</span>
<a href="#$events" title="details" class="var-name">$events</a>
</div>
<div class="var-title">
<span class="var-type">integer</span>
<a href="#$impact" title="details" class="var-name">$impact</a>
</div>
<div class="var-title">
<span class="var-type">array</span>
<a href="#$tags" title="details" class="var-name">$tags</a>
</div>
</div>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">void</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
([<span class="var-type"></span>&nbsp;<span class="var-name">$events</span> = <span class="var-default">null</span>])
</div>
<div class="method-definition">
<span class="method-result">object</span>
<a href="#addEvent" title="details" class="method-name">addEvent</a>
(<span class="var-type"><a href="../PHPIDS/IDS_Event.html">IDS_Event</a></span>&nbsp;<span class="var-name">$event</span>)
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#clear" title="details" class="method-name">clear</a>
()
</div>
<div class="method-definition">
<span class="method-result">integer</span>
<a href="#count" title="details" class="method-name">count</a>
()
</div>
<div class="method-definition">
<span class="method-result">array/null</span>
<a href="#getCentrifuge" title="details" class="method-name">getCentrifuge</a>
()
</div>
<div class="method-definition">
<span class="method-result">mixed</span>
<a href="#getEvent" title="details" class="method-name">getEvent</a>
(<span class="var-type">scalar</span>&nbsp;<span class="var-name">$name</span>)
</div>
<div class="method-definition">
<span class="method-result">integer</span>
<a href="#getImpact" title="details" class="method-name">getImpact</a>
()
</div>
<div class="method-definition">
<span class="method-result">Iterator</span>
<a href="#getIterator" title="details" class="method-name">getIterator</a>
()
</div>
<div class="method-definition">
<span class="method-result">array</span>
<a href="#getTags" title="details" class="method-name">getTags</a>
()
</div>
<div class="method-definition">
<span class="method-result">boolean</span>
<a href="#hasEvent" title="details" class="method-name">hasEvent</a>
(<span class="var-type">scalar</span>&nbsp;<span class="var-name">$name</span>)
</div>
<div class="method-definition">
<span class="method-result">boolean</span>
<a href="#isEmpty" title="details" class="method-name">isEmpty</a>
()
</div>
<div class="method-definition">
<span class="method-result">boolean</span>
<a href="#setCentrifuge" title="details" class="method-name">setCentrifuge</a>
([<span class="var-type">array</span>&nbsp;<span class="var-name">$centrifuge</span> = <span class="var-default">array()</span>])
</div>
<div class="method-definition">
<span class="method-result">string</span>
<a href="#__toString" title="details" class="method-name">__toString</a>
()
</div>
</div>
</div>
</div>
<a name="sec-vars"></a>
<div class="info-box">
<div class="info-box-title">Variables</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<a name="var$centrifuge" id="$centrifuge"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">array</span>
<span class="var-name">$centrifuge</span>
= <span class="var-default">array()</span> (line <span class="line-number">91</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Centrifuge data</p>
<p class="description"><p>This variable - initiated as an empty array - carries all information about the centrifuge data if available</p></p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$events" id="$events"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">array</span>
<span class="var-name">$events</span>
= <span class="var-default">array()</span> (line <span class="line-number">61</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Event container</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$impact" id="$impact"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">integer</span>
<span class="var-name">$impact</span>
= <span class="var-default"> 0</span> (line <span class="line-number">81</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Impact level</p>
<p class="description"><p>The impact level is calculated on demand by adding the results of the event objects on IDS_Report-&gt;getImpact()</p></p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$tags" id="$tags"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">array</span>
<span class="var-name">$tags</span>
= <span class="var-default">array()</span> (line <span class="line-number">71</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">List of affected tags</p>
<p class="description"><p>This list of tags is collected from the collected event objects on demand when IDS_Report-&gt;getTags() is called</p></p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">Constructor __construct</span> (line <span class="line-number">100</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
__construct
</span>
([<span class="var-type"></span>&nbsp;<span class="var-name">$events</span> = <span class="var-default">null</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">array</span>
<span class="var-name">$events</span><span class="var-description">: the events the report should include</span> </li>
</ul>
</div>
<a name="methodaddEvent" id="addEvent"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">addEvent</span> (line <span class="line-number">116</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Adds an IDS_Event object to the report</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">object</span>
<span class="method-name">
addEvent
</span>
(<span class="var-type"><a href="../PHPIDS/IDS_Event.html">IDS_Event</a></span>&nbsp;<span class="var-name">$event</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">object</span>
<span class="var-name">$event</span><span class="var-description">: IDS_Event</span> </li>
</ul>
</div>
<a name="methodclear" id="clear"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">clear</span> (line <span class="line-number">248</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Clears calculated/collected values</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
clear
</span>
()
</div>
</div>
<a name="methodcount" id="count"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">count</span> (line <span class="line-number">214</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns total amount of events</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">integer</span>
<span class="method-name">
count
</span>
()
</div>
<hr class="separator" />
<div class="notes">Implementation of:</div>
<dl>
<dt>Countable::count</dt>
</dl>
</div>
<a name="methodgetCentrifuge" id="getCentrifuge"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getCentrifuge</span> (line <span class="line-number">260</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method returns the centrifuge property or null if not filled with data</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">array/null</span>
<span class="method-name">
getCentrifuge
</span>
()
</div>
</div>
<a name="methodgetEvent" id="getEvent"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getEvent</span> (line <span class="line-number">135</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get event by name</p>
<p class="description"><p>In most cases an event is identified by the key of the variable that contained maliciously appearing content</p></p>
<ul class="tags">
<li><span class="field">return:</span> IDS_Event object or false if the event does not exist</li>
<li><span class="field">throws:</span> InvalidArgumentException if argument is invalid</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">mixed</span>
<span class="method-name">
getEvent
</span>
(<span class="var-type">scalar</span>&nbsp;<span class="var-name">$name</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">scalar</span>
<span class="var-name">$name</span><span class="var-description">: the event name</span> </li>
</ul>
</div>
<a name="methodgetImpact" id="getImpact"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getImpact</span> (line <span class="line-number">179</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns total impact</p>
<p class="description"><p>Each stored IDS_Event object and its IDS_Filter sub-object are called to calculate the overall impact level of this request</p></p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">integer</span>
<span class="method-name">
getImpact
</span>
()
</div>
</div>
<a name="methodgetIterator" id="getIterator"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getIterator</span> (line <span class="line-number">228</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return iterator object</p>
<p class="description"><p>In order to provide the possibility to directly iterate over the IDS_Event object the IteratorAggregate is implemented. One can easily use foreach() to iterate through all stored IDS_Event objects.</p></p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">Iterator</span>
<span class="method-name">
getIterator
</span>
()
</div>
<hr class="separator" />
<div class="notes">Implementation of:</div>
<dl>
<dt>IteratorAggregate::getIterator</dt>
</dl>
</div>
<a name="methodgetTags" id="getTags"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getTags</span> (line <span class="line-number">155</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns list of affected tags</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
getTags
</span>
()
</div>
</div>
<a name="methodhasEvent" id="hasEvent"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">hasEvent</span> (line <span class="line-number">200</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Checks if a specific event with given name exists</p>
<ul class="tags">
<li><span class="field">throws:</span> InvalidArgumentException if argument is illegal</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">boolean</span>
<span class="method-name">
hasEvent
</span>
(<span class="var-type">scalar</span>&nbsp;<span class="var-name">$name</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">scalar</span>
<span class="var-name">$name</span><span class="var-description">: the event name</span> </li>
</ul>
</div>
<a name="methodisEmpty" id="isEmpty"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">isEmpty</span> (line <span class="line-number">238</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Checks if any events are registered</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">boolean</span>
<span class="method-name">
isEmpty
</span>
()
</div>
</div>
<a name="methodsetCentrifuge" id="setCentrifuge"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">setCentrifuge</span> (line <span class="line-number">275</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method sets the centrifuge property</p>
<ul class="tags">
<li><span class="field">return:</span> true is arguments were valid</li>
<li><span class="field">throws:</span> InvalidArgumentException if argument is illegal</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">boolean</span>
<span class="method-name">
setCentrifuge
</span>
([<span class="var-type">array</span>&nbsp;<span class="var-name">$centrifuge</span> = <span class="var-default">array()</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">array</span>
<span class="var-name">$centrifuge</span><span class="var-description">: the centrifuge data</span> </li>
</ul>
</div>
<a name="method__toString" id="__toString"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">__toString</span> (line <span class="line-number">289</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Directly outputs all available information</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">string</span>
<span class="method-name">
__toString
</span>
()
</div>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:52 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page Database.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Caching/Database.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
| <a href="#sec-includes">Includes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
| <a href="#sec-includes">Includes</a>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../PHPIDS/IDS_Caching_Database.html">IDS_Caching_Database</a>
</td>
<td>
Database caching wrapper
</td>
</tr>
</table>
</div>
</div>
<a name="sec-includes"></a>
<div class="info-box">
<div class="info-box-title">Includes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-classes">Classes</a>
| <span class="disabled">Includes</span>
</div>
<div class="info-box-body">
<a name="_IDS/Caching/Interface_php"><!-- --></a>
<div class="evenrow">
<div>
<span class="include-title">
<span class="include-type">require_once</span>
(<span class="include-name">'IDS/Caching/Interface.php'</span>)
(line <span class="line-number">34</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:42 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page Factory.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Caching/Factory.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../PHPIDS/IDS_Caching.html">IDS_Caching</a>
</td>
<td>
Caching factory
</td>
</tr>
</table>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:44 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page File.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Caching/File.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
| <a href="#sec-includes">Includes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
| <a href="#sec-includes">Includes</a>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../PHPIDS/IDS_Caching_File.html">IDS_Caching_File</a>
</td>
<td>
File caching wrapper
</td>
</tr>
</table>
</div>
</div>
<a name="sec-includes"></a>
<div class="info-box">
<div class="info-box-title">Includes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-classes">Classes</a>
| <span class="disabled">Includes</span>
</div>
<div class="info-box-body">
<a name="_IDS/Caching/Interface_php"><!-- --></a>
<div class="oddrow">
<div>
<span class="include-title">
<span class="include-type">require_once</span>
(<span class="include-name">'IDS/Caching/Interface.php'</span>)
(line <span class="line-number">34</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:44 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page Interface.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Caching/Interface.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../PHPIDS/IDS_Caching_Interface.html">IDS_Caching_Interface</a>
</td>
<td>
Caching wrapper interface
</td>
</tr>
</table>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:48 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page Memcached.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Caching/Memcached.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
| <a href="#sec-includes">Includes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
| <a href="#sec-includes">Includes</a>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../PHPIDS/IDS_Caching_Memcached.html">IDS_Caching_Memcached</a>
</td>
<td>
File caching wrapper
</td>
</tr>
</table>
</div>
</div>
<a name="sec-includes"></a>
<div class="info-box">
<div class="info-box-title">Includes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-classes">Classes</a>
| <span class="disabled">Includes</span>
</div>
<div class="info-box-body">
<a name="_IDS/Caching/Interface_php"><!-- --></a>
<div class="oddrow">
<div>
<span class="include-title">
<span class="include-type">require_once</span>
(<span class="include-name">'IDS/Caching/Interface.php'</span>)
(line <span class="line-number">34</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:50 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page Session.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Caching/Session.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
| <a href="#sec-includes">Includes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
| <a href="#sec-includes">Includes</a>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../PHPIDS/IDS_Caching_Session.html">IDS_Caching_Session</a>
</td>
<td>
File caching wrapper
</td>
</tr>
</table>
</div>
</div>
<a name="sec-includes"></a>
<div class="info-box">
<div class="info-box-title">Includes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-classes">Classes</a>
| <span class="disabled">Includes</span>
</div>
<div class="info-box-body">
<a name="_IDS/Caching/Interface_php"><!-- --></a>
<div class="oddrow">
<div>
<span class="include-title">
<span class="include-type">require_once</span>
(<span class="include-name">'IDS/Caching/Interface.php'</span>)
(line <span class="line-number">34</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:53 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page Converter.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Converter.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../PHPIDS/IDS_Converter.html">IDS_Converter</a>
</td>
<td>
PHPIDS specific utility class to convert charsets manually
</td>
</tr>
</table>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:41 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page Event.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Event.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../PHPIDS/IDS_Event.html">IDS_Event</a>
</td>
<td>
PHPIDS event object
</td>
</tr>
</table>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:44 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page Filter.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Filter/Filter.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS Requirements: PHP5, SimpleXML</p>
<p class="description"><p>Copyright (c) 2007 PHPIDS group (http://php-ids.org)</p><p>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the license.</p><p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p></p>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../PHPIDS/IDS_Filter.html">IDS_Filter</a>
</td>
<td>
PHPIDS Filter object
</td>
</tr>
</table>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 24 Sep 2007 20:06:51 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.0</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page Abstract.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Filter/Storage/Abstract.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2007 PHPIDS (http://php-ids.org)</p><p>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the license.</p><p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p></p>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../PHPIDS/IDS_Filter_Storage_Abstract.html">IDS_Filter_Storage_Abstract</a>
</td>
<td>
Abstract Filter Storage
</td>
</tr>
</table>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Thu, 13 Sep 2007 22:36:58 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.0</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page Storage.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Filter/Storage.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../PHPIDS/IDS_Filter_Storage.html">IDS_Filter_Storage</a>
</td>
<td>
Filter Storage
</td>
</tr>
</table>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:53 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page Filter.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Filter.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../PHPIDS/IDS_Filter.html">IDS_Filter</a>
</td>
<td>
PHPIDS Filter object
</td>
</tr>
</table>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:45 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page Init.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Init.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../PHPIDS/IDS_Init.html">IDS_Init</a>
</td>
<td>
Framework initiation
</td>
</tr>
</table>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:48 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page Composite.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Log/Composite.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
| <a href="#sec-includes">Includes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
| <a href="#sec-includes">Includes</a>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../PHPIDS/IDS_Log_Composite.html">IDS_Log_Composite</a>
</td>
<td>
Log Composite
</td>
</tr>
</table>
</div>
</div>
<a name="sec-includes"></a>
<div class="info-box">
<div class="info-box-title">Includes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-classes">Classes</a>
| <span class="disabled">Includes</span>
</div>
<div class="info-box-body">
<a name="_IDS/Log/Interface_php"><!-- --></a>
<div class="evenrow">
<div>
<span class="include-title">
<span class="include-type">require_once</span>
(<span class="include-name">'IDS/Log/Interface.php'</span>)
(line <span class="line-number">34</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:40 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page Database.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Log/Database.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
| <a href="#sec-includes">Includes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
| <a href="#sec-includes">Includes</a>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../PHPIDS/IDS_Log_Database.html">IDS_Log_Database</a>
</td>
<td>
Database logging wrapper
</td>
</tr>
</table>
</div>
</div>
<a name="sec-includes"></a>
<div class="info-box">
<div class="info-box-title">Includes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-classes">Classes</a>
| <span class="disabled">Includes</span>
</div>
<div class="info-box-body">
<a name="_IDS/Log/Interface_php"><!-- --></a>
<div class="oddrow">
<div>
<span class="include-title">
<span class="include-type">require_once</span>
(<span class="include-name">'IDS/Log/Interface.php'</span>)
(line <span class="line-number">34</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:42 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page Email.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Log/Email.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
| <a href="#sec-includes">Includes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
| <a href="#sec-includes">Includes</a>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../PHPIDS/IDS_Log_Email.html">IDS_Log_Email</a>
</td>
<td>
Email logging wrapper
</td>
</tr>
</table>
</div>
</div>
<a name="sec-includes"></a>
<div class="info-box">
<div class="info-box-title">Includes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-classes">Classes</a>
| <span class="disabled">Includes</span>
</div>
<div class="info-box-body">
<a name="_IDS/Log/Interface_php"><!-- --></a>
<div class="evenrow">
<div>
<span class="include-title">
<span class="include-type">require_once</span>
(<span class="include-name">'IDS/Log/Interface.php'</span>)
(line <span class="line-number">34</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:43 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page File.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Log/File.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
| <a href="#sec-includes">Includes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
| <a href="#sec-includes">Includes</a>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../PHPIDS/IDS_Log_File.html">IDS_Log_File</a>
</td>
<td>
File logging wrapper
</td>
</tr>
</table>
</div>
</div>
<a name="sec-includes"></a>
<div class="info-box">
<div class="info-box-title">Includes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-classes">Classes</a>
| <span class="disabled">Includes</span>
</div>
<div class="info-box-body">
<a name="_IDS/Log/Interface_php"><!-- --></a>
<div class="evenrow">
<div>
<span class="include-title">
<span class="include-type">require_once</span>
(<span class="include-name">'IDS/Log/Interface.php'</span>)
(line <span class="line-number">34</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:44 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page Interface.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Log/Interface.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../PHPIDS/IDS_Log_Interface.html">IDS_Log_Interface</a>
</td>
<td>
Interface for logging wrappers
</td>
</tr>
</table>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:48 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page Monitor.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Monitor.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../PHPIDS/IDS_Monitor.html">IDS_Monitor</a>
</td>
<td>
Monitoring engine
</td>
</tr>
</table>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:50 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page Report.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="file-name">/Report.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PHPIDS</p>
<p class="description"><p>Requirements: PHP5, SimpleXML</p><p>Copyright (c) 2008 PHPIDS group (http://php-ids.org)</p><p>PHPIDS is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License, or (at your option) any later version.</p><p>PHPIDS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</p><p>You should have received a copy of the GNU Lesser General Public License along with PHPIDS. If not, see &lt;http://www.gnu.org/licenses/&gt;.</p><p>PHP version 5.1.6+</p></p>
<ul class="tags">
<li><span class="field">author:</span> Lars Strojny &lt;<a href="mailto:lars@strojny.net">lars@strojny.net</a>&gt;</li>
<li><span class="field">author:</span> Mario Heiderich &lt;<a href="mailto:mario.heiderich@gmail.com">mario.heiderich@gmail.com</a>&gt;</li>
<li><span class="field">author:</span> Christian Matthies &lt;<a href="mailto:ch0012@gmail.com">ch0012@gmail.com</a>&gt;</li>
<li><span class="field">link:</span> <a href="http://php-ids.org/">http://php-ids.org/</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top">
<a href="../PHPIDS/IDS_Report.html">IDS_Report</a>
</td>
<td>
PHPIDS report object
</td>
</tr>
</table>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:52 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</div></body>
</html>

View file

@ -0,0 +1,13 @@
<html>
<head>
<title>Generated Documentation</title>
<link rel="stylesheet" href="media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div align="center"><h1>Generated Documentation</h1></div>
<b>Welcome to default!</b><br />
<br />
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.2</a><br />
</body>
</html>

View file

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title></title>
<link rel="stylesheet" href="media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<!-- Start of Class Data -->
<H2>
</H2>
<h2>Root interface IDS_Caching_Interface</h2>
<ul>
<li><a href="PHPIDS/IDS_Caching_Interface.html">IDS_Caching_Interface</a></li></ul>
<h2>Root interface IDS_Log_Interface</h2>
<ul>
<li><a href="PHPIDS/IDS_Log_Interface.html">IDS_Log_Interface</a></li></ul>
<h2>Root class IDS_Caching</h2>
<ul>
<li><a href="PHPIDS/IDS_Caching.html">IDS_Caching</a></li></ul>
<h2>Root class IDS_Caching_Database</h2>
<ul>
<li><a href="PHPIDS/IDS_Caching_Database.html">IDS_Caching_Database</a></li></ul>
<h2>Root class IDS_Caching_File</h2>
<ul>
<li><a href="PHPIDS/IDS_Caching_File.html">IDS_Caching_File</a></li></ul>
<h2>Root class IDS_Caching_Memcached</h2>
<ul>
<li><a href="PHPIDS/IDS_Caching_Memcached.html">IDS_Caching_Memcached</a></li></ul>
<h2>Root class IDS_Caching_Session</h2>
<ul>
<li><a href="PHPIDS/IDS_Caching_Session.html">IDS_Caching_Session</a></li></ul>
<h2>Root class IDS_Converter</h2>
<ul>
<li><a href="PHPIDS/IDS_Converter.html">IDS_Converter</a></li></ul>
<h2>Root class IDS_Event</h2>
<ul>
<li><a href="PHPIDS/IDS_Event.html">IDS_Event</a></li></ul>
<h2>Root class IDS_Filter</h2>
<ul>
<li><a href="PHPIDS/IDS_Filter.html">IDS_Filter</a></li></ul>
<h2>Root class IDS_Filter_Storage</h2>
<ul>
<li><a href="PHPIDS/IDS_Filter_Storage.html">IDS_Filter_Storage</a></li></ul>
<h2>Root class IDS_Init</h2>
<ul>
<li><a href="PHPIDS/IDS_Init.html">IDS_Init</a></li></ul>
<h2>Root class IDS_Log_Composite</h2>
<ul>
<li><a href="PHPIDS/IDS_Log_Composite.html">IDS_Log_Composite</a></li></ul>
<h2>Root class IDS_Log_Database</h2>
<ul>
<li><a href="PHPIDS/IDS_Log_Database.html">IDS_Log_Database</a></li></ul>
<h2>Root class IDS_Log_Email</h2>
<ul>
<li><a href="PHPIDS/IDS_Log_Email.html">IDS_Log_Email</a></li></ul>
<h2>Root class IDS_Log_File</h2>
<ul>
<li><a href="PHPIDS/IDS_Log_File.html">IDS_Log_File</a></li></ul>
<h2>Root class IDS_Monitor</h2>
<ul>
<li><a href="PHPIDS/IDS_Monitor.html">IDS_Monitor</a></li></ul>
<h2>Root class IDS_Report</h2>
<ul>
<li><a href="PHPIDS/IDS_Report.html">IDS_Report</a></li></ul>
<p class="notes" id="credit">
Documentation generated on Mon, 22 Dec 2008 13:36:38 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
</p>
</body>
</html>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//FR"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- Generated by phpDocumentor on Mon, 22 Dec 2008 13:36:38 +0100 -->
<title>Generated Documentation</title>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<FRAMESET rows='120,*'>
<FRAME src='packages.html' name='left_top' frameborder="1" bordercolor="#999999">
<FRAMESET cols='25%,*'>
<FRAME src='li_PHPIDS.html' name='left_bottom' frameborder="1" bordercolor="#999999">
<FRAME src='blank.html' name='right' frameborder="1" bordercolor="#999999">
</FRAMESET>
<NOFRAMES>
<H2>Frame Alert</H2>
<P>This document is designed to be viewed using the frames feature.
If you see this message, you are using a non-frame-capable web client.</P>
</NOFRAMES>
</FRAMESET>
</HTML>

View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title></title>
<link rel="stylesheet" href="media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="package-title">PHPIDS</div>
<div class="package-details">
<dl class="tree">
<dt class="folder-title">Description</dt>
<dd>
<a href='classtrees_PHPIDS.html' target='right'>Class trees</a><br />
<a href='elementindex_PHPIDS.html' target='right'>Index of elements</a><br />
</dd>
<dt class="folder-title">Interfaces</dt>
<dd><a href='PHPIDS/IDS_Caching_Interface.html' target='right'>IDS_Caching_Interface</a></dd>
<dd><a href='PHPIDS/IDS_Log_Interface.html' target='right'>IDS_Log_Interface</a></dd>
<dt class="folder-title">Classes</dt>
<dd><a href='PHPIDS/IDS_Caching.html' target='right'>IDS_Caching</a></dd>
<dd><a href='PHPIDS/IDS_Caching_Database.html' target='right'>IDS_Caching_Database</a></dd>
<dd><a href='PHPIDS/IDS_Caching_File.html' target='right'>IDS_Caching_File</a></dd>
<dd><a href='PHPIDS/IDS_Caching_Memcached.html' target='right'>IDS_Caching_Memcached</a></dd>
<dd><a href='PHPIDS/IDS_Caching_Session.html' target='right'>IDS_Caching_Session</a></dd>
<dd><a href='PHPIDS/IDS_Converter.html' target='right'>IDS_Converter</a></dd>
<dd><a href='PHPIDS/IDS_Event.html' target='right'>IDS_Event</a></dd>
<dd><a href='PHPIDS/IDS_Filter.html' target='right'>IDS_Filter</a></dd>
<dd><a href='PHPIDS/IDS_Filter_Storage.html' target='right'>IDS_Filter_Storage</a></dd>
<dd><a href='PHPIDS/IDS_Init.html' target='right'>IDS_Init</a></dd>
<dd><a href='PHPIDS/IDS_Log_Composite.html' target='right'>IDS_Log_Composite</a></dd>
<dd><a href='PHPIDS/IDS_Log_Database.html' target='right'>IDS_Log_Database</a></dd>
<dd><a href='PHPIDS/IDS_Log_Email.html' target='right'>IDS_Log_Email</a></dd>
<dd><a href='PHPIDS/IDS_Log_File.html' target='right'>IDS_Log_File</a></dd>
<dd><a href='PHPIDS/IDS_Monitor.html' target='right'>IDS_Monitor</a></dd>
<dd><a href='PHPIDS/IDS_Report.html' target='right'>IDS_Report</a></dd>
<dt class="folder-title">Files</dt>
<dd><a href='PHPIDS/_Log---Composite.php.html' target='right'>Composite.php</a></dd>
<dd><a href='PHPIDS/_Converter.php.html' target='right'>Converter.php</a></dd>
<dd><a href='PHPIDS/_Caching---Database.php.html' target='right'>Database.php</a></dd>
<dd><a href='PHPIDS/_Log---Database.php.html' target='right'>Database.php</a></dd>
<dd><a href='PHPIDS/_Log---Email.php.html' target='right'>Email.php</a></dd>
<dd><a href='PHPIDS/_Event.php.html' target='right'>Event.php</a></dd>
<dd><a href='PHPIDS/_Caching---Factory.php.html' target='right'>Factory.php</a></dd>
<dd><a href='PHPIDS/_Log---File.php.html' target='right'>File.php</a></dd>
<dd><a href='PHPIDS/_Caching---File.php.html' target='right'>File.php</a></dd>
<dd><a href='PHPIDS/_Filter.php.html' target='right'>Filter.php</a></dd>
<dd><a href='PHPIDS/_Init.php.html' target='right'>Init.php</a></dd>
<dd><a href='PHPIDS/_Caching---Interface.php.html' target='right'>Interface.php</a></dd>
<dd><a href='PHPIDS/_Log---Interface.php.html' target='right'>Interface.php</a></dd>
<dd><a href='PHPIDS/_Caching---Memcached.php.html' target='right'>Memcached.php</a></dd>
<dd><a href='PHPIDS/_Monitor.php.html' target='right'>Monitor.php</a></dd>
<dd><a href='PHPIDS/_Report.php.html' target='right'>Report.php</a></dd>
<dd><a href='PHPIDS/_Caching---Session.php.html' target='right'>Session.php</a></dd>
<dd><a href='PHPIDS/_Filter---Storage.php.html' target='right'>Storage.php</a></dd>
</dl>
</div>
<p class="notes"><a href="http://www.phpdoc.org" target="_blank">phpDocumentor v <span class="field">1.4.2</span></a></p>
</BODY>
</HTML>

View file

@ -0,0 +1,32 @@
body
{
background-color: #CCCCFF;
margin: 0px;
padding: 0px;
}
/* Banner (top bar) classes */
.banner { }
.banner-menu
{
clear: both;
padding: .5em;
border-top: 2px solid #6666AA;
}
.banner-title
{
text-align: right;
font-size: 20pt;
font-weight: bold;
margin: .2em;
}
.package-selector
{
background-color: #AAAADD;
border: 1px solid black;
color: yellow;
}

View file

@ -0,0 +1,144 @@
a { color: #336699; text-decoration: none; }
a:hover { color: #6699CC; text-decoration: underline; }
a:active { color: #6699CC; text-decoration: underline; }
body { background : #FFFFFF; }
body, table { font-family: Georgia, Times New Roman, Times, serif; font-size: 10pt }
p, li { line-height: 140% }
a img { border: 0px; }
dd { margin-left: 0px; padding-left: 1em; }
/* Page layout/boxes */
.info-box {}
.info-box-title { margin: 1em 0em 0em 0em; padding: .25em; font-weight: normal; font-size: 14pt; border: 2px solid #999999; background-color: #CCCCFF }
.info-box-body { border: 1px solid #999999; padding: .5em; }
.nav-bar { font-size: 8pt; white-space: nowrap; text-align: right; padding: .2em; margin: 0em 0em 1em 0em; }
.oddrow { background-color: #F8F8F8; border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em}
.evenrow { border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em}
.page-body { max-width: 800px; margin: auto; }
.tree dl { margin: 0px }
/* Index formatting classes */
.index-item-body { margin-top: .5em; margin-bottom: .5em}
.index-item-description { margin-top: .25em }
.index-item-details { font-weight: normal; font-style: italic; font-size: 8pt }
.index-letter-section { background-color: #EEEEEE; border: 1px dotted #999999; padding: .5em; margin-bottom: 1em}
.index-letter-title { font-size: 12pt; font-weight: bold }
.index-letter-menu { text-align: center; margin: 1em }
.index-letter { font-size: 12pt }
/* Docbook classes */
.description {}
.short-description { font-weight: bold; color: #666666; }
.tags { padding-left: 0em; margin-left: 3em; color: #666666; list-style-type: square; }
.parameters { padding-left: 0em; margin-left: 3em; font-style: italic; list-style-type: square; }
.redefinitions { font-size: 8pt; padding-left: 0em; margin-left: 2em; }
.package { }
.package-title { font-weight: bold; font-size: 14pt; border-bottom: 1px solid black }
.package-details { font-size: 85%; }
.sub-package { font-weight: bold; font-size: 120% }
.tutorial { border-width: thin; border-color: #0066ff }
.tutorial-nav-box { width: 100%; border: 1px solid #999999; background-color: #F8F8F8; }
.nav-button-disabled { color: #999999; }
.nav-button:active,
.nav-button:focus,
.nav-button:hover { background-color: #DDDDDD; outline: 1px solid #999999; text-decoration: none }
.folder-title { font-style: italic }
/* Generic formatting */
.field { font-weight: bold; }
.detail { font-size: 8pt; }
.notes { font-style: italic; font-size: 8pt; }
.separator { background-color: #999999; height: 2px; }
.warning { color: #FF6600; }
.disabled { font-style: italic; color: #999999; }
/* Code elements */
.line-number { }
.class-table { width: 100%; }
.class-table-header { border-bottom: 1px dotted #666666; text-align: left}
.class-name { color: #000000; font-weight: bold; }
.method-summary { padding-left: 1em; font-size: 8pt }
.method-header { }
.method-definition { margin-bottom: .3em }
.method-title { font-weight: bold; }
.method-name { font-weight: bold; }
.method-signature { font-size: 85%; color: #666666; margin: .5em 0em }
.method-result { font-style: italic; }
.var-summary { padding-left: 1em; font-size: 8pt; }
.var-header { }
.var-title { margin-bottom: .3em }
.var-type { font-style: italic; }
.var-name { font-weight: bold; }
.var-default {}
.var-description { font-weight: normal; color: #000000; }
.include-title { }
.include-type { font-style: italic; }
.include-name { font-weight: bold; }
.const-title { }
.const-name { font-weight: bold; }
/* Syntax highlighting */
.src-code { border: 1px solid #336699; padding: 1em; background-color: #EEEEEE; }
.src-line { font-family: 'Courier New', Courier, monospace; font-weight: normal; }
.src-comm { color: green; }
.src-id { }
.src-inc { color: #0000FF; }
.src-key { color: #0000FF; }
.src-num { color: #CC0000; }
.src-str { color: #66cccc; }
.src-sym { font-weight: bold; }
.src-var { }
.src-php { font-weight: bold; }
.src-doc { color: #009999 }
.src-doc-close-template { color: #0000FF }
.src-doc-coretag { color: #0099FF; font-weight: bold }
.src-doc-inlinetag { color: #0099FF }
.src-doc-internal { color: #6699cc }
.src-doc-tag { color: #0080CC }
.src-doc-template { color: #0000FF }
.src-doc-type { font-style: italic }
.src-doc-var { font-style: italic }
.tute-tag { color: #009999 }
.tute-attribute-name { color: #0000FF }
.tute-attribute-value { color: #0099FF }
.tute-entity { font-weight: bold; }
.tute-comment { font-style: italic }
.tute-inline-tag { color: #636311; font-weight: bold }
/* tutorial */
.authors { }
.author { font-style: italic; font-weight: bold }
.author-blurb { margin: .5em 0em .5em 2em; font-size: 85%; font-weight: normal; font-style: normal }
.example { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; }
*[class="example"] { line-height : 0.5em }
.listing { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; white-space: nowrap; }
*[class="listing"] { line-height : 0.5em }
.release-info { font-size: 85%; font-style: italic; margin: 1em 0em }
.ref-title-box { }
.ref-title { }
.ref-purpose { font-style: italic; color: #666666 }
.ref-synopsis { }
.title { font-weight: bold; margin: 1em 0em 0em 0em; padding: .25em; border: 2px solid #999999; background-color: #CCCCFF }
.cmd-synopsis { margin: 1em 0em }
.cmd-title { font-weight: bold }
.toc { margin-left: 2em; padding-left: 0em }

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title></title>
<link rel="stylesheet" href="media/stylesheet.css" />
<link rel="stylesheet" href="media/banner.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="banner">
<div class="banner-title">PHPIDS</div>
<div class="banner-menu">
<table cellpadding="0" cellspacing="0" style="width: 100%">
<tr>
<td>
</td>
<td style="width: 2em">&nbsp;</td>
<td style="text-align: right">
<a href="li_PHPIDS.html" target="left_bottom">PHPIDS</a>
</td>
</tr>
</table>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,286 @@
<?php
/**
* PHPIDS
*
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2008 PHPIDS group (http://php-ids.org)
*
* PHPIDS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* PHPIDS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PHPIDS. If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5.1.6+
*
* @category Security
* @package PHPIDS
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Christian Matthies <ch0012@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @link http://php-ids.org/
*/
require_once 'IDS/Caching/Interface.php';
/**
* Needed SQL:
*
#create the database
CREATE DATABASE IF NOT EXISTS `phpids` DEFAULT CHARACTER
SET utf8 COLLATE utf8_general_ci;
DROP TABLE IF EXISTS `cache`;
#now select the created datbase and create the table
CREATE TABLE `cache` (
`type` VARCHAR( 32 ) NOT null ,
`data` TEXT NOT null ,
`created` DATETIME NOT null ,
`modified` DATETIME NOT null
) ENGINE = MYISAM ;
*/
/**
* Database caching wrapper
*
* This class inhabits functionality to get and set cache via a database.
*
* @category Security
* @package PHPIDS
* @author Christian Matthies <ch0012@gmail.com>
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @copyright 2007 The PHPIDS Groupup
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @version Release: $Id:Database.php 517 2007-09-15 15:04:13Z mario $
* @link http://php-ids.org/
* @since Version 0.4
*/
class IDS_Caching_Database implements IDS_Caching_Interface
{
/**
* Caching type
*
* @var string
*/
private $type = null;
/**
* Cache configuration
*
* @var array
*/
private $config = null;
/**
* DBH
*
* @var object
*/
private $handle = null;
/**
* Holds an instance of this class
*
* @var object
*/
private static $cachingInstance = null;
/**
* Constructor
*
* Connects to database.
*
* @param string $type caching type
* @param array $init the IDS_Init object
*
* @return void
*/
public function __construct($type, $init)
{
$this->type = $type;
$this->config = $init->config['Caching'];
$this->handle = $this->_connect();
}
/**
* Returns an instance of this class
*
* @param string $type caching type
* @param array $init the IDS_Init object
*
* @return object $this
*/
public static function getInstance($type, $init)
{
if (!self::$cachingInstance) {
self::$cachingInstance = new IDS_Caching_Database($type, $init);
}
return self::$cachingInstance;
}
/**
* Writes cache data into the database
*
* @param array $data the caching data
*
* @throws PDOException if a db error occurred
* @return object $this
*/
public function setCache(array $data)
{
$handle = $this->handle;
$rows = $handle->query('SELECT created FROM `' .
$handle->quote($this->config['table']).'`');
if (!$rows || $rows->rowCount() === 0) {
$this->_write($handle, $data);
} else {
foreach ($rows as $row) {
if ((time()-strtotime($row['created'])) >
$this->config['expiration_time']) {
$this->_write($handle, $data);
}
}
}
return $this;
}
/**
* Returns the cached data
*
* Note that this method returns false if either type or file cache is
* not set
*
* @throws PDOException if a db error occurred
* @return mixed cache data or false
*/
public function getCache()
{
try{
$handle = $this->handle;
$result = $handle->prepare('SELECT * FROM ' .
$handle->quote($this->config['table']) .
' where type=?');
$result->execute(array($this->type));
foreach ($result as $row) {
return unserialize($row['data']);
}
} catch (PDOException $e) {
die('PDOException: ' . $e->getMessage());
}
return false;
}
/**
* Connect to database and return a handle
*
* @return object dbh
* @throws PDOException if a db error occurred
*/
private function _connect()
{
// validate connection parameters
if (!$this->config['wrapper']
|| !$this->config['user']
|| !$this->config['password']
|| !$this->config['table']) {
throw new Exception('
Insufficient connection parameters'
);
}
// try to connect
try {
$handle = new PDO(
$this->config['wrapper'],
$this->config['user'],
$this->config['password']
);
} catch (PDOException $e) {
die('PDOException: ' . $e->getMessage());
}
return $handle;
}
/**
* Write the cache data to the table
*
* @param object $handle the database handle
* @param array $data the caching data
*
* @return object dbh
* @throws PDOException if a db error occurred
*/
private function _write($handle, $data)
{
try {
$handle->query('TRUNCATE ' .
$this->config['table'].'');
$statement = $handle->prepare('
INSERT INTO `' .
$this->config['table'].'` (
type,
data,
created,
modified
)
VALUES (
:type,
:data,
now(),
now()
)
');
$statement->bindParam('type',
$handle->quote($this->type));
$statement->bindParam('data', serialize($data));
if (!$statement->execute()) {
throw new PDOException($statement->errorCode());
}
} catch (PDOException $e) {
die('PDOException: ' . $e->getMessage());
}
}
}
/**
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 expandtab
*/

View file

@ -0,0 +1,94 @@
<?php
/**
* PHPIDS
*
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2008 PHPIDS group (http://php-ids.org)
*
* PHPIDS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* PHPIDS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PHPIDS. If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5.1.6+
*
* @category Security
* @package PHPIDS
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Christian Matthies <ch0012@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @link http://php-ids.org/
*/
/**
* Caching factory
*
* This class is used as a factory to load the correct concrete caching
* implementation.
*
* @category Security
* @package PHPIDS
* @author Christian Matthies <ch0012@gmail.com>
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @copyright 2007 The PHPIDS Group
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @version Release: $Id:Factory.php 517 2007-09-15 15:04:13Z mario $
* @link http://php-ids.org/
* @since Version 0.4
*/
class IDS_Caching
{
/**
* Factory method
*
* @param array $init the IDS_Init object
* @param string $type the caching type
*
* @return object the caching facility
*/
public static function factory($init, $type)
{
$object = false;
$wrapper = preg_replace(
'/\W+/m',
null,
ucfirst($init->config['Caching']['caching'])
);
$class = 'IDS_Caching_' . $wrapper;
$path = dirname(__FILE__) . DIRECTORY_SEPARATOR .
$wrapper . '.php';
if (file_exists($path)) {
include_once $path;
if (class_exists($class)) {
$object = call_user_func(array($class, 'getInstance'),
$type, $init);
}
}
return $object;
}
}
/**
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 expandtab
*/

View file

@ -0,0 +1,183 @@
<?php
/**
* PHPIDS
*
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2008 PHPIDS group (http://php-ids.org)
*
* PHPIDS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* PHPIDS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PHPIDS. If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5.1.6+
*
* @category Security
* @package PHPIDS
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Christian Matthies <ch0012@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @link http://php-ids.org/
*/
require_once 'IDS/Caching/Interface.php';
/**
* File caching wrapper
*
* This class inhabits functionality to get and set cache via a static flatfile.
*
* @category Security
* @package PHPIDS
* @author Christian Matthies <ch0012@gmail.com>
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @copyright 2007 The PHPIDS Group
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @version Release: $Id:File.php 517 2007-09-15 15:04:13Z mario $
* @link http://php-ids.org/
* @since Version 0.4
*/
class IDS_Caching_File implements IDS_Caching_Interface
{
/**
* Caching type
*
* @var string
*/
private $type = null;
/**
* Cache configuration
*
* @var array
*/
private $config = null;
/**
* Path to cache file
*
* @var string
*/
private $path = null;
/**
* Holds an instance of this class
*
* @var object
*/
private static $cachingInstance = null;
/**
* Constructor
*
* @param string $type caching type
* @param array $init the IDS_Init object
*
* @return void
*/
public function __construct($type, $init)
{
$this->type = $type;
$this->config = $init->config['Caching'];
$this->path = $init->getBasePath() . $this->config['path'];
if (file_exists($this->path) && !is_writable($this->path)) {
throw new Exception('Make sure all files in ' .
htmlspecialchars($this->path, ENT_QUOTES, 'UTF-8') .
'are writeable!');
}
}
/**
* Returns an instance of this class
*
* @param string $type caching type
* @param array $init the IDS_Init object
*
* @return object $this
*/
public static function getInstance($type, $init)
{
if (!self::$cachingInstance) {
self::$cachingInstance = new IDS_Caching_File($type, $init);
}
return self::$cachingInstance;
}
/**
* Writes cache data into the file
*
* @param array $data the cache data
*
* @throws Exception if cache file couldn't be created
* @return object $this
*/
public function setCache(array $data)
{
if (!is_writable(preg_replace('/[\/][^\/]+\.[^\/]++$/', null,
$this->path))) {
throw new Exception('Temp directory ' .
htmlspecialchars($this->path, ENT_QUOTES, 'UTF-8') .
' seems not writable');
}
if ((!file_exists($this->path) || (time()-filectime($this->path)) >
$this->config['expiration_time'])) {
$handle = @fopen($this->path, 'w+');
if (!$handle) {
throw new Exception("Cache file couldn't be created");
}
fwrite($handle, serialize($data));
fclose($handle);
}
return $this;
}
/**
* Returns the cached data
*
* Note that this method returns false if either type or file cache is
* not set
*
* @return mixed cache data or false
*/
public function getCache()
{
// make sure filters are parsed again if cache expired
if (file_exists($this->path) && (time()-filectime($this->path)) <
$this->config['expiration_time']) {
$data = unserialize(file_get_contents($this->path));
return $data;
}
return false;
}
}
/**
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 expandtab
*/

View file

@ -0,0 +1,73 @@
<?php
/**
* PHPIDS
*
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2008 PHPIDS group (http://php-ids.org)
*
* PHPIDS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* PHPIDS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PHPIDS. If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5.1.6+
*
* @category Security
* @package PHPIDS
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Christian Matthies <ch0012@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @link http://php-ids.org/
*/
/**
* Caching wrapper interface
*
* @category Security
* @package PHPIDS
* @author Christian Matthies <ch0012@gmail.com>
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @copyright 2007 The PHPIDS Group
* @version SVN: $Id:Interface.php 517 2007-09-15 15:04:13Z mario $
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @since Version 0.4
* @link http://php-ids.org/
*/
interface IDS_Caching_Interface
{
/**
* Interface method
*
* @param array $data the cache data
*
* @return void
*/
public function setCache(array $data);
/**
* Interface method
*
* @return void
*/
public function getCache();
}
/**
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 expandtab
*/

View file

@ -0,0 +1,228 @@
<?php
/**
* PHPIDS
*
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2008 PHPIDS group (http://php-ids.org)
*
* PHPIDS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* PHPIDS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PHPIDS. If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5.1.6+
*
* @category Security
* @package PHPIDS
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Christian Matthies <ch0012@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @link http://php-ids.org/
*/
require_once 'IDS/Caching/Interface.php';
/**
* File caching wrapper
*
* This class inhabits functionality to get and set cache via memcached.
*
* @category Security
* @package PHPIDS
* @author Christian Matthies <ch0012@gmail.com>
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @copyright 2007 The PHPIDS Groupoup
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @version Release: $Id:Memcached.php 517 2007-09-15 15:04:13Z mario $
* @link http://php-ids.org/
* @since Version 0.4
*/
class IDS_Caching_Memcached implements IDS_Caching_Interface
{
/**
* Caching type
*
* @var string
*/
private $type = null;
/**
* Cache configuration
*
* @var array
*/
private $config = null;
/**
* Path to memcache timestamp file
*
* @var string
*/
private $path = null;
/**
* Flag if the filter storage has been found in memcached
*
* @var boolean
*/
private $isCached = false;
/**
* Memcache object
*
* @var object
*/
private $memcache = null;
/**
* Holds an instance of this class
*
* @var object
*/
private static $cachingInstance = null;
/**
* Constructor
*
* @param string $type caching type
* @param array $init the IDS_Init object
*
* @throws Exception if necessary files aren't writeable
* @return void
*/
public function __construct($type, $init)
{
$this->type = $type;
$this->config = $init->config['Caching'];
$this->path = $init->getBasePath() . $this->config['path'];
$this->_connect();
if (file_exists($this->path) && !is_writable($this->path)) {
throw new Exception('Make sure all files in ' .
htmlspecialchars($this->path, ENT_QUOTES, 'UTF-8') .
' are writeable!');
}
}
/**
* Returns an instance of this class
*
* @param string $type caching type
* @param array $init the IDS_Init object
*
* @return object $this
*/
public static function getInstance($type, $init)
{
if (!self::$cachingInstance) {
self::$cachingInstance = new IDS_Caching_Memcached($type, $init);
}
return self::$cachingInstance;
}
/**
* Writes cache data
*
* @param array $data the caching data
*
* @throws Exception if necessary files aren't writeable
* @return object $this
*/
public function setCache(array $data)
{
if (!file_exists($this->path)) {
$handle = fopen($this->path, 'w');
fclose($handle);
}
if (!is_writable($this->path)) {
throw new Exception('Make sure all files in ' .
htmlspecialchars($this->path, ENT_QUOTES, 'UTF-8') .
' are writeable!');
}
if(!$this->isCached) {
$this->memcache->set(
$this->config['key_prefix'] . '.storage',
$data, false, $this->config['expiration_time']
);
}
return $this;
}
/**
* Returns the cached data
*
* Note that this method returns false if either type or file cache is
* not set
*
* @return mixed cache data or false
*/
public function getCache()
{
$data = $this->memcache->get(
$this->config['key_prefix'] .
'.storage'
);
$this->isCached = !empty($data);
return $data;
}
/**
* Connect to the memcached server
*
* @throws Exception if connection parameters are insufficient
* @return void
*/
private function _connect()
{
if ($this->config['host'] && $this->config['port']) {
// establish the memcache connection
$this->memcache = new Memcache;
$this->memcache->pconnect($this->config['host'],
$this->config['port']);
$this->path = $this->config['tmp_path'];
if(isset($init->config['General']['base_path'])
&& $init->config['General']['base_path']
&& isset($init->config['General']['use_base_path'])
&& $init->config['General']['use_base_path']) {
$this->source = $init->config['General']['base_path'] . $this->path;
}
} else {
throw new Exception('Insufficient connection parameters');
}
}
}
/**
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 expandtab
*/

View file

@ -0,0 +1,146 @@
<?php
/**
* PHPIDS
*
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2008 PHPIDS group (http://php-ids.org)
*
* PHPIDS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* PHPIDS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PHPIDS. If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5.1.6+
*
* @category Security
* @package PHPIDS
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Christian Matthies <ch0012@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @link http://php-ids.org/
*/
require_once 'IDS/Caching/Interface.php';
/**
* File caching wrapper
*
* This class inhabits functionality to get and set cache via session.
*
* @category Security
* @package PHPIDS
* @author Christian Matthies <ch0012@gmail.com>
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @copyright 2007 The PHPIDS Group
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @version Release: $Id:Session.php 517 2007-09-15 15:04:13Z mario $
* @link http://php-ids.org/
* @since Version 0.4
*/
class IDS_Caching_Session implements IDS_Caching_Interface
{
/**
* Caching type
*
* @var string
*/
private $type = null;
/**
* Cache configuration
*
* @var array
*/
private $config = null;
/**
* Holds an instance of this class
*
* @var object
*/
private static $cachingInstance = null;
/**
* Constructor
*
* @param string $type caching type
* @param array $init the IDS_Init object
*
* @return void
*/
public function __construct($type, $init)
{
$this->type = $type;
$this->config = $init->config['Caching'];
}
/**
* Returns an instance of this class
*
* @param string $type caching type
* @param array $init the IDS_Init object
*
* @return object $this
*/
public static function getInstance($type, $init)
{
if (!self::$cachingInstance) {
self::$cachingInstance = new IDS_Caching_Session($type, $init);
}
return self::$cachingInstance;
}
/**
* Writes cache data into the session
*
* @param array $data the caching data
*
* @return object $this
*/
public function setCache(array $data)
{
$_SESSION['PHPIDS'][$this->type] = $data;
return $this;
}
/**
* Returns the cached data
*
* Note that this method returns false if either type or file cache is not set
*
* @return mixed cache data or false
*/
public function getCache()
{
if ($this->type && $_SESSION['PHPIDS'][$this->type]) {
return $_SESSION['PHPIDS'][$this->type];
}
return false;
}
}
/**
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 expandtab
*/

View file

@ -0,0 +1,89 @@
; PHPIDS Config.ini
; General configuration settings
; !!!DO NOT PLACE THIS FILE INSIDE THE WEB-ROOT IF DATABASE CONNECTION DATA WAS ADDED!!!
[General]
; basic settings - customize to make the PHPIDS work at all
filter_type = xml
base_path = /full/path/to/IDS/
use_base_path = false
filter_path = default_filter.xml
tmp_path = tmp
scan_keys = false
; in case you want to use a different HTMLPurifier source, specify it here
; By default, those files are used that are being shipped with PHPIDS
HTML_Purifier_Path = IDS/vendors/htmlpurifier/HTMLPurifier.auto.php
HTML_Purifier_Cache = IDS/vendors/htmlpurifier/HTMLPurifier/DefinitionCache/Serializer
; define which fields contain html and need preparation before
; hitting the PHPIDS rules (new in PHPIDS 0.5)
html[] = __wysiwyg
; define which fields contain JSON data and should be treated as such
; for fewer false positives (new in PHPIDS 0.5.3)
json[] = __jsondata
; define which fields shouldn't be monitored (a[b]=c should be referenced via a.b)
exceptions[] = __utmz
exceptions[] = __utmc
; PHPIDS should run with PHP 5.1.2 but this is untested - set
; this value to force compatibilty with minor versions
min_php_version = 5.1.6
; If you use the PHPIDS logger you can define specific configuration here
[Logging]
; file logging
path = tmp/phpids_log.txt
; email logging
; note that enabling safemode you can prevent spam attempts,
; see documentation
recipients[] = test@test.com.invalid
subject = "PHPIDS detected an intrusion attempt!"
header = "From: <PHPIDS> info@php-ids.org"
envelope = ""
safemode = true
urlencode = true
allowed_rate = 15
; database logging
wrapper = "mysql:host=localhost;port=3306;dbname=phpids"
user = phpids_user
password = 123456
table = intrusions
; If you would like to use other methods than file caching you can configure them here
[Caching]
; caching: session|file|database|memcached|none
caching = file
expiration_time = 600
; file cache
path = tmp/default_filter.cache
; database cache
wrapper = "mysql:host=localhost;port=3306;dbname=phpids"
user = phpids_user
password = 123456
table = cache
; memcached
;host = localhost
;port = 11211
;key_prefix = PHPIDS
;tmp_path = tmp/memcache.timestamp

View file

@ -0,0 +1,721 @@
<?php
/**
* PHPIDS
*
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2008 PHPIDS group (http://php-ids.org)
*
* PHPIDS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* PHPIDS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PHPIDS. If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5.1.6+
*
* @category Security
* @package PHPIDS
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Christian Matthies <ch0012@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @link http://php-ids.org/
*/
/**
* PHPIDS specific utility class to convert charsets manually
*
* Note that if you make use of IDS_Converter::runAll(), existing class
* methods will be executed in the same order as they are implemented in the
* class tree!
*
* @category Security
* @package PHPIDS
* @author Christian Matthies <ch0012@gmail.com>
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @copyright 2007 The PHPIDS Group
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @version Release: $Id:Converter.php 517 2007-09-15 15:04:13Z mario $
* @link http://php-ids.org/
*/
class IDS_Converter
{
/**
* Runs all converter functions
*
* Note that if you make use of IDS_Converter::runAll(), existing class
* methods will be executed in the same order as they are implemented in the
* class tree!
*
* @param string $value the value to convert
*
* @static
* @return string
*/
public static function runAll($value)
{
foreach (get_class_methods(__CLASS__) as $method) {
if (strpos($method, 'run') === 0) {
continue;
}
$value = self::$method($value);
}
return $value;
}
/**
* Check for comments and erases them if available
*
* @param string $value the value to convert
*
* @static
* @return string
*/
public static function convertFromCommented($value)
{
// check for existing comments
if (preg_match('/(?:\<!-|-->|\/\*|\*\/|\/\/\W*\w+\s*$)|' .
'(?:--[^-]*-)/ms', $value)) {
$pattern = array(
'/(?:(?:<!)(?:(?:--(?:[^-]*(?:-[^-]+)*)--\s*)*)(?:>))/ms',
'/(?:(?:\/\*\/*[^\/\*]*)+\*\/)/ms',
'/(?:--[^-]*-)/ms'
);
$converted = preg_replace($pattern, ';', $value);
$value .= "\n" . $converted;
}
// deal with x509 false alerts
$value = preg_replace('/(\w+)\/\/(\w+)/m', '$1/$2', $value);
$value = preg_replace('/(\w+)\/\+(\w+)/m', '$1/$2', $value);
//make sure inline comments are detected and converted correctly
$value = preg_replace('/(<\w+)\/+(\w+=?)/m', '$1/$2', $value);
$value = preg_replace('/[^\\\:]\/\/(.*)$/m', '/**/$1', $value);
return $value;
}
/**
* Strip newlines
*
* @param string $value the value to convert
*
* @static
* @return string
*/
public static function convertFromNewLines($value)
{
//check for inline linebreaks
$search = array('\r', '\n', '\f', '\t', '\v');
$value = str_replace($search, ';', $value);
//convert real linebreaks
return preg_replace('/(?:\n|\r|\v)/m', ' ', $value);
}
/**
* Checks for common charcode pattern and decodes them
*
* @param string $value the value to convert
*
* @static
* @return string
*/
public static function convertFromJSCharcode($value)
{
$matches = array();
// check if value matches typical charCode pattern
if (preg_match_all('/(?:[\d+-=\/\* ]+(?:\s?,\s?[\d+-=\/\* ]+)){4,}/ms',
$value, $matches)) {
$converted = '';
$string = implode(',', $matches[0]);
$string = preg_replace('/\s/', '', $string);
$string = preg_replace('/\w+=/', '', $string);
$charcode = explode(',', $string);
foreach ($charcode as $char) {
$char = preg_replace('/\W0/s', '', $char);
if (preg_match_all('/\d*[+-\/\* ]\d+/', $char, $matches)) {
$match = preg_split('/(\W?\d+)/',
(implode('', $matches[0])),
null,
PREG_SPLIT_DELIM_CAPTURE);
if (array_sum($match) >= 20 && array_sum($match) <= 127) {
$converted .= chr(array_sum($match));
}
} elseif (!empty($char) && $char >= 20 && $char <= 127) {
$converted .= chr($char);
}
}
$value .= "\n" . $converted;
}
// check for octal charcode pattern
if (preg_match_all('/(?:(?:[\\\]+\d+[ \t]*){8,})/ims', $value, $matches)) {
$converted = '';
$charcode = explode('\\', preg_replace('/\s/', '', implode(',',
$matches[0])));
foreach ($charcode as $char) {
if (!empty($char)) {
if (octdec($char) >= 20 && octdec($char) <= 127) {
$converted .= chr(octdec($char));
}
}
}
$value .= "\n" . $converted;
}
// check for hexadecimal charcode pattern
if (preg_match_all('/(?:(?:[\\\]+\w+\s*){8,})/ims', $value, $matches)) {
$converted = '';
$charcode = explode('\\', preg_replace('/[ux]/', '', implode(',',
$matches[0])));
foreach ($charcode as $char) {
if (!empty($char)) {
if (hexdec($char) >= 20 && hexdec($char) <= 127) {
$converted .= chr(hexdec($char));
}
}
}
$value .= "\n" . $converted;
}
return $value;
}
/**
* Eliminate JS regex modifiers
*
* @param string $value the value to convert
*
* @static
* @return string
*/
public static function convertJSRegexModifiers($value)
{
$value = preg_replace('/\/[gim]/', '/', $value);
return $value;
}
/**
* Converts from hex/dec entities
*
* @param string $value the value to convert
*
* @static
* @return string
*/
public static function convertEntities($value)
{
$converted = null;
//deal with double encoded payload
$value = preg_replace('/&amp;/', '&', $value);
if (preg_match('/&#x?[\w]+/ms', $value)) {
$converted = preg_replace('/(&#x?[\w]{2}\d?);?/ms', '$1;', $value);
$converted = html_entity_decode($converted, ENT_QUOTES, 'UTF-8');
$value .= "\n" . str_replace(';;', ';', $converted);
}
return $value;
}
/**
* Normalize quotes
*
* @param string $value the value to convert
*
* @static
* @return string
*/
public static function convertQuotes($value)
{
// normalize different quotes to "
$pattern = array('\'', '`', '´', '', '');
$value = str_replace($pattern, '"', $value);
return $value;
}
/**
* Converts SQLHEX to plain text
*
* @param string $value the value to convert
*
* @static
* @return string
*/
public static function convertFromSQLHex($value)
{
$matches = array();
if(preg_match_all('/(?:0x[a-f\d]{2,}[a-f\d]*)+/im', $value, $matches)) {
foreach($matches[0] as $match) {
$converted = '';
foreach(str_split($match, 2) as $hex_index) {
if(preg_match('/[a-f\d]{2,3}/i', $hex_index)) {
$converted .= chr(hexdec($hex_index));
}
}
$value = str_replace($match, $converted, $value);
}
}
// take care of hex encoded ctrl chars
$value = preg_replace('/0x\d+/m', 1, $value);
return $value;
}
/**
* Converts basic SQL keywords and obfuscations
*
* @param string $value the value to convert
*
* @static
* @return string
*/
public static function convertFromSQLKeywords($value)
{
$pattern = array('/(?:IS\s+null)|(LIKE\s+null)|' .
'(?:(?:^|\W)IN[+\s]*\([\s\d"]+[^()]*\))/ims');
$value = preg_replace($pattern, '"=0', $value);
$value = preg_replace('/null[,\s]/ims', ',0', $value);
$value = preg_replace('/,null/ims', ',0', $value);
$value = preg_replace('/(?:between|mod)/ims', 'or', $value);
$value = preg_replace('/(?:and\s+\d+\.?\d*)/ims', '', $value);
$value = preg_replace('/(?:\s+and\s+)/ims', ' or ', $value);
$pattern = array('/[^\w,(]NULL|\\\N|TRUE|FALSE|UTC_TIME|' .
'LOCALTIME(?:STAMP)?|CURRENT_\w+|BINARY|' .
'(?:(?:ASCII|SOUNDEX|' .
'MD5|R?LIKE)[+\s]*\([^()]+\))|(?:-+\d)/ims');
$value = preg_replace($pattern, 0, $value);
$pattern = array('/(?:NOT\s+BETWEEN)|(?:IS\s+NOT)|(?:NOT\s+IN)|' .
'(?:XOR|\WDIV\W|\WNOT\W|<>|RLIKE(?:\s+BINARY)?)|' .
'(?:REGEXP\s+BINARY)|' .
'(?:SOUNDS\s+LIKE)/ims');
$value = preg_replace($pattern, '!', $value);
$value = preg_replace('/"\s+\d/', '"', $value);
$value = preg_replace('/\/(?:\d+|null)/', null, $value);
return $value;
}
/**
* Detects nullbytes and controls chars via ord()
*
* @param string $value the value to convert
*
* @static
* @return string
*/
public static function convertFromControlChars($value)
{
// critical ctrl values
$search = array(chr(0), chr(1), chr(2),
chr(3), chr(4), chr(5),
chr(6), chr(7), chr(8),
chr(11), chr(12), chr(14),
chr(15), chr(16), chr(17),
chr(18), chr(19));
$value = str_replace($search, '%00', $value);
$urlencoded = urlencode($value);
//take care for malicious unicode characters
$value = urldecode(preg_replace('/(?:%E(?:2|3)%8(?:0|1)%(?:A|8|9)' .
'\w|%EF%BB%BF|%EF%BF%BD)|(?:&#(?:65|8)\d{3};?)/i', null,
$urlencoded));
$value = preg_replace('/(?:&[#x]*(200|820|200|820|zwn?j|lrm|rlm)\w?;?)/i', null,
$value);
$value = preg_replace('/(?:&#(?:65|8)\d{3};?)|' .
'(?:&#(?:56|7)3\d{2};?)|' .
'(?:&#x(?:fe|20)\w{2};?)|' .
'(?:&#x(?:d[c-f])\w{2};?)/i', null,
$value);
return $value;
}
/**
* This method matches and translates base64 strings and fragments
* used in data URIs
*
* @param string $value the value to convert
*
* @static
* @return string
*/
public static function convertFromNestedBase64($value)
{
$matches = array();
preg_match_all('/(?:^|[,&?])\s*([a-z0-9]{30,}=*)(?:\W|$)/im',
$value,
$matches);
foreach ($matches[1] as $item) {
if (isset($item) && !preg_match('/[a-f0-9]{32}/i', $item)) {
$value = str_replace($item, base64_decode($item), $value);
}
}
return $value;
}
/**
* Detects nullbytes and controls chars via ord()
*
* @param string $value the value to convert
*
* @static
* @return string
*/
public static function convertFromOutOfRangeChars($value)
{
$values = str_split($value);
foreach ($values as $item) {
if (ord($item) >= 127) {
$value = str_replace($item, 'U', $value);
}
}
return $value;
}
/**
* Strip XML patterns
*
* @param string $value the value to convert
*
* @static
* @return string
*/
public static function convertFromXML($value)
{
$converted = strip_tags($value);
if ($converted && ($converted != $value)) {
return $value . "\n" . $converted;
}
return $value;
}
/**
* This method converts JS unicode code points to
* regular characters
*
* @param string $value the value to convert
*
* @static
* @return string
*/
public static function convertFromJSUnicode($value)
{
$matches = array();
preg_match_all('/\\\u[0-9a-f]{4}/ims', $value, $matches);
if (!empty($matches[0])) {
foreach ($matches[0] as $match) {
$value = str_replace($match,
chr(hexdec(substr($match, 2, 4))),
$value);
}
$value .= "\n\u0001";
}
return $value;
}
/**
* Converts relevant UTF-7 tags to UTF-8
*
* @param string $value the value to convert
*
* @static
* @return string
*/
public static function convertFromUTF7($value)
{
if(preg_match('/\+A\w+-/m', $value)) {
if (function_exists('mb_convert_encoding')) {
if(version_compare(PHP_VERSION, '5.2.8', '<')) {
$tmp_chars = str_split($value);
$value = '';
foreach($tmp_chars as $char) {
if(ord($char) <= 127) {
$value .= $char;
}
}
}
$value .= "\n" . mb_convert_encoding($value, 'UTF-8', 'UTF-7');
} else {
//list of all critical UTF7 codepoints
$schemes = array(
'+ACI-' => '"',
'+ADw-' => '<',
'+AD4-' => '>',
'+AFs-' => '[',
'+AF0-' => ']',
'+AHs-' => '{',
'+AH0-' => '}',
'+AFw-' => '\\',
'+ADs-' => ';',
'+ACM-' => '#',
'+ACY-' => '&',
'+ACU-' => '%',
'+ACQ-' => '$',
'+AD0-' => '=',
'+AGA-' => '`',
'+ALQ-' => '"',
'+IBg-' => '"',
'+IBk-' => '"',
'+AHw-' => '|',
'+ACo-' => '*',
'+AF4-' => '^',
'+ACIAPg-' => '">',
'+ACIAPgA8-' => '">'
);
$value = str_ireplace(array_keys($schemes),
array_values($schemes), $value);
}
}
return $value;
}
/**
* Converts basic concatenations
*
* @param string $value the value to convert
*
* @static
* @return string
*/
public static function convertFromConcatenated($value)
{
//normalize remaining backslashes
if ($value != preg_replace('/(\w)\\\/', "$1", $value)) {
$value .= preg_replace('/(\w)\\\/', "$1", $value);
}
$compare = stripslashes($value);
$pattern = array('/(?:<\/\w+>\+<\w+>)/s',
'/(?:":\d+[^"[]+")/s',
'/(?:"?"\+\w+\+")/s',
'/(?:"\s*;[^"]+")|(?:";[^"]+:\s*")/s',
'/(?:"\s*(?:;|\+).{8,18}:\s*")/s',
'/(?:";\w+=)|(?:!""&&")|(?:~)/s',
'/(?:"?"\+""?\+?"?)|(?:;\w+=")|(?:"[|&]{2,})/s',
'/(?:"\s*\W+")/s',
'/(?:";\w\s*\+=\s*\w?\s*")/s',
'/(?:"[|&;]+\s*[^|&\n]*[|&]+\s*"?)/s',
'/(?:";\s*\w+\W+\w*\s*[|&]*")/s',
'/(?:"\s*"\s*\.)/s',
'/(?:\s*new\s+\w+\s*[+",])/',
'/(?:(?:^|\s+)(?:do|else)\s+)/',
'/(?:[{(]\s*new\s+\w+\s*[)}])/',
'/(?:(this|self)\.)/',
'/(?:undefined)/',
'/(?:in\s+)/');
// strip out concatenations
$converted = preg_replace($pattern, null, $compare);
//strip object traversal
$converted = preg_replace('/\w(\.\w\()/', "$1", $converted);
// normalize obfuscated method calls
$converted = preg_replace('/\)\s*\+/', ")", $converted);
//convert JS special numbers
$converted = preg_replace('/(?:\(*[.\d]e[+-]*[^a-z\W]+\)*)' .
'|(?:NaN|Infinity)\W/ms', 1, $converted);
if ($converted && ($compare != $converted)) {
$value .= "\n" . $converted;
}
return $value;
}
/**
* This method collects and decodes proprietary encoding types
*
* @param string $value the value to convert
* @param IDS_Monitor $monitor the monitor object
*
* @static
* @return string
*/
public static function convertFromProprietaryEncodings($value) {
//Xajax error reportings
$value = preg_replace('/<!\[CDATA\[(\W+)\]\]>/im', '$1', $value);
//strip false alert triggering apostrophes
$value = preg_replace('/(\w)\"(s)/m', '$1$2', $value);
//strip quotes within typical search patterns
$value = preg_replace('/^"([^"=\\!><~]+)"$/', '$1', $value);
//OpenID login tokens
$value = preg_replace('/{[\w-]{8,9}\}(?:\{[\w=]{8}\}){2}/', null, $value);
//convert Content and \sdo\s to null
$value = preg_replace('/Content|\Wdo\s/', null, $value);
//strip emoticons
$value = preg_replace(
'/(?:\s[:;]-[)\/PD]+)|(?:\s;[)PD]+)|(?:\s:[)PD]+)|-\.-|\^\^/m',
null,
$value
);
//normalize separation char repetion
$value = preg_replace('/([.+~=*_\-])\1{2,}/m', '$1', $value);
//normalize multiple single quotes
$value = preg_replace('/"{2,}/m', '"', $value);
//normalize ampersand listings
$value = preg_replace('/(\w\s)&\s(\w)/', '$1$2', $value);
//normalize JS backspace linebreaks
$value = preg_replace('/^\/|\/$|,\/\n|\/,/', null, $value);
return $value;
}
/**
* This method is the centrifuge prototype
*
* @param string $value the value to convert
* @param IDS_Monitor $monitor the monitor object
*
* @static
* @return string
*/
public static function runCentrifuge($value, IDS_Monitor $monitor = null)
{
$threshold = 3.49;
$unserialized = false;
if(preg_match('/^\w:\d+:\{/', $value)) {
$unserialized = @unserialize($value);
}
if (strlen($value) > 25 && !$unserialized) {
//strip padding
$tmp_value = preg_replace('/\s{4}/m', null, $value);
$tmp_value = preg_replace(
'/\s{4}|[\p{L}\d\+\-,.%]{8,}/m',
'aaa',
$tmp_value
);
// Check for the attack char ratio
$tmp_value = preg_replace('/([*.!?+-])\1{1,}/m', '$1', $tmp_value);
$tmp_value = preg_replace('/"[\p{L}\d\s]+"/m', null, $tmp_value);
$stripped_length = strlen(preg_replace('/[\d\s\p{L}.:,%&\/><\-)]+/m',
null, $tmp_value));
$overall_length = strlen(
preg_replace('/([\d\s\p{L}:,]{3,})+/m', 'aaa',
preg_replace('/\s{2,}/m', null, $tmp_value))
);
if ($stripped_length != 0
&& $overall_length/$stripped_length <= $threshold) {
$monitor->centrifuge['ratio'] =
$overall_length/$stripped_length;
$monitor->centrifuge['threshold'] =
$threshold;
$value .= "\n$[!!!]";
}
}
if (strlen($value) > 40) {
// Replace all non-special chars
$converted = preg_replace('/[\w\s\p{L},.!]/', null, $value);
// Split string into an array, unify and sort
$array = str_split($converted);
$array = array_unique($array);
asort($array);
// Normalize certain tokens
$schemes = array(
'~' => '+',
'^' => '+',
'|' => '+',
'*' => '+',
'%' => '+',
'&' => '+',
'/' => '+'
);
$converted = implode($array);
$converted = str_replace(array_keys($schemes),
array_values($schemes), $converted);
$converted = preg_replace('/[+-]\s*\d+/', '+', $converted);
$converted = preg_replace('/[()[\]{}]/', '(', $converted);
$converted = preg_replace('/[!?:=]/', ':', $converted);
$converted = preg_replace('/[^:(+]/', null, stripslashes($converted));
// Sort again and implode
$array = str_split($converted);
asort($array);
$converted = implode($array);
if (preg_match('/(?:\({2,}\+{2,}:{2,})|(?:\({2,}\+{2,}:+)|' .
'(?:\({3,}\++:{2,})/', $converted)) {
$monitor->centrifuge['converted'] = $converted;
return $value . "\n" . $converted;
}
}
return $value;
}
}
/**
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 expandtab
*/

View file

@ -0,0 +1,235 @@
<?php
/**
* PHPIDS
*
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2008 PHPIDS group (http://php-ids.org)
*
* PHPIDS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* PHPIDS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PHPIDS. If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5.1.6+
*
* @category Security
* @package PHPIDS
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Christian Matthies <ch0012@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @link http://php-ids.org/
*/
/**
* PHPIDS event object
*
* This class represents a certain event that occured while applying the filters
* to the supplied data. It aggregates a bunch of IDS_Filter implementations and
* is a assembled in IDS_Report.
*
* Note that this class implements both Countable and IteratorAggregate
*
* @category Security
* @package PHPIDS
* @author Christian Matthies <ch0012@gmail.com>
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @copyright 2007 The PHPIDS Group
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @version Release: $Id:Event.php 517 2007-09-15 15:04:13Z mario $
* @link http://php-ids.org/
*/
class IDS_Event implements Countable, IteratorAggregate
{
/**
* Event name
*
* @var scalar
*/
protected $name = null;
/**
* Value of the event
*
* @var scalar
*/
protected $value = null;
/**
* List of filter objects
*
* Filter objects in this array are those that matched the events value
*
* @var array
*/
protected $filters = array();
/**
* Calculated impact
*
* Total impact of the event
*
* @var integer
*/
protected $impact = 0;
/**
* Affecte tags
*
* @var array
*/
protected $tags = array();
/**
* Constructor
*
* Fills event properties
*
* @param scalar $name the event name
* @param scalar $value the event value
* @param array $filters the corresponding filters
*
* @return void
*/
public function __construct($name, $value, Array $filters)
{
if (!is_scalar($name)) {
throw new InvalidArgumentException(
'Expected $name to be a scalar,' . gettype($name) . ' given'
);
}
if (!is_scalar($value)) {
throw new InvalidArgumentException('
Expected $value to be a scalar,' . gettype($value) . ' given'
);
}
$this->name = $name;
$this->value = $value;
foreach ($filters as $filter) {
if (!$filter instanceof IDS_Filter) {
throw new InvalidArgumentException(
'Filter must be derived from IDS_Filter'
);
}
$this->filters[] = $filter;
}
}
/**
* Returns event name
*
* The name of the event usually is the key of the variable that was
* considered to be malicious
*
* @return scalar
*/
public function getName()
{
return $this->name;
}
/**
* Returns event value
*
* @return scalar
*/
public function getValue()
{
return $this->value;
}
/**
* Returns calculated impact
*
* @return integer
*/
public function getImpact()
{
if (!$this->impact) {
$this->impact = 0;
foreach ($this->filters as $filter) {
$this->impact += $filter->getImpact();
}
}
return $this->impact;
}
/**
* Returns affected tags
*
* @return array
*/
public function getTags()
{
$filters = $this->getFilters();
foreach ($filters as $filter) {
$this->tags = array_merge($this->tags,
$filter->getTags());
}
$this->tags = array_values(array_unique($this->tags));
return $this->tags;
}
/**
* Returns list of filter objects
*
* @return array
*/
public function getFilters()
{
return $this->filters;
}
/**
* Returns number of filters
*
* To implement interface Countable this returns the number of filters
* appended.
*
* @return integer
*/
public function count()
{
return count($this->getFilters());
}
/**
* IteratorAggregate iterator getter
*
* Returns an iterator to iterate over the appended filters.
*
* @return Iterator|IteratorAggregate
*/
public function getIterator()
{
return new ArrayObject($this->getFilters());
}
}
/**
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 expandtab
*/

View file

@ -0,0 +1,186 @@
<?php
/**
* PHPIDS
*
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2008 PHPIDS group (http://php-ids.org)
*
* PHPIDS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* PHPIDS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PHPIDS. If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5.1.6+
*
* @category Security
* @package PHPIDS
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Christian Matthies <ch0012@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @link http://php-ids.org/
*/
/**
* PHPIDS Filter object
*
* Each object of this class serves as a container for a specific filter. The
* object provides methods to get information about this particular filter and
* also to match an arbitrary string against it.
*
* @category Security
* @package PHPIDS
* @author Christian Matthies <ch0012@gmail.com>
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @copyright 2007 The PHPIDS Group
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @version Release: $Id:Filter.php 517 2007-09-15 15:04:13Z mario $
* @link http://php-ids.org/
* @since Version 0.4
*/
class IDS_Filter
{
/**
* Filter rule
*
* @var string
*/
protected $rule;
/**
* List of tags of the filter
*
* @var array
*/
protected $tags = array();
/**
* Filter impact level
*
* @var integer
*/
protected $impact = 0;
/**
* Filter description
*
* @var string
*/
protected $description = null;
/**
* Constructor
*
* @param mixed $rule filter rule
* @param string $description filter description
* @param array $tags list of tags
* @param integer $impact filter impact level
*
* @return void
*/
public function __construct($id, $rule, $description, array $tags, $impact)
{
$this->id = $id;
$this->rule = $rule;
$this->tags = $tags;
$this->impact = $impact;
$this->description = $description;
}
/**
* Matches a string against current filter
*
* Matches given string against the filter rule the specific object of this
* class represents
*
* @param string $string the string to match
*
* @throws InvalidArgumentException if argument is no string
* @return boolean
*/
public function match($string)
{
if (!is_string($string)) {
throw new InvalidArgumentException('
Invalid argument. Expected a string, received ' . gettype($string)
);
}
return (bool) preg_match(
'/' . $this->getRule() . '/ms', strtolower($string)
);
}
/**
* Returns filter description
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Return list of affected tags
*
* Each filter rule is concerned with a certain kind of attack vectors.
* This method returns those affected kinds.
*
* @return array
*/
public function getTags()
{
return $this->tags;
}
/**
* Returns filter rule
*
* @return string
*/
public function getRule()
{
return $this->rule;
}
/**
* Get filter impact level
*
* @return integer
*/
public function getImpact()
{
return $this->impact;
}
/**
* Get filter ID
*
* @return integer
*/
public function getId()
{
return $this->id;
}
}
/**
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 expandtab
*/

View file

@ -0,0 +1,381 @@
<?php
/**
* PHPIDS
*
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2008 PHPIDS group (http://php-ids.org)
*
* PHPIDS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* PHPIDS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PHPIDS. If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5.1.6+
*
* @category Security
* @package PHPIDS
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Christian Matthies <ch0012@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @link http://php-ids.org/
*/
/**
* Filter Storage
*
* This class provides various default functions for gathering filter patterns
* to be used later on by the detection mechanism. You might extend this class
* to your requirements.
*
* @category Security
* @package PHPIDS
* @author Christian Matthies <ch0012@gmail.com>
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @copyright 2007 The PHPIDS Group
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @version Release: $Id:Storage.php 517 2007-09-15 15:04:13Z mario $
* @link http://php-ids.org/
*/
class IDS_Filter_Storage
{
/**
* Filter source file
*
* @var string
*/
protected $source = null;
/**
* Holds caching settings
*
* @var array
*/
protected $cacheSettings = null;
/**
* Cache container
*
* @var object IDS_Caching wrapper
*/
protected $cache = null;
/**
* Filter container
*
* @var array
*/
protected $filterSet = array();
/**
* Constructor
*
* Loads filters based on provided IDS_Init settings.
*
* @param object $init IDS_Init instance
*
* @throws Exception if unsupported filter type is given
* @return void
*/
public final function __construct(IDS_Init $init)
{
if ($init->config) {
$caching = isset($init->config['Caching']['caching']) ?
$init->config['Caching']['caching'] : 'none';
$type = $init->config['General']['filter_type'];
$this->source = $init->getBasePath()
. $init->config['General']['filter_path'];
if ($caching && $caching != 'none') {
$this->cacheSettings = $init->config['Caching'];
include_once 'IDS/Caching/Factory.php';
$this->cache = IDS_Caching::factory($init, 'storage');
}
switch ($type) {
case 'xml' :
$this->getFilterFromXML();
break;
case 'json' :
$this->getFilterFromJson();
break;
default :
throw new Exception('Unsupported filter type.');
}
}
}
/**
* Sets the filter array
*
* @param array $filterSet array containing multiple IDS_Filter instances
*
* @return object $this
*/
public final function setFilterSet($filterSet)
{
foreach ($filterSet as $filter) {
$this->addFilter($filter);
}
return $this;
}
/**
* Returns registered filters
*
* @return array
*/
public final function getFilterSet()
{
return $this->filterSet;
}
/**
* Adds a filter
*
* @param object $filter IDS_Filter instance
*
* @return object $this
*/
public final function addFilter(IDS_Filter $filter)
{
$this->filterSet[] = $filter;
return $this;
}
/**
* Checks if any filters are cached
*
* @return mixed $filters cached filters or false
*/
private function _isCached()
{
$filters = false;
if ($this->cacheSettings) {
if ($this->cache) {
$filters = $this->cache->getCache();
}
}
return $filters;
}
/**
* Loads filters from XML using SimpleXML
*
* This function parses the provided source file and stores the result.
* If caching mode is enabled the result will be cached to increase
* the performance.
*
* @throws Exception if problems with fetching the XML data occur
* @return object $this
*/
public function getFilterFromXML()
{
if (extension_loaded('SimpleXML')) {
/*
* See if filters are already available in the cache
*/
$filters = $this->_isCached();
/*
* If they aren't, parse the source file
*/
if (!$filters) {
if (file_exists($this->source)) {
if (LIBXML_VERSION >= 20621) {
$filters = simplexml_load_file($this->source,
null,
LIBXML_COMPACT);
} else {
$filters = simplexml_load_file($this->source);
}
}
}
/*
* In case we still don't have any filters loaded and exception
* will be thrown
*/
if (empty($filters)) {
throw new Exception(
'XML data could not be loaded.' .
' Make sure you specified the correct path.'
);
}
/*
* Now the storage will be filled with IDS_Filter objects
*/
$data = array();
$nocache = $filters instanceof SimpleXMLElement;
$filters = $nocache ? $filters->filter : $filters;
include_once 'IDS/Filter.php';
foreach ($filters as $filter) {
$id = $nocache ? (string) $filter->id :
$filter['id'];
$rule = $nocache ? (string) $filter->rule :
$filter['rule'];
$impact = $nocache ? (string) $filter->impact :
$filter['impact'];
$tags = $nocache ? array_values((array) $filter->tags) :
$filter['tags'];
$description = $nocache ? (string) $filter->description :
$filter['description'];
$this->addFilter(new IDS_Filter($id,
$rule,
$description,
(array) $tags[0],
(int) $impact));
$data[] = array(
'id' => $id,
'rule' => $rule,
'impact' => $impact,
'tags' => $tags,
'description' => $description
);
}
/*
* If caching is enabled, the fetched data will be cached
*/
if ($this->cacheSettings) {
$this->cache->setCache($data);
}
} else {
throw new Exception(
'SimpleXML not loaded.'
);
}
return $this;
}
/**
* Loads filters from Json file using ext/Json
*
* This function parses the provided source file and stores the result.
* If caching mode is enabled the result will be cached to increase
* the performance.
*
* @throws Exception if problems with fetching the JSON data occur
* @return object $this
*/
public function getFilterFromJson()
{
if (extension_loaded('Json')) {
/*
* See if filters are already available in the cache
*/
$filters = $this->_isCached();
/*
* If they aren't, parse the source file
*/
if (!$filters) {
if (file_exists($this->source)) {
$filters = json_decode(file_get_contents($this->source));
} else {
throw new Exception(
'JSON data could not be loaded.' .
' Make sure you specified the correct path.'
);
}
}
if (!$filters) {
throw new Exception(
'JSON data could not be loaded.' .
' Make sure you specified the correct path.'
);
}
/*
* Now the storage will be filled with IDS_Filter objects
*/
$data = array();
$nocache = !is_array($filters);
$filters = $nocache ? $filters->filters->filter : $filters;
include_once 'IDS/Filter.php';
foreach ($filters as $filter) {
$id = $nocache ? (string) $filter->id :
$filter['id'];
$rule = $nocache ? (string) $filter->rule :
$filter['rule'];
$impact = $nocache ? (string) $filter->impact :
$filter['impact'];
$tags = $nocache ? array_values((array) $filter->tags) :
$filter['tags'];
$description = $nocache ? (string) $filter->description :
$filter['description'];
$this->addFilter(new IDS_Filter($id,
$rule,
$description,
(array) $tags[0],
(int) $impact));
$data[] = array(
'id' => $id,
'rule' => $rule,
'impact' => $impact,
'tags' => $tags,
'description' => $description
);
}
/*
* If caching is enabled, the fetched data will be cached
*/
if ($this->cacheSettings) {
$this->cache->setCache($data);
}
} else {
throw new Exception(
'ext/json not loaded.'
);
}
return $this;
}
}
/**
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 expandtab
*/

View file

@ -0,0 +1,232 @@
<?php
/**
* PHPIDS
*
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2008 PHPIDS group (http://php-ids.org)
*
* PHPIDS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* PHPIDS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PHPIDS. If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5.1.6+
*
* @category Security
* @package PHPIDS
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Christian Matthies <ch0012@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @link http://php-ids.org/
*/
/**
* Framework initiation
*
* This class is used for the purpose to initiate the framework and inhabits
* functionality to parse the needed configuration file.
*
* @category Security
* @package PHPIDS
* @author Christian Matthies <ch0012@gmail.com>
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @copyright 2007 The PHPIDS Groupup
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @version Release: $Id:Init.php 517 2007-09-15 15:04:13Z mario $
* @link http://php-ids.org/
* @since Version 0.4
*/
class IDS_Init
{
/**
* Holds config settings
*
* @var array
*/
public $config = array();
/**
* Instance of this class depending on the supplied config file
*
* @var array
* @static
*/
private static $instances = array();
/**
* Path to the config file
*
* @var string
*/
private $configPath = null;
/**
* Constructor
*
* Includes needed classes and parses the configuration file
*
* @param string $configPath the path to the config file
*
* @return object $this
*/
private function __construct($configPath = null)
{
include_once 'IDS/Monitor.php';
include_once 'IDS/Filter/Storage.php';
if ($configPath) {
$this->setConfigPath($configPath);
$this->config = parse_ini_file($this->configPath, true);
}
}
/**
* Permitting to clone this object
*
* For the sake of correctness of a singleton pattern, this is necessary
*
* @return void
*/
public final function __clone()
{
}
/**
* Returns an instance of this class. Also a PHP version check
* is being performed to avoid compatibility problems with PHP < 5.1.6
*
* @param string $configPath the path to the config file
*
* @return object
*/
public static function init($configPath = null)
{
if (!isset(self::$instances[$configPath])) {
self::$instances[$configPath] = new IDS_Init($configPath);
}
return self::$instances[$configPath];
}
/**
* Sets the path to the configuration file
*
* @param string $path the path to the config
*
* @throws Exception if file not found
* @return void
*/
public function setConfigPath($path)
{
if (file_exists($path)) {
$this->configPath = $path;
} else {
throw new Exception(
'Configuration file could not be found at ' .
htmlspecialchars($path, ENT_QUOTES, 'UTF-8')
);
}
}
/**
* Returns path to configuration file
*
* @return string the config path
*/
public function getConfigPath()
{
return $this->configPath;
}
/**
* This method checks if a base path is given and usage is set to true.
* If all that tests succeed the base path will be returned as a string -
* else null will be returned.
*
* @return string the base path or null
*/
public function getBasePath() {
return ((isset($this->config['General']['base_path'])
&& $this->config['General']['base_path']
&& isset($this->config['General']['use_base_path'])
&& $this->config['General']['use_base_path'])
? $this->config['General']['base_path'] : null);
}
/**
* Merges new settings into the exsiting ones or overwrites them
*
* @param array $config the config array
* @param boolean $overwrite config overwrite flag
*
* @return void
*/
public function setConfig(array $config, $overwrite = false)
{
if ($overwrite) {
$this->config = $this->_mergeConfig($this->config, $config);
} else {
$this->config = $this->_mergeConfig($config, $this->config);
}
}
/**
* Merge config hashes recursivly
*
* The algorithm merges configuration arrays recursively. If an element is
* an array in both, the values will be appended. If it is a scalar in both,
* the value will be replaced.
*
* @param array $current The legacy hash
* @param array $successor The hash which values count more when in doubt
* @return array Merged hash
*/
protected function _mergeConfig($current, $successor)
{
if (is_array($current) and is_array($successor)) {
foreach ($successor as $key => $value) {
if (isset($current[$key])
and is_array($value)
and is_array($current[$key])) {
$current[$key] = $this->_mergeConfig($current[$key], $value);
} else {
$current[$key] = $successor[$key];
}
}
}
return $current;
}
/**
* Returns the config array
*
* @return array the config array
*/
public function getConfig()
{
return $this->config;
}
}
/**
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 expandtab
*/

View file

@ -0,0 +1,136 @@
<?php
/**
* PHPIDS
*
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2008 PHPIDS group (http://php-ids.org)
*
* PHPIDS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* PHPIDS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PHPIDS. If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5.1.6+
*
* @category Security
* @package PHPIDS
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Christian Matthies <ch0012@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @link http://php-ids.org/
*/
require_once 'IDS/Log/Interface.php';
/**
* Log Composite
*
* This class implements the composite pattern to allow to work with multiple
* logging wrappers at once.
*
* @category Security
* @package PHPIDS
* @author Christian Matthies <ch0012@gmail.com>
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @copyright 2007 The PHPIDS Group
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @version Release: $Id:Composite.php 517 2007-09-15 15:04:13Z mario $
* @link http://php-ids.org/
*/
class IDS_Log_Composite
{
/**
* Holds registered logging wrapper
*
* @var array
*/
public $loggers = array();
/**
* Iterates through registered loggers and executes them
*
* @param object $data IDS_Report object
*
* @return void
*/
public function execute(IDS_Report $data)
{
// make sure request uri is set right on IIS
if (!isset($_SERVER['REQUEST_URI'])) {
$_SERVER['REQUEST_URI'] = substr($_SERVER['PHP_SELF'], 1);
if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING']) {
$_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
}
}
// make sure server address is set right on IIS
if (isset($_SERVER['LOCAL_ADDR'])) {
$_SERVER['SERVER_ADDR'] = $_SERVER['LOCAL_ADDR'];
}
foreach ($this->loggers as $logger) {
$logger->execute($data);
}
}
/**
* Registers a new logging wrapper
*
* Only valid IDS_Log_Interface instances passed to this function will be
* registered
*
* @return void
*/
public function addLogger()
{
$args = func_get_args();
foreach ($args as $class) {
if (!in_array($class, $this->loggers) &&
($class instanceof IDS_Log_Interface)) {
$this->loggers[] = $class;
}
}
}
/**
* Removes a logger
*
* @param object $logger IDS_Log_Interface object
*
* @return boolean
*/
public function removeLogger(IDS_Log_Interface $logger)
{
$key = array_search($logger, $this->loggers);
if (isset($this->loggers[$key])) {
unset($this->loggers[$key]);
return true;
}
return false;
}
}
/**
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 expandtab
*/

View file

@ -0,0 +1,285 @@
<?php
/**
* PHPIDS
*
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2008 PHPIDS group (http://php-ids.org)
*
* PHPIDS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* PHPIDS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PHPIDS. If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5.1.6+
*
* @category Security
* @package PHPIDS
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Christian Matthies <ch0012@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @link http://php-ids.org/
*/
require_once 'IDS/Log/Interface.php';
/*
* Needed SQL:
*
CREATE DATABASE IF NOT EXISTS `phpids` DEFAULT CHARACTER
SET utf8 COLLATE utf8_general_ci;
DROP TABLE IF EXISTS `intrusions`;
CREATE TABLE IF NOT EXISTS `intrusions` (
`id` int(11) unsigned NOT null auto_increment,
`name` varchar(128) NOT null,
`value` text NOT null,
`page` varchar(255) NOT null,
`ip` varchar(15) NOT null,
`impact` int(11) unsigned NOT null,
`origin` varchar(15) NOT null,
`created` datetime NOT null,
PRIMARY KEY (`id`)
) ENGINE=MyISAM ;
*
*
*
*/
/**
* Database logging wrapper
*
* The database wrapper is designed to store reports into an sql database. It
* implements the singleton pattern and is based in PDO, supporting
* different database types.
*
* @category Security
* @package PHPIDS
* @author Christian Matthies <ch0012@gmail.com>
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @copyright 2007 The PHPIDS Group
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @version Release: $Id:Database.php 517 2007-09-15 15:04:13Z mario $
* @link http://php-ids.org/
*/
class IDS_Log_Database implements IDS_Log_Interface
{
/**
* Database wrapper
*
* @var string
*/
private $wrapper = null;
/**
* Database user
*
* @var string
*/
private $user = null;
/**
* Database password
*
* @var string
*/
private $password = null;
/**
* Database table
*
* @var string
*/
private $table = null;
/**
* Database handle
*
* @var object PDO instance
*/
private $handle = null;
/**
* Prepared SQL statement
*
* @var string
*/
private $statement = null;
/**
* Holds current remote address
*
* @var string
*/
private $ip = 'local/unknown';
/**
* Instance container
*
* Due to the singleton pattern this class allows to initiate only one instance
* for each database wrapper.
*
* @var array
*/
private static $instances = array();
/**
* Constructor
*
* Prepares the SQL statement
*
* @param mixed $config IDS_Init instance | array
*
* @return void
*/
protected function __construct($config)
{
if ($config instanceof IDS_Init) {
$this->wrapper = $config->config['Logging']['wrapper'];
$this->user = $config->config['Logging']['user'];
$this->password = $config->config['Logging']['password'];
$this->table = $config->config['Logging']['table'];
} elseif (is_array($config)) {
$this->wrapper = $config['wrapper'];
$this->user = $config['user'];
$this->password = $config['password'];
$this->table = $config['table'];
}
// determine correct IP address
if ($_SERVER['REMOTE_ADDR'] != '127.0.0.1') {
$this->ip = $_SERVER['REMOTE_ADDR'];
} elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$this->ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
try {
$this->handle = new PDO(
$this->wrapper,
$this->user,
$this->password
);
$this->statement = $this->handle->prepare('
INSERT INTO ' . $this->table . ' (
name,
value,
page,
ip,
impact,
origin,
created
)
VALUES (
:name,
:value,
:page,
:ip,
:impact,
:origin,
now()
)
');
} catch (PDOException $e) {
die('PDOException: ' . $e->getMessage());
}
}
/**
* Returns an instance of this class
*
* This method allows the passed argument to be either an instance of IDS_Init or
* an array.
*
* @param mixed $config IDS_Init | array
*
* @return object $this
*/
public static function getInstance($config)
{
if ($config instanceof IDS_Init) {
$wrapper = $config->config['Logging']['wrapper'];
} elseif (is_array($config)) {
$wrapper = $config['wrapper'];
}
if (!isset(self::$instances[$wrapper])) {
self::$instances[$wrapper] = new IDS_Log_Database($config);
}
return self::$instances[$wrapper];
}
/**
* Permitting to clone this object
*
* For the sake of correctness of a singleton pattern, this is necessary
*
* @return void
*/
private function __clone()
{
}
/**
* Stores given data into the database
*
* @param object $data IDS_Report instance
*
* @throws Exception if db error occurred
* @return boolean
*/
public function execute(IDS_Report $data)
{
if (!isset($_SERVER['REQUEST_URI'])) {
$_SERVER['REQUEST_URI'] = substr($_SERVER['PHP_SELF'], 1);
if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING']) {
$_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
}
}
foreach ($data as $event) {
$page = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
$ip = $this->ip;
$this->statement->bindParam('name', $event->getName());
$this->statement->bindParam('value', $event->getValue());
$this->statement->bindParam('page', $page);
$this->statement->bindParam('ip', $ip);
$this->statement->bindParam('impact', $data->getImpact());
$this->statement->bindParam('origin', $_SERVER['SERVER_ADDR']);
if (!$this->statement->execute()) {
$info = $this->statement->errorInfo();
throw new Exception(
$this->statement->errorCode() . ', ' . $info[1] . ', ' . $info[2]
);
}
}
return true;
}
}
/**
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 expandtab
*/

View file

@ -0,0 +1,401 @@
<?php
/**
* PHPIDS
*
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2008 PHPIDS group (http://php-ids.org)
*
* PHPIDS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* PHPIDS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PHPIDS. If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5.1.6+
*
* @category Security
* @package PHPIDS
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Christian Matthies <ch0012@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @link http://php-ids.org/
*/
require_once 'IDS/Log/Interface.php';
/**
* Email logging wrapper
*
* The Email wrapper is designed to send reports via email. It implements the
* singleton pattern.
*
* @category Security
* @package PHPIDS
* @author Christian Matthies <ch0012@gmail.com>
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @copyright 2007 The PHPIDS Group
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @version Release: $Id:Email.php 517 2007-09-15 15:04:13Z mario $
* @link http://php-ids.org/
*/
class IDS_Log_Email implements IDS_Log_Interface
{
/**
* Recipient container
*
* @var array
*/
private $recipients = array();
/**
* Mail subject
*
* @var string
*/
private $subject = null;
/**
* Additional mail headers
*
* @var string
*/
private $headers = null;
/**
* Safemode switch
*
* Using this switch it is possible to enable safemode, which is a spam
* protection based on the alert frequency.
*
* @var boolean
*/
private $safemode = true;
/**
* Urlencode for result strings
*
* This switch is true by default. Setting it to false removes
* the 'better safe than sorry' urlencoding for the result string in
* the report mails. Enhances readability but maybe XSSes email clients.
*
* @var boolean
*/
private $urlencode = true;
/**
* Send rate
*
* If safemode is enabled, this property defines how often reports will be
* sent out. Default value is 15, which means that a mail will be sent on
* condition that the last email has not been sent earlier than 15 seconds ago.
*
* @var integer
*/
private $allowed_rate = 15;
/**
* PHPIDS temp directory
*
* When safemod is enabled, a path to a temp directory is needed to
* store some information. Default is IDS/tmp/
*
* @var string
*/
private $tmp_path = 'IDS/tmp/';
/**
* File prefix for tmp files
*
* @var string
*/
private $file_prefix = 'PHPIDS_Log_Email_';
/**
* Holds current remote address
*
* @var string
*/
private $ip = 'local/unknown';
/**
* Instance container
*
* @var array
*/
private static $instance = array();
/**
* Constructor
*
* @param mixed $config IDS_Init instance | array
*
* @return void
*/
protected function __construct($config)
{
if ($config instanceof IDS_Init) {
$this->recipients = $config->config['Logging']['recipients'];
$this->subject = $config->config['Logging']['subject'];
$this->headers = $config->config['Logging']['header'];
$this->envelope = $config->config['Logging']['envelope'];
$this->safemode = $config->config['Logging']['safemode'];
$this->urlencode = $config->config['Logging']['urlencode'];
$this->allowed_rate = $config->config['Logging']['allowed_rate'];
$this->tmp_path = $config->getBasePath()
. $config->config['General']['tmp_path'];
} elseif (is_array($config)) {
$this->recipients[] = $config['recipients'];
$this->subject = $config['subject'];
$this->additionalHeaders = $config['header'];
}
// determine correct IP address and concat them if necessary
$this->ip = $_SERVER['REMOTE_ADDR'] .
(isset($_SERVER['HTTP_X_FORWARDED_FOR']) ?
' (' . $_SERVER['HTTP_X_FORWARDED_FOR'] . ')' : '');
}
/**
* Returns an instance of this class
*
* This method allows the passed argument to be either an instance of
* IDS_Init or an array.
*
* @param mixed $config IDS_Init | array
*
* @return object $this
*/
public static function getInstance($config)
{
if (!self::$instance) {
self::$instance = new IDS_Log_Email($config);
}
return self::$instance;
}
/**
* Permitting to clone this object
*
* For the sake of correctness of a singleton pattern, this is necessary
*
* @return void
*/
private function __clone()
{
}
/**
* Detects spam attempts
*
* To avoid mail spam through this logging class this function is used
* to detect such attempts based on the alert frequency.
*
* @return boolean
*/
protected function isSpamAttempt()
{
/*
* loop through all files in the tmp directory and
* delete garbage files
*/
$dir = $this->tmp_path;
$numPrefixChars = strlen($this->file_prefix);
$files = scandir($dir);
foreach ($files as $file) {
if (is_file($dir . $file)) {
if (substr($file, 0, $numPrefixChars) == $this->file_prefix) {
$lastModified = filemtime($dir . $file);
if ((
time() - $lastModified) > 3600) {
unlink($dir . $file);
}
}
}
}
/*
* end deleting garbage files
*/
$remoteAddr = $this->ip;
$userAgent = $_SERVER['HTTP_USER_AGENT'];
$filename = $this->file_prefix . md5($remoteAddr.$userAgent) . '.tmp';
$file = $dir . DIRECTORY_SEPARATOR . $filename;
if (!file_exists($file)) {
$handle = fopen($file, 'w');
fwrite($handle, time());
fclose($handle);
return false;
}
$lastAttack = file_get_contents($file);
$difference = time() - $lastAttack;
if ($difference > $this->allowed_rate) {
unlink($file);
} else {
return true;
}
return false;
}
/**
* Prepares data
*
* Converts given data into a format that can be read in an email.
* You might edit this method to your requirements.
*
* @param mixed $data the report data
*
* @return string
*/
protected function prepareData($data)
{
$format = "The following attack has been detected by PHPIDS\n\n";
$format .= "IP: %s \n";
$format .= "Date: %s \n";
$format .= "Impact: %d \n";
$format .= "Affected tags: %s \n";
$attackedParameters = '';
foreach ($data as $event) {
$attackedParameters .= $event->getName() . '=' .
((!isset($this->urlencode) ||$this->urlencode)
? urlencode($event->getValue())
: $event->getValue()) . ", ";
}
$format .= "Affected parameters: %s \n";
$format .= "Request URI: %s \n";
$format .= "Origin: %s \n";
return sprintf($format,
$this->ip,
date('c'),
$data->getImpact(),
join(' ', $data->getTags()),
trim($attackedParameters),
urlencode($_SERVER['REQUEST_URI']),
$_SERVER['SERVER_ADDR']);
}
/**
* Sends the report to registered recipients
*
* @param object $data IDS_Report instance
*
* @throws Exception if data is no string
* @return boolean
*/
public function execute(IDS_Report $data)
{
if ($this->safemode) {
if ($this->isSpamAttempt()) {
return false;
}
}
/*
* In case the data has been modified before it might
* be necessary to convert it to string since it's pretty
* senseless to send array or object via e-mail
*/
$data = $this->prepareData($data);
if (is_string($data)) {
$data = trim($data);
// if headers are passed as array, we need to make a string of it
if (is_array($this->headers)) {
$headers = "";
foreach ($this->headers as $header) {
$headers .= $header . "\r\n";
}
} else {
$headers = $this->headers;
}
if (!empty($this->recipients)) {
if (is_array($this->recipients)) {
foreach ($this->recipients as $address) {
$this->send(
$address,
$data,
$headers,
$this->envelope
);
}
} else {
$this->send(
$this->recipients,
$data,
$headers,
$this->envelope
);
}
}
} else {
throw new Exception(
'Please make sure that data returned by
IDS_Log_Email::prepareData() is a string.'
);
}
return true;
}
/**
* Sends an email
*
* @param string $address email address
* @param string $data the report data
* @param string $headers the mail headers
* @param string $envelope the optional envelope string
*
* @return boolean
*/
protected function send($address, $data, $headers, $envelope = null)
{
if (!$envelope || strpos(ini_get('sendmail_path'),' -f') !== false) {
return mail($address,
$this->subject,
$data,
$headers);
} else {
return mail($address,
$this->subject,
$data,
$headers,
'-f' . $envelope);
}
}
}
/**
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 expandtab
*/

View file

@ -0,0 +1,229 @@
<?php
/**
* PHPIDS
*
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2008 PHPIDS group (http://php-ids.org)
*
* PHPIDS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* PHPIDS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PHPIDS. If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5.1.6+
*
* @category Security
* @package PHPIDS
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Christian Matthies <ch0012@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @link http://php-ids.org/
*/
require_once 'IDS/Log/Interface.php';
/**
* File logging wrapper
*
* The file wrapper is designed to store data into a flatfile. It implements the
* singleton pattern.
*
* @category Security
* @package PHPIDS
* @author Christian Matthies <ch0012@gmail.com>
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @copyright 2007 The PHPIDS Group
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @version Release: $Id:File.php 517 2007-09-15 15:04:13Z mario $
* @link http://php-ids.org/
*/
class IDS_Log_File implements IDS_Log_Interface
{
/**
* Path to the log file
*
* @var string
*/
private $logfile = null;
/**
* Instance container
*
* Due to the singleton pattern this class allows to initiate only one
* instance for each file.
*
* @var array
*/
private static $instances = array();
/**
* Holds current remote address
*
* @var string
*/
private $ip = 'local/unknown';
/**
* Constructor
*
* @param string $logfile path to the log file
*
* @return void
*/
protected function __construct($logfile)
{
// determine correct IP address
if ($_SERVER['REMOTE_ADDR'] != '127.0.0.1') {
$this->ip = $_SERVER['REMOTE_ADDR'];
} elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$this->ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
$this->logfile = $logfile;
}
/**
* Returns an instance of this class
*
* This method allows the passed argument to be either an instance of
* IDS_Init or a path to a log file. Due to the singleton pattern only one
* instance for each file can be initiated.
*
* @param mixed $config IDS_Init or path to a file
*
* @return object $this
*/
public static function getInstance($config)
{
if ($config instanceof IDS_Init) {
$logfile = $config->getBasePath() . $config->config['Logging']['path'];
} elseif (is_string($config)) {
$logfile = $config;
}
if (!isset(self::$instances[$logfile])) {
self::$instances[$logfile] = new IDS_Log_File($logfile);
}
return self::$instances[$logfile];
}
/**
* Permitting to clone this object
*
* For the sake of correctness of a singleton pattern, this is necessary
*
* @return void
*/
private function __clone()
{
}
/**
* Prepares data
*
* Converts given data into a format that can be stored into a file.
* You might edit this method to your requirements.
*
* @param mixed $data incoming report data
*
* @return string
*/
protected function prepareData($data)
{
$format = '"%s",%s,%d,"%s","%s","%s","%s"';
$attackedParameters = '';
foreach ($data as $event) {
$attackedParameters .= $event->getName() . '=' .
rawurlencode($event->getValue()) . ' ';
}
$dataString = sprintf($format,
$this->ip,
date('c'),
$data->getImpact(),
join(' ', $data->getTags()),
trim($attackedParameters),
urlencode($_SERVER['REQUEST_URI']),
$_SERVER['SERVER_ADDR']);
return $dataString;
}
/**
* Stores given data into a file
*
* @param object $data IDS_Report
*
* @throws Exception if the logfile isn't writeable
* @return mixed
*/
public function execute(IDS_Report $data)
{
/*
* In case the data has been modified before it might be necessary
* to convert it to string since we can't store array or object
* into a file
*/
$data = $this->prepareData($data);
if (is_string($data)) {
if (file_exists($this->logfile)) {
$data = trim($data);
if (!empty($data)) {
if (is_writable($this->logfile)) {
$handle = fopen($this->logfile, 'a');
fwrite($handle, trim($data) . "\n");
fclose($handle);
} else {
throw new Exception(
'Please make sure that ' . $this->logfile .
' is writeable.'
);
}
}
} else {
throw new Exception(
'Given file does not exist. Please make sure the
logfile is present in the given directory.'
);
}
} else {
throw new Exception(
'Please make sure that data returned by
IDS_Log_File::prepareData() is a string.'
);
}
return true;
}
}
/**
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 expandtab
*/

View file

@ -0,0 +1,65 @@
<?php
/**
* PHPIDS
*
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2008 PHPIDS group (http://php-ids.org)
*
* PHPIDS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* PHPIDS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PHPIDS. If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5.1.6+
*
* @category Security
* @package PHPIDS
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Christian Matthies <ch0012@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @link http://php-ids.org/
*/
/**
* Interface for logging wrappers
*
* @category Security
* @package PHPIDS
* @author Christian Matthies <ch0012@gmail.com>
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @copyright 2007 The PHPIDS Group
* @version Release: $Id:Interface.php 517 2007-09-15 15:04:13Z mario $
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @link http://php-ids.org/
*/
interface IDS_Log_Interface
{
/**
* Interface method
*
* @param IDS_Report $data the report data
*
* @return void
*/
public function execute(IDS_Report $data);
}
/**
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 expandtab
*/

View file

@ -0,0 +1,681 @@
<?php
/**
* PHPIDS
*
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2008 PHPIDS group (http://php-ids.org)
*
* PHPIDS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* PHPIDS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PHPIDS. If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5.1.6+
*
* @category Security
* @package PHPIDS
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Christian Matthies <ch0012@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @link http://php-ids.org/
*/
/**
* Monitoring engine
*
* This class represents the core of the frameworks attack detection mechanism
* and provides functions to scan incoming data for malicious appearing script
* fragments.
*
* @category Security
* @package PHPIDS
* @author Christian Matthies <ch0012@gmail.com>
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @copyright 2007 The PHPIDS Group
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @version Release: $Id:Monitor.php 949 2008-06-28 01:26:03Z christ1an $
* @link http://php-ids.org/
*/
class IDS_Monitor
{
/**
* Tags to define what to search for
*
* Accepted values are xss, csrf, sqli, dt, id, lfi, rfe, spam, dos
*
* @var array
*/
private $tags = null;
/**
* Request array
*
* Array containing raw data to search in
*
* @var array
*/
private $request = null;
/**
* Container for filter rules
*
* Holds an instance of IDS_Filter_Storage
*
* @var object
*/
private $storage = null;
/**
* Results
*
* Holds an instance of IDS_Report which itself provides an API to
* access the detected results
*
* @var object
*/
private $report = null;
/**
* Scan keys switch
*
* Enabling this property will cause the monitor to scan both the key and
* the value of variables
*
* @var boolean
*/
public $scanKeys = false;
/**
* Exception container
*
* Using this array it is possible to define variables that must not be
* scanned. Per default, utmz google analytics parameters are permitted.
*
* @var array
*/
private $exceptions = array();
/**
* Html container
*
* Using this array it is possible to define variables that legally
* contain html and have to be prepared before hitting the rules to
* avoid too many false alerts
*
* @var array
*/
private $html = array();
/**
* JSON container
*
* Using this array it is possible to define variables that contain
* JSON data - and should be treated as such
*
* @var array
*/
private $json = array();
/**
* Holds HTMLPurifier object
*
* @var object
*/
private $htmlpurifier = NULL;
/**
* Path to HTMLPurifier source
*
* This path might be changed in case one wishes to make use of a
* different HTMLPurifier source file e.g. if already used in the
* application PHPIDS is protecting
*
* @var string
*/
private $pathToHTMLPurifier = '';
/**
* HTMLPurifier cache directory
*
* @var string
*/
private $HTMLPurifierCache = '';
/**
* This property holds the tmp JSON string from the
* _jsonDecodeValues() callback
*
* @var string
*/
private $tmpJsonString = '';
/**
* Constructor
*
* @param array $request array to scan
* @param object $init instance of IDS_Init
* @param array $tags list of tags to which filters should be applied
*
* @return void
*/
public function __construct(array $request, IDS_Init $init, array $tags = null)
{
$version = isset($init->config['General']['min_php_version'])
? $init->config['General']['min_php_version'] : '5.1.6';
if (version_compare(PHP_VERSION, $version, '<')) {
throw new Exception(
'PHP version has to be equal or higher than ' . $version . ' or
PHP version couldn\'t be determined'
);
}
if (!empty($request)) {
$this->storage = new IDS_Filter_Storage($init);
$this->request = $request;
$this->tags = $tags;
$this->scanKeys = $init->config['General']['scan_keys'];
$this->exceptions = isset($init->config['General']['exceptions'])
? $init->config['General']['exceptions'] : false;
$this->html = isset($init->config['General']['html'])
? $init->config['General']['html'] : false;
$this->json = isset($init->config['General']['json'])
? $init->config['General']['json'] : false;
if(isset($init->config['General']['HTML_Purifier_Path'])
&& isset($init->config['General']['HTML_Purifier_Cache'])) {
$this->pathToHTMLPurifier =
$init->config['General']['HTML_Purifier_Path'];
$this->HTMLPurifierCache =
$init->config['General']['HTML_Purifier_Cache'];
}
}
if (!is_writeable($init->getBasePath()
. $init->config['General']['tmp_path'])) {
throw new Exception(
'Please make sure the ' .
htmlspecialchars($init->getBasePath() .
$init->config['General']['tmp_path'], ENT_QUOTES, 'UTF-8') .
' folder is writable'
);
}
include_once 'IDS/Report.php';
$this->report = new IDS_Report;
}
/**
* Starts the scan mechanism
*
* @return object IDS_Report
*/
public function run()
{
if (!empty($this->request)) {
foreach ($this->request as $key => $value) {
$this->_iterate($key, $value);
}
}
return $this->getReport();
}
/**
* Iterates through given data and delegates it to IDS_Monitor::_detect() in
* order to check for malicious appearing fragments
*
* @param mixed $key the former array key
* @param mixed $value the former array value
*
* @return void
*/
private function _iterate($key, $value)
{
if (!is_array($value)) {
if (is_string($value)) {
if ($filter = $this->_detect($key, $value)) {
include_once 'IDS/Event.php';
$this->report->addEvent(
new IDS_Event(
$key,
$value,
$filter
)
);
}
}
} else {
foreach ($value as $subKey => $subValue) {
$this->_iterate($key . '.' . $subKey, $subValue);
}
}
}
/**
* Checks whether given value matches any of the supplied filter patterns
*
* @param mixed $key the key of the value to scan
* @param mixed $value the value to scan
*
* @return bool|array false or array of filter(s) that matched the value
*/
private function _detect($key, $value)
{
// to increase performance, only start detection if value
// isn't alphanumeric
if (!$value || !preg_match('/[^\w\s\/@!?,\.]+|(?:\.\/)|(?:@@\w+)/', $value)) {
return false;
}
// check if this field is part of the exceptions
if (is_array($this->exceptions)
&& in_array($key, $this->exceptions, true)) {
return false;
}
// check for magic quotes and remove them if necessary
if (function_exists('get_magic_quotes_gpc')
&& get_magic_quotes_gpc()) {
$value = stripslashes($value);
}
// if html monitoring is enabled for this field - then do it!
if (is_array($this->html) && in_array($key, $this->html, true)) {
list($key, $value) = $this->_purifyValues($key, $value);
}
// check if json monitoring is enabled for this field
if (is_array($this->json) && in_array($key, $this->json, true)) {
list($key, $value) = $this->_jsonDecodeValues($key, $value);
}
// use the converter
include_once 'IDS/Converter.php';
$value = IDS_Converter::runAll($value);
$value = IDS_Converter::runCentrifuge($value, $this);
// scan keys if activated via config
$key = $this->scanKeys ? IDS_Converter::runAll($key)
: $key;
$key = $this->scanKeys ? IDS_Converter::runCentrifuge($key, $this)
: $key;
$filters = array();
$filterSet = $this->storage->getFilterSet();
foreach ($filterSet as $filter) {
/*
* in case we have a tag array specified the IDS will only
* use those filters that are meant to detect any of the
* defined tags
*/
if (is_array($this->tags)) {
if (array_intersect($this->tags, $filter->getTags())) {
if ($this->_match($key, $value, $filter)) {
$filters[] = $filter;
}
}
} else {
if ($this->_match($key, $value, $filter)) {
$filters[] = $filter;
}
}
}
return empty($filters) ? false : $filters;
}
/**
* Purifies given key and value variables using HTMLPurifier
*
* This function is needed whenever there is variables for which HTML
* might be allowed like e.g. WYSIWYG post bodies. It will dectect malicious
* code fragments and leaves harmless parts untouched.
*
* @param mixed $key
* @param mixed $value
* @since 0.5
*
* @return array
*/
private function _purifyValues($key, $value) {
include_once $this->pathToHTMLPurifier;
if (!is_writeable($this->HTMLPurifierCache)) {
throw new Exception(
$this->HTMLPurifierCache . ' must be writeable');
}
if (class_exists('HTMLPurifier')) {
$config = HTMLPurifier_Config::createDefault();
$config->set('Attr', 'EnableID', true);
$config->set('Cache', 'SerializerPath', $this->HTMLPurifierCache);
$config->set('Output', 'Newline', "\n");
$this->htmlpurifier = new HTMLPurifier($config);
} else {
throw new Exception(
'HTMLPurifier class could not be found - ' .
'make sure the purifier files are valid and' .
' the path is correct'
);
}
$purified_value = $this->htmlpurifier->purify($value);
$purified_key = $this->htmlpurifier->purify($key);
$redux_value = strip_tags($value);
$redux_key = strip_tags($key);
if ($value != $purified_value || $redux_value) {
$value = $this->_diff($value, $purified_value, $redux_value);
} else {
$value = NULL;
}
if ($key != $purified_key) {
$key = $this->_diff($key, $purified_key, $redux_key);
} else {
$key = NULL;
}
return array($key, $value);
}
/**
* This method calculates the difference between the original
* and the purified markup strings.
*
* @param string $original the original markup
* @param string $purified the purified markup
* @param string $redux the string without html
* @since 0.5
*
* @return string the difference between the strings
*/
private function _diff($original, $purified, $redux)
{
/*
* deal with over-sensitive alt-attribute addition of the purifier
* and other common html formatting problems
*/
$purified = preg_replace('/\s+alt="[^"]*"/m', null, $purified);
$purified = preg_replace('/=?\s*"\s*"/m', null, $purified);
$original = preg_replace('/=?\s*"\s*"/m', null, $original);
$original = preg_replace('/\s+alt=?/m', null, $original);
// check which string is longer
$length = (strlen($original) - strlen($purified));
/*
* Calculate the difference between the original html input
* and the purified string.
*/
if ($length > 0) {
$array_2 = str_split($original);
$array_1 = str_split($purified);
} else {
$array_1 = str_split($original);
$array_2 = str_split($purified);
}
foreach ($array_2 as $key => $value) {
if ($value !== $array_1[$key]) {
$array_1 = array_reverse($array_1);
$array_1[] = $value;
$array_1 = array_reverse($array_1);
}
}
// return the diff - ready to hit the converter and the rules
$diff = trim(join('', array_reverse(
(array_slice($array_1, 0, $length)))));
// clean up spaces between tag delimiters
$diff = preg_replace('/>\s*</m', '><', $diff);
// correct over-sensitively stripped bad html elements
$diff = preg_replace('/[^<](iframe|script|embed|object' .
'|applet|base|img|style)/m', '<$1', $diff);
if ($original == $purified && !$redux) {
return null;
}
return $diff . $redux;
}
/**
* This method prepares incoming JSON data for the PHPIDS detection
* process. It utilizes _jsonConcatContents() as callback and returns a
* string version of the JSON data structures.
*
* @param mixed $key
* @param mixed $value
* @since 0.5.3
*
* @return array
*/
private function _jsonDecodeValues($key, $value) {
$tmp_key = json_decode($key);
$tmp_value = json_decode($value);
if($tmp_value && is_array($tmp_value) || is_object($tmp_value)) {
array_walk_recursive($tmp_value, array($this, '_jsonConcatContents'));
$value = $this->tmpJsonString;
}
if($tmp_key && is_array($tmp_key) || is_object($tmp_key)) {
array_walk_recursive($tmp_key, array($this, '_jsonConcatContents'));
$key = $this->tmpJsonString;
}
return array($key, $value);
}
/**
* This is the callback used in _jsonDecodeValues(). The method
* concatenates key and value and stores them in $this->tmpJsonString.
*
* @param mixed $key
* @param mixed $value
* @since 0.5.3
*
* @return void
*/
private function _jsonConcatContents($key, $value) {
$this->tmpJsonString .= $key . " " . $value . "\n";
}
/**
* Matches given value and/or key against given filter
*
* @param mixed $key the key to optionally scan
* @param mixed $value the value to scan
* @param object $filter the filter object
*
* @return boolean
*/
private function _match($key, $value, $filter)
{
if ($this->scanKeys) {
if ($filter->match($key)) {
return true;
}
}
if ($filter->match($value)) {
return true;
}
return false;
}
/**
* Sets exception array
*
* @param mixed $exceptions the thrown exceptions
*
* @return void
*/
public function setExceptions($exceptions)
{
if (!is_array($exceptions)) {
$exceptions = array($exceptions);
}
$this->exceptions = $exceptions;
}
/**
* Returns exception array
*
* @return array
*/
public function getExceptions()
{
return $this->exceptions;
}
/**
* Sets html array
*
* @param mixed $html the fields containing html
* @since 0.5
*
* @return void
*/
public function setHtml($html)
{
if (!is_array($html)) {
$html = array($html);
}
$this->html = $html;
}
/**
* Adds a value to the html array
*
* @since 0.5
*
* @return void
*/
public function addHtml($value)
{
$this->html[] = $value;
}
/**
* Returns html array
*
* @since 0.5
*
* @return array the fields that contain allowed html
*/
public function getHtml()
{
return $this->html;
}
/**
* Sets json array
*
* @param mixed $json the fields containing json
* @since 0.5.3
*
* @return void
*/
public function setJson($json)
{
if (!is_array($json)) {
$json = array($json);
}
$this->json = $json;
}
/**
* Adds a value to the json array
*
* @since 0.5.3
*
* @return void
*/
public function addJson($value)
{
$this->json[] = $value;
}
/**
* Returns json array
*
* @since 0.5.3
*
* @return array the fields that contain json
*/
public function getJson()
{
return $this->json;
}
/**
* Returns storage container
*
* @return array
*/
public function getStorage()
{
return $this->storage;
}
/**
* Returns report object providing various functions to work with
* detected results. Also the centrifuge data is being set as property
* of the report object.
*
* @return object IDS_Report
*/
public function getReport()
{
if (isset($this->centrifuge) && $this->centrifuge) {
$this->report->setCentrifuge($this->centrifuge);
}
return $this->report;
}
}
/**
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 expandtab
*/

View file

@ -0,0 +1,341 @@
<?php
/**
* PHPIDS
*
* Requirements: PHP5, SimpleXML
*
* Copyright (c) 2008 PHPIDS group (http://php-ids.org)
*
* PHPIDS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 of the License, or
* (at your option) any later version.
*
* PHPIDS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PHPIDS. If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5.1.6+
*
* @category Security
* @package PHPIDS
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Christian Matthies <ch0012@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @link http://php-ids.org/
*/
/**
* PHPIDS report object
*
* The report objects collects a number of events and thereby presents the
* detected results. It provides a convenient API to work with the results.
*
* Note that this class implements Countable, IteratorAggregate and
* a __toString() method
*
* @category Security
* @package PHPIDS
* @author Christian Matthies <ch0012@gmail.com>
* @author Mario Heiderich <mario.heiderich@gmail.com>
* @author Lars Strojny <lars@strojny.net>
* @copyright 2007 The PHPIDS Group
* @license http://www.gnu.org/licenses/lgpl.html LGPL
* @version Release: $Id:Report.php 517 2007-09-15 15:04:13Z mario $
* @link http://php-ids.org/
*/
class IDS_Report implements Countable, IteratorAggregate
{
/**
* Event container
*
* @var array
*/
protected $events = array();
/**
* List of affected tags
*
* This list of tags is collected from the collected event objects on
* demand when IDS_Report->getTags() is called
*
* @var array
*/
protected $tags = array();
/**
* Impact level
*
* The impact level is calculated on demand by adding the results of the
* event objects on IDS_Report->getImpact()
*
* @var integer
*/
protected $impact = 0;
/**
* Centrifuge data
*
* This variable - initiated as an empty array - carries all information
* about the centrifuge data if available
*
* @var array
*/
protected $centrifuge = array();
/**
* Constructor
*
* @param array $events the events the report should include
*
* @return void
*/
public function __construct(array $events = null)
{
if ($events) {
foreach ($events as $event) {
$this->addEvent($event);
}
}
}
/**
* Adds an IDS_Event object to the report
*
* @param object $event IDS_Event
*
* @return object $this
*/
public function addEvent(IDS_Event $event)
{
$this->clear();
$this->events[$event->getName()] = $event;
return $this;
}
/**
* Get event by name
*
* In most cases an event is identified by the key of the variable that
* contained maliciously appearing content
*
* @param scalar $name the event name
*
* @throws InvalidArgumentException if argument is invalid
* @return mixed IDS_Event object or false if the event does not exist
*/
public function getEvent($name)
{
if (!is_scalar($name)) {
throw new InvalidArgumentException(
'Invalid argument type given'
);
}
if ($this->hasEvent($name)) {
return $this->events[$name];
}
return false;
}
/**
* Returns list of affected tags
*
* @return array
*/
public function getTags()
{
if (!$this->tags) {
$this->tags = array();
foreach ($this->events as $event) {
$this->tags = array_merge($this->tags,
$event->getTags());
}
$this->tags = array_values(array_unique($this->tags));
}
return $this->tags;
}
/**
* Returns total impact
*
* Each stored IDS_Event object and its IDS_Filter sub-object are called
* to calculate the overall impact level of this request
*
* @return integer
*/
public function getImpact()
{
if (!$this->impact) {
$this->impact = 0;
foreach ($this->events as $event) {
$this->impact += $event->getImpact();
}
}
return $this->impact;
}
/**
* Checks if a specific event with given name exists
*
* @param scalar $name the event name
*
* @throws InvalidArgumentException if argument is illegal
*
* @return boolean
*/
public function hasEvent($name)
{
if (!is_scalar($name)) {
throw new InvalidArgumentException('Invalid argument given');
}
return isset($this->events[$name]);
}
/**
* Returns total amount of events
*
* @return integer
*/
public function count()
{
return count($this->events);
}
/**
* Return iterator object
*
* In order to provide the possibility to directly iterate over the
* IDS_Event object the IteratorAggregate is implemented. One can easily
* use foreach() to iterate through all stored IDS_Event objects.
*
* @return Iterator
*/
public function getIterator()
{
return new ArrayObject($this->events);
}
/**
* Checks if any events are registered
*
* @return boolean
*/
public function isEmpty()
{
return empty($this->events);
}
/**
* Clears calculated/collected values
*
* @return void
*/
protected function clear()
{
$this->impact = 0;
$this->tags = array();
}
/**
* This method returns the centrifuge property or null if not
* filled with data
*
* @return array/null
*/
public function getCentrifuge()
{
return ($this->centrifuge && count($this->centrifuge) > 0)
? $this->centrifuge : null;
}
/**
* This method sets the centrifuge property
*
* @param array $centrifuge the centrifuge data
*
* @throws InvalidArgumentException if argument is illegal
*
* @return boolean true is arguments were valid
*/
public function setCentrifuge($centrifuge = array())
{
if (is_array($centrifuge) && $centrifuge) {
$this->centrifuge = $centrifuge;
return true;
}
throw new InvalidArgumentException('Invalid argument given');
}
/**
* Directly outputs all available information
*
* @return string
*/
public function __toString()
{
if (!$this->isEmpty()) {
$output = '';
$output .= 'Total impact: ' . $this->getImpact() . "<br/>\n";
$output .= 'Affected tags: ' . join(', ', $this->getTags()) .
"<br/>\n";
foreach ($this->events as $event) {
$output .= "<br/>\nVariable: " .
htmlspecialchars($event->getName()) . ' | Value: ' .
htmlspecialchars($event->getValue()) . "<br/>\n";
$output .= 'Impact: ' . $event->getImpact() . ' | Tags: ' .
join(', ', $event->getTags()) . "<br/>\n";
foreach ($event as $filter) {
$output .= 'Description: ' . $filter->getDescription() .
' | ';
$output .= 'Tags: ' . join(', ', $filter->getTags()) .
' | ';
$output .= 'ID: ' . $filter->getId() .
"<br/>\n";
}
}
$output .= '<br/>';
if ($centrifuge = $this->getCentrifuge()) {
$output .= 'Centrifuge detection data';
$output .= '<br/> Threshold: ' .
((isset($centrifuge['threshold'])&&$centrifuge['threshold']) ?
$centrifuge['threshold'] : '---');
$output .= '<br/> Ratio: ' .
((isset($centrifuge['ratio'])&&$centrifuge['ratio']) ?
$centrifuge['ratio'] : '---');
if(isset($centrifuge['converted'])) {
$output .= '<br/> Converted: ' . $centrifuge['converted'];
}
$output .= "<br/><br/>\n";
}
}
return isset($output) ? $output : '';
}
}
/**
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 expandtab
*/

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,732 @@
<filters>
<filter>
<id>1</id>
<rule><![CDATA[(?:"+.*[^-]?>)|(?:[^\w\s]\s*\/>)|(?:>")]]></rule>
<description>finds html breaking injections including whitespace attacks</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
</tags>
<impact>4</impact>
</filter>
<filter>
<id>2</id>
<rule><![CDATA[(?:"+.*[<=]\s*"[^"]+")|(?:"\w+\s*=)|(?:>\w=\/)|(?:#.+\)["\s]*>)|(?:"\s*(?:src|style|on\w+)\s*=\s*")]]></rule>
<description>finds attribute breaking injections including whitespace attacks</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
</tags>
<impact>4</impact>
</filter>
<filter>
<id>69</id>
<rule><![CDATA[(?:[\s\/"]+(?:on\w+|style)=["\w])]]></rule>
<description>finds malicious attribute injection attempts</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
</tags>
<impact>6</impact>
</filter>
<filter>
<id>3</id>
<rule><![CDATA[(?:^>[\w\s]*<\/?\w{2,}>)]]></rule>
<description>finds unquoted attribute breaking injections</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
</tags>
<impact>2</impact>
</filter>
<filter>
<id>4</id>
<rule><![CDATA[(?:[+\/]\s*name[\W\d]*[)+])|(?:;\W*url\s*=)|(?:[^\w\s\/?:>]\s*(?:location|referrer|name)\s*[^\/\w\s-])]]></rule>
<description>Detects url-, name-, JSON, and referrer-contained payload attacks</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>5</id>
<rule><![CDATA[(?:\W\s*hash\s*[^\w\s-])|(?:\w+=\W*[^,]*,[^\s(]\s*\()|(?:\?"[^\s"]":)|(?:(?<!\/)__[a-z]+__)|(?:(?:^|[\s)\]\}])(?:s|g)etter\s*=)]]></rule>
<description>Detects hash-contained xss payload attacks, setter usage and property overloading</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>6</id>
<rule><![CDATA[(?:with\s*\(\s*.+\s*\)\s*\w+\s*\()|(?:(?:do|while|for)\s*\([^)]*\)\s*\{)|(?:\/[\w\s]*\[\W*\w)]]></rule>
<description>Detects self contained xss via with(), common loops and regex to string conversion</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>7</id>
<rule><![CDATA[(?:\d\s*[|&]{2}\s*\w)|(?:[=(].+\?.+:)|(?:with\([^)]*\)\))|(?:\.\s*source\W)|(?:\?[^:]+:[^;]+(;|$))]]></rule>
<description>Detects JavaScript with(), ternary operators and XML predicate attacks</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>8</id>
<rule><![CDATA[(?:\([\w\s]+\([\w\s]+\)[\w\s]+\))|(?:(?<!(?:mozilla\/\d\.\d\s))\([^)[]+\[[^\]]+\][^)]*\))|(?:[^\s!][{([][^({[]+[{([][^}\])]+[}\])][\s+",\d]*[}\])])|(?:"\)?\]\W*\[)|(?:=\s*[^\s:;]+\s*[{([][^}\])]+[}\])];)]]></rule>
<description>Detects self-executing JavaScript functions</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>9</id>
<rule><![CDATA[(?:\\u00[a-f0-9]{2})|(?:\\x0*[a-f0-9]{2})|(?:\\\d{2,3})]]></rule>
<description>Detects the IE octal, hex and unicode entities</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
</tags>
<impact>2</impact>
</filter>
<filter>
<id>10</id>
<rule><![CDATA[(?:(?:\/|\\)?\.\.(\/|\\)(?:\.\.)?)|(?:\w+\.exe\??\s)|(?:;\s*\w+\s*\/[\w*-]+\/)|(?:\d\.\dx\|)|(?:%(?:c0\.|af\.|5c\.))|(?:\/(?:%2e){2})]]></rule>
<description>Detects basic directory traversal</description>
<tags>
<tag>dt</tag>
<tag>id</tag>
<tag>lfi</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>11</id>
<rule><![CDATA[(?:%c0%ae\/)|(?:(?:\/|\\)+(home|conf|usr|etc|proc|opt|s?bin|local|dev|tmp|kern|[br]oot|sys|system|windows|winnt|program|%[a-z_-]{3,}%)(?:\/|\\))|(?:(?:\/|\\)+inetpub|localstart\.asp|boot\.ini)]]></rule>
<description>Detects specific directory and path traversal</description>
<tags>
<tag>dt</tag>
<tag>id</tag>
<tag>lfi</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>12</id>
<rule><![CDATA[(?:etc\/\W*passwd)]]></rule>
<description>Detects etc/passwd inclusion attempts</description>
<tags>
<tag>dt</tag>
<tag>id</tag>
<tag>lfi</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>13</id>
<rule><![CDATA[(?:%u(?:ff|00|e\d)\w\w)|(?:(?:%(?:e\w|c[^3\W]|))(?:%\w\w)(?:%\w\w)?)]]></rule>
<description>Detects halfwidth/fullwidth encoded unicode HTML breaking attempts</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
</tags>
<impact>3</impact>
</filter>
<filter>
<id>14</id>
<rule><![CDATA[(?:\w+script:|@import[^\w]|;base64|base64,)|(?:\w+\s*\([\w\s]+,[\w\s]+,[\w\s]+,[\w\s]+,[\w\s]+,[\w\s]+\))]]></rule>
<description>Detects possible includes and packed functions</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
<tag>id</tag>
<tag>rfe</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>15</id>
<rule><![CDATA[([^*:\s\w,.\/?+-]\s*)?(?<![a-z]\s)(?<![a-z\/_@>\-\|])(\s*return\s*)?(?:create(?:element|attribute|textnode)|[a-z]+Events?|getelement\w+|appendchild|createrange|createcontextualfragment|removenode|parentnode|decodeuricomponent|\wettimeout|useragent)(?(1)[^\w%"]|(?:\s*[^@\s\w%",.+\-]))]]></rule>
<description>Detects JavaScript DOM/miscellaneous properties and methods</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
<tag>id</tag>
<tag>rfe</tag>
</tags>
<impact>6</impact>
</filter>
<filter>
<id>16</id>
<rule><![CDATA[([^*\s\w,.\/?+-]\s*)?(?<![a-mo-z]\s)(?<![a-z\/_@>\-\|])(\s*return\s*)?(?:alert|showmodaldialog|infinity|isnan|isnull|msgbox|expression|prompt|write(?:ln)?|confirm|dialog|urn|(?:un)?eval|exec|execscript|tostring|status|execute|window|unescape|navigate)(?(1)[^\w%"]|(?:\s*[^@\s\w%",.:\/+\-]))]]></rule>
<description>Detects possible includes and typical script methods</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
<tag>id</tag>
<tag>rfe</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>17</id>
<rule><![CDATA[([^*:\s\w,.\/?+-]\s*)?(?<![a-z]\s)(?<![a-z\/_@>\-\|])(\s*return\s*)?(?:hash|name|href|navigateandfind|source|pathname|close|constructor|port|protocol|assign|replace|back|forward|document|window|self|parent|frames|_?content|date|cookie|innerhtml|innertext|csstext+?|outerhtml|print|moveby|resizeto|createstylesheet|stylesheets)(?(1)[^\w%"]|(?:\s*[^@\/\s\w%",.+\-]))]]></rule>
<description>Detects JavaScript object properties and methods</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
<tag>id</tag>
<tag>rfe</tag>
</tags>
<impact>4</impact>
</filter>
<filter>
<id>18</id>
<rule><![CDATA[([^*:\s\w,.\/?+-]\s*)?(?<![a-z]\s)(?<![a-z\/_@>\-\|])(\s*return\s*)?(?:join|pop|push|reverse|shift|sp?lice|sort|unshift)(?(1)[^\w%"]|(?:\s*[^@\s\w%",.+\-]))]]></rule>
<description>Detects JavaScript array properties and methods</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
<tag>id</tag>
<tag>rfe</tag>
</tags>
<impact>4</impact>
</filter>
<filter>
<id>19</id>
<rule><![CDATA[([^*:\s\w,.\/?+-]\s*)?(?<![a-z]\s)(?<![a-z\/_@>\-\|])(\s*return\s*)?(?:atob|btoa|charat|charcodeat|charset|concat|crypto|frames|fromcharcode|indexof|lastindexof|match|navigator|toolbar|menubar|replace|regexp|slice|split|substr|substring|escape|\w+codeuri\w*)(?(1)[^\w%"]|(?:\s*[^@\s\w%",.+\-]))]]></rule>
<description>Detects JavaScript string properties and methods</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
<tag>id</tag>
<tag>rfe</tag>
</tags>
<impact>4</impact>
</filter>
<filter>
<id>20</id>
<rule><![CDATA[([^*:\s\w,.\/?+-]\s*)?(?<![a-z]\s)(?<![a-z_@>\-\|])(\s*return\s*)?(?:globalstorage|sessionstorage|postmessage|callee|constructor|content|domain|prototype|try|catch|top|call|apply|url|function|object|array|string|math|if|elseif|case|switch|regex|boolean|location|settimeout|setinterval|void|setexpression|namespace|while)(?(1)[^\w%"]|(?:\s*[^@\s\w%",.+\-]))]]></rule>
<description>Detects JavaScript language constructs</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
<tag>id</tag>
<tag>rfe</tag>
</tags>
<impact>4</impact>
</filter>
<filter>
<id>21</id>
<rule><![CDATA[(?:,\s*(?:alert|showmodaldialog|eval)\s*,)|(?::\s*eval\s*[^\s])|([^:\s\w,.\/?+-]\s*)?(?<![a-z\/_@])(\s*return\s*)?(?:(?:document\s*\.)?(?:.+\/)?(?:alert|eval|msgbox|showmodaldialog|prompt|write(?:ln)?|confirm|dialog|open))\s*(?(1)[^\w]|(?:\s*[^\s\w,.@\/+-]))|(?:java[\s\/]*\.[\s\/]*lang)|(?:\w\s*=\s*new\s+\w+)|(?:&\s*\w+\s*\)[^,])|(?:\+[\W\d]*new\s+\w+[\W\d]*\+)|(?:document\.\w)]]></rule>
<description>Detects very basic XSS probings</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
<tag>id</tag>
<tag>rfe</tag>
</tags>
<impact>3</impact>
</filter>
<filter>
<id>22</id>
<rule><![CDATA[(?:[^\s]\s*=\s*script)|(?:\.\s*constructor)|(?:default\s+xml\s+namespace\s*=)|(?:\/\s*\+[^+]+\s*\+\s*\/)]]></rule>
<description>Detects advanced XSS probings via Script(), RexExp, constructors and XML namespaces</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
<tag>id</tag>
<tag>rfe</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>23</id>
<rule><![CDATA[(?:\W\s*(?:location|document)\s*\W[^({[;]+[({[;])|(?:\(\w+\?[:\w]+\))|(?:\w+\s*=\s*\d+\W\w+)|(?:\]\s*\(\s*\w+)]]></rule>
<description>Detects JavaScript location/document property access and window access obfuscation</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>24</id>
<rule><![CDATA[(?:\/[\w\s]+\/\.)|(?:=\s*\/\w+\/\s*\.)|(?:(?:this|window|top|parent|frames|self|content)\[\s*[(,"]*\s*\w)|(?:,\s*new\s+\w+\s*[,;)])]]></rule>
<description>Detects basic obfuscated JavaScript script injections</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>25</id>
<rule><![CDATA[(?:\(\s*(?:this|top|window|self|parent|_?content)\s*\))|(?:src\s*=s*(?:\w+:|\/\/))|(?:\w+\[("\w+"|\w+\|\|))|(?:[\d\W]\|\|[\d\W]|\W=\w+,)|(?:\/\s*\+\s*[a-z"])|(?:=\s*\$[^([]*\()|(?:=\s*\(\s*")]]></rule>
<description>Detects obfuscated JavaScript script injections</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>26</id>
<rule><![CDATA[(?:[^:\s\w]+\s*[^\w\/](href|protocol|host|hostname|pathname|hash|port|cookie)[^\w])]]></rule>
<description>Detects JavaScript cookie stealing and redirection attempts</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
</tags>
<impact>4</impact>
</filter>
<filter>
<id>27</id>
<rule><![CDATA[(?:data:(?:.)*,)|(?:\w+\s*=\W*(?!https?)\w+:)|(jar:\w+:)]]></rule>
<description>Detects data: URL injections and common URI schemes</description>
<tags>
<tag>xss</tag>
<tag>rfe</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>28</id>
<rule><![CDATA[(?:firefoxurl:\w+\|)|(?:(?:file|res|telnet|nntp|news|mailto|chrome)\s*:\s*[%&#xu\/]+)|(wyciwyg|firefoxurl\s*:\s*\/\s*\/)]]></rule>
<description>Detects IE firefoxurl injections, cache poisoning attempts and local file inclusion/execution</description>
<tags>
<tag>xss</tag>
<tag>rfe</tag>
<tag>lfi</tag>
<tag>csrf</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>29</id>
<rule><![CDATA[(?:binding\s?=|moz-binding|behavior\s?=)|(?:[\s\/]style\s*=\s*[-\\])]]></rule>
<description>Detects bindings and behavior injections</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
<tag>rfe</tag>
</tags>
<impact>4</impact>
</filter>
<filter>
<id>30</id>
<rule><![CDATA[(?:\+=\s*\(\s")|(?:!+\s*[\d.,]+\w?\d*\s*\?)|(?:=\s*\[s*\])|(?:"\s*\+\s*")|(?:[^\s]\[\s*\d+\s*\]\s*[;+])|(?:"\s*[&|]+\s*")|(?:\/\s*\?\s*")|(?:\/\s*\)\s*\[)|(?:\d\?.+:\d)|(?:]\s*\[\W*\w)|(?:[^\s]\s*=\s*\/)]]></rule>
<description>Detects common XSS concatenation patterns 1/2</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
<tag>id</tag>
<tag>rfe</tag>
</tags>
<impact>4</impact>
</filter>
<filter>
<id>31</id>
<rule><![CDATA[(?:=\s*\d*\.\d*\?\d*\.\d*)|(?:[|&]{2,}\s*")|(?:!\d+\.\d*\?")|(?:\/:[\w.]+,)|(?:=[\d\W\s]*\[[^]]+\])|(?:\?\w+:\w+)]]></rule>
<description>Detects common XSS concatenation patterns 2/2</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
<tag>id</tag>
<tag>rfe</tag>
</tags>
<impact>4</impact>
</filter>
<filter>
<id>32</id>
<rule><![CDATA[(?:[^\w\s=]on(?!g\&gt;)\w+[^=_+-]*=[^$]+(?:\W|\&gt;)?)]]></rule>
<description>Detects possible event handlers</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
</tags>
<impact>4</impact>
</filter>
<filter>
<id>33</id>
<rule><![CDATA[(?:\<\w*:?\s(?:[^\>]*)t(?!rong))|(?:\<scri)|(<\w+:\w+)]]></rule>
<description>Detects obfuscated script tags and XML wrapped HTML</description>
<tags>
<tag>xss</tag>
</tags>
<impact>4</impact>
</filter>
<filter>
<id>34</id>
<rule><![CDATA[(?:\<\/\w+\s\w+)|(?:@(?:cc_on|set)[\s@,"=])]]></rule>
<description>Detects attributes in closing tags and conditional compilation tokens</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
</tags>
<impact>4</impact>
</filter>
<filter>
<id>35</id>
<rule><![CDATA[(?:--[^\n]*$)|(?:\<!-|-->)|(?:\/\*|\*\/)|(?:(?:[\W\d]#|--|{)$)|(?:\/{3,}.*$)|(?:<!\[\W)|(?:\]!>)]]></rule>
<description>Detects common comment types</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
<tag>id</tag>
</tags>
<impact>3</impact>
</filter>
<filter>
<id>36</id>
<rule><![CDATA[(?:--.*[^-]>)|(?:opera\s*\.\s*\w+\s*\()]]></rule>
<description>Detects comments to exploit firefox' faulty rendering and proprietary opera attacks</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
<tag>id</tag>
</tags>
<impact>3</impact>
</filter>
<filter>
<id>37</id>
<rule><![CDATA[(?:\<base\s+)|(?:<!(?:element|entity|\[CDATA))]]></rule>
<description>Detects base href injections and XML entity injections</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
<tag>id</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>38</id>
<rule><![CDATA[(?:\<[\/]?(?:[i]?frame|applet|isindex|marquee|keygen|script|audio|video|input|button|textarea|style|base|body|meta|link|object|embed|param|plaintext|xm\w+|image|im(?:g|port)))]]></rule>
<description>Detects possibly malicious html elements including some attributes</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
<tag>id</tag>
<tag>rfe</tag>
<tag>lfi</tag>
</tags>
<impact>4</impact>
</filter>
<filter>
<id>39</id>
<rule><![CDATA[(?:\\x[01FE]\w)|(?:%[01FE]\w)|(?:&#[01FE]\w)|(?:\\[01FE][0-9a-f])|(?:&#x[01FE]\w)]]></rule>
<description>Detects nullbytes and HTTP response splitting</description>
<tags>
<tag>id</tag>
<tag>rfe</tag>
<tag>xss</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>40</id>
<rule><![CDATA[(?:"\s*(?:#|--|{))|(?:\/\*!\s?\d+)|(?:ch(?:a)?r\s*\(\s*\d)|(?:(?:(n?and|x?or|not)\s+|\|\||\&\&)\s*\w+\()]]></rule>
<description>Detects MySQL comments, conditions and ch(a)r injections</description>
<tags>
<tag>sqli</tag>
<tag>id</tag>
<tag>lfi</tag>
</tags>
<impact>6</impact>
</filter>
<filter>
<id>41</id>
<rule><![CDATA[(?:\)\s*like\s*\()|(?:having\s+[\d\w\-"]+\s*[(=<>~])|(?:if\s?\([\d\w]\s*[=<>~])]]></rule>
<description>Detects conditional SQL injection attempts</description>
<tags>
<tag>sqli</tag>
<tag>id</tag>
<tag>lfi</tag>
</tags>
<impact>4</impact>
</filter>
<filter>
<id>42</id>
<rule><![CDATA[(?:\\x(?:23|27|3d))|(?:^.?"$)|(?:^.*\\".+(?<!\\)")|(?:(?:^["\\]*(?:[\d"]+|[^"]+"))+\s*(?:n?and|x?or|not |\|\||\&\&)\s*[\d"[+&!@(),.-])|(?:[^\w\s]\w+\s*[|-]\s*"\s*\w)|(?:@\w+\s+(and|or)\s*["\d]+)|(?:@[\w-]+\s(and|or)\s*[^\w\s])|(?:[^\w\s:]\s*\d\W+[^\w\s]\s*".)]]></rule>
<description>Detects classic SQL injection probings 1/2</description>
<tags>
<tag>sqli</tag>
<tag>id</tag>
<tag>lfi</tag>
</tags>
<impact>6</impact>
</filter>
<filter>
<id>43</id>
<rule><![CDATA[(?:"\s*\*.+(?:or|id)\W*"\d)|(?:\^")|(?:^[\w\s"-]+(?<=and\s)(?<=or\s)(?<=xor\s)(?<=nand\s)(?<=not\s)(?<=\|\|)(?<=\&\&)\w+\()|(?:"[\s\d]*[^\w\s]+\W*\d\W*.*["\d])|(?:"\s*[^\w\s?]+\s*[^\w\s]+\s*")|(?:"\s*[^\w\s]+\s*[\W\d].*(?:#|--))|(?:".*\*\s*\d)|(?:"\s*or\s[\w-]+[\s=*])|(?:[()*<>%+-][\w-]+[^\w\s]+"[^,])]]></rule>
<description>Detects classic SQL injection probings 2/2</description>
<tags>
<tag>sqli</tag>
<tag>id</tag>
<tag>lfi</tag>
</tags>
<impact>6</impact>
</filter>
<filter>
<id>44</id>
<rule><![CDATA[(?:\d"\s+"\s+\d)|(?:^admin\s*"|(\/\*)+"+\s?(?:--|#|\/\*|{)?)|(?:"\s*or[\w\s-]+\s*[+<>=(),-]\s*[\d"])|(?:"\s*[^\w\s]?=\s*")|(?:"\W*[+=]+\W*")|(?:"\s*[!=|][\d\s!=+-]+.*["(].*$)|(?:"\s*[!=|][\d\s!=]+.*\d+$)|(?:"\s*like\W+[\w"(])|(?:\sis\s*0\W)|(?:where\s[\s\w\.,-]+\s=)|(?:"[<>~]+")]]></rule>
<description>Detects basic SQL authentication bypass attempts 1/3</description>
<tags>
<tag>sqli</tag>
<tag>id</tag>
<tag>lfi</tag>
</tags>
<impact>7</impact>
</filter>
<filter>
<id>45</id>
<rule><![CDATA[(?:union\s*(?:all|distinct|[(!@]*)?\s*[([]\s*select)|(?:\w+\s+like\s+\")|(?:like\s*"\%)|(?:"\s*like\W*["\d])|(?:"\s*(?:n?and|x?or|not |\|\||\&\&)\s+[\s\w]+=\s*\w+\s*having)|(?:"\s*\*\s*\w+\W+")|(?:"\s*[^?\w\s=.,;)(]+\s*[(@]*\s*\w+\W+\w)|(?:select\s*[\[\]()\s\w\.,-]+from)]]></rule>
<description>Detects basic SQL authentication bypass attempts 2/3</description>
<tags>
<tag>sqli</tag>
<tag>id</tag>
<tag>lfi</tag>
</tags>
<impact>7</impact>
</filter>
<filter>
<id>46</id>
<rule><![CDATA[(?:(?:n?and|x?or|not |\|\||\&\&)\s+[\s\w+]+(?:regexp\s*\(|sounds\s+like\s*"|[=\d]+x))|("\s*\d\s*(?:--|#))|(?:"[%&<>^=]+\d\s*(=|or))|(?:"\W+[\w+-]+\s*=\s*\d\W+")|(?:"\s*is\s*\d.+"?\w)|(?:"\|?[\w-]{3,}[^\w\s.,]+")|(?:"\s*is\s*[\d.]+\s*\W.*")]]></rule>
<description>Detects basic SQL authentication bypass attempts 3/3</description>
<tags>
<tag>sqli</tag>
<tag>id</tag>
<tag>lfi</tag>
</tags>
<impact>7</impact>
</filter>
<filter>
<id>47</id>
<rule><![CDATA[(?:^\s*[;>"]\s*(?:union|select|create|rename|truncate|load|alter|delete|update|insert|desc))|(?:(?:select|create|rename|truncate|load|alter|delete|update|insert|desc)\s+(?:concat|char|load_file)\s?\(?)|(?:end\s*\);)|("\s+regexp\W)]]></rule>
<description>Detects concatenated basic SQL injection and SQLLFI attempts</description>
<tags>
<tag>sqli</tag>
<tag>id</tag>
<tag>lfi</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>48</id>
<rule><![CDATA[(?:\/\w+;?\s+(?:having|and|or|select))|(?:\d\s+group\s+by.+\()|(?:(?:;|#|--)\s*(?:drop|alter))|(?:(?:;|#|--)\s*(?:update|insert)\s*\w{2,})|(?:[^\w]SET\s*@\w+)|(?:(?:n?and|x?or|not |\|\||\&\&)\s+\w+[!=+]+[\s\d]*["=(])]]></rule>
<description>Detects chained SQL injection attempts 1/2</description>
<tags>
<tag>sqli</tag>
<tag>id</tag>
</tags>
<impact>6</impact>
</filter>
<filter>
<id>49</id>
<rule><![CDATA[(?:\*\/from)|(?:\+\s*\d+\s*\+\s*@)|(?:\w"\s*(?:[-+=|@]+\s*)+[\d(])|(?:coalesce\s*\(|@@\w+\s*[^\w\s])|(?:\W!+"\w)|(?:";\s*(?:if|while|begin))|(?:"[\s\d]+=\s*\d)|(?:order\s+by\s+if\w*\s*\()]]></rule>
<description>Detects chained SQL injection attempts 2/2</description>
<tags>
<tag>sqli</tag>
<tag>id</tag>
</tags>
<impact>6</impact>
</filter>
<filter>
<id>50</id>
<rule><![CDATA[(?:(select|;)\s+(?:benchmark|if|sleep)\s?\(\s?\(?\s?\w+)]]></rule>
<description>Detects SQL benchmark and sleep injection attempts including conditional queries</description>
<tags>
<tag>sqli</tag>
<tag>id</tag>
</tags>
<impact>4</impact>
</filter>
<filter>
<id>51</id>
<rule><![CDATA[(?:create\s+function\s+\w+\s+returns)|(?:;\s*(?:select|create|rename|truncate|load|alter|delete|update|insert|desc)\s*[\[(]?\w{2,})]]></rule>
<description>Detects MySQL UDF injection and other data/structure manipulation attempts</description>
<tags>
<tag>sqli</tag>
<tag>id</tag>
</tags>
<impact>6</impact>
</filter>
<filter>
<id>52</id>
<rule><![CDATA[(?:alter\s*\w+.*character\s+set\s+\w+)|(";\s*waitfor\s+time\s+")|(?:";.*:\s*goto)]]></rule>
<description>Detects MySQL charset switch and MSSQL DoS attempts</description>
<tags>
<tag>sqli</tag>
<tag>id</tag>
</tags>
<impact>6</impact>
</filter>
<filter>
<id>53</id>
<rule><![CDATA[(?:procedure\s+analyse\s*\()|(?:;\s*(declare|open)\s+[\w-]+)|(?:create\s+(procedure|function)\s*\w+\s*\(\s*\)\s*-)|(?:declare[^\w]+[@#]\s*\w+)|(exec\s*\(\s*@)]]></rule>
<description>Detects MySQL and PostgreSQL stored procedure/function injections</description>
<tags>
<tag>sqli</tag>
<tag>id</tag>
</tags>
<impact>7</impact>
</filter>
<filter>
<id>54</id>
<rule><![CDATA[(?:select\s*pg_sleep)|(?:waitfor\s*delay\s?"+\s?\d)|(?:;\s*shutdown\s*(?:;|--|#|\/\*|{))]]></rule>
<description>Detects Postgres pg_sleep injection, waitfor delay attacks and database shutdown attempts</description>
<tags>
<tag>sqli</tag>
<tag>id</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>55</id>
<rule><![CDATA[(?:";?\s*(?:select|union|having)\s*["(\d])|(?:\wiif\s*\()|(?:exec\s+master\.)|(?:union select @)|(?:union[\w(\s]*select)|(?:select.*\w?user\()|(?:into[\s+]+(?:dump|out)file\s*")]]></rule>
<description>Detects MSSQL code execution and information gathering attempts</description>
<tags>
<tag>sqli</tag>
<tag>id</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>56</id>
<rule><![CDATA[(?:merge.*using\s*\()|(execute\s*immediate\s*")|(?:\W+\d*\s+having\s+\d)|(?:match\s*[\w(),+-]+\s*against\s*\()]]></rule>
<description>Detects MATCH AGAINST, MERGE, EXECUTE IMMEDIATE and HAVING injections</description>
<tags>
<tag>sqli</tag>
<tag>id</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>57</id>
<rule><![CDATA[(?:select\s*\*\s*from)|((?:select|create|rename|truncate|load|alter|delete|update|insert|desc)\s*\(\s*space\s*\()]]></rule>
<description>Detects MySQL comment-/space-obfuscated injections</description>
<tags>
<tag>sqli</tag>
<tag>id</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>58</id>
<rule><![CDATA[(?:@[\w-]+\s*\()|(?:]\s*\(\s*["!]\s*\w)|(?:<[?%](?:php)?.*(?:[?%]>)?)|(?:;[\s\w|]*\$\w+\s*=)|(?:\$\w+\s*=(?:(?:\s*\$?\w+\s*[(;])|\s*".*"))|(?:;\s*\{\W*\w+\s*\()]]></rule>
<description>Detects code injection attempts 1/3</description>
<tags>
<tag>id</tag>
<tag>rfe</tag>
<tag>lfi</tag>
</tags>
<impact>7</impact>
</filter>
<filter>
<id>59</id>
<rule><![CDATA[(?:(?:[;]+|(<[?%](?:php)?)).*(?:define|eval|file_get_contents|include|require|require_once|set|shell_exec|phpinfo|system|passthru|preg_\w+|execute)\s*["(@])]]></rule>
<description>Detects code injection attempts 2/3</description>
<tags>
<tag>id</tag>
<tag>rfe</tag>
<tag>lfi</tag>
</tags>
<impact>7</impact>
</filter>
<filter>
<id>60</id>
<rule><![CDATA[(?:(?:[;]+|(<[?%](?:php)?)).*[^\w](?:echo|print|print_r|var_dump|[fp]open))|(?:;\s*rm\s+-\w+\s+)|(?:;.*{.*\$\w+\s*=)|(?:\$\w+\s*\[\]\s*=\s*)]]></rule>
<description>Detects code injection attempts 3/3</description>
<tags>
<tag>id</tag>
<tag>rfe</tag>
<tag>lfi</tag>
</tags>
<impact>7</impact>
</filter>
<filter>
<id>61</id>
<rule><![CDATA[(?:\w+]?(?<!href)(?<!src)(?<!longdesc)(?<!returnurl)=(?:https?|ftp):)|(?:\{\s*\$\s*\{)]]></rule>
<description>Detects url injections and RFE attempts</description>
<tags>
<tag>id</tag>
<tag>rfe</tag>
<tag>lfi</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>62</id>
<rule><![CDATA[(?:function[^(]*\([^)]*\))|(?:(?:delete|void|throw|instanceof|new|typeof)\W+\w+\s*[([])|([)\]]\s*\.\s*\w+\s*=)|(?:\(\s*new\s+\w+\s*\)\.)]]></rule>
<description>Detects common function declarations and special JS operators</description>
<tags>
<tag>id</tag>
<tag>rfe</tag>
<tag>lfi</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>63</id>
<rule><![CDATA[(?:[\w.-]+@[\w.-]+%(?:[01]\w)+\w+:)]]></rule>
<description>Detects common mail header injections</description>
<tags>
<tag>id</tag>
<tag>spam</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>64</id>
<rule><![CDATA[(?:\.pl\?\w+=\w?\|\w+;)|(?:\|\(\w+=\*)|(?:\*\s*\)+\s*;)]]></rule>
<description>Detects perl echo shellcode injection and LDAP vectors</description>
<tags>
<tag>lfi</tag>
<tag>rfe</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>65</id>
<rule><![CDATA[(?:(?:do|for|while)\s*\([^;]+;+\))|(?:(?:^|\W)on\w+\s*=[\w\W]*(?:on\w+|alert|eval|print|confirm|prompt))|(?:groups=\d+\(\w+\))|(?:(.)\1{128,})]]></rule>
<description>Detects basic XSS DoS attempts</description>
<tags>
<tag>rfe</tag>
<tag>dos</tag>
</tags>
<impact>5</impact>
</filter>
<filter>
<id>67</id>
<rule><![CDATA[(?:\({2,}\+{2,}:{2,})|(?:\({2,}\+{2,}:+)|(?:\({3,}\++:{2,})|(?:\$\[!!!\])]]></rule>
<description>Detects unknown attack vectors based on PHPIDS Centrifuge detection</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
<tag>id</tag>
<tag>rfe</tag>
<tag>lfi</tag>
</tags>
<impact>7</impact>
</filter>
<filter>
<id>68</id>
<rule><![CDATA[(?:[\s\/"]+[-\w\/\\\*]+\s*=.+(?:\/\s*>))]]></rule>
<description>finds attribute breaking injections including obfuscated attributes</description>
<tags>
<tag>xss</tag>
<tag>csrf</tag>
</tags>
<impact>4</impact>
</filter>
</filters>

View file

@ -0,0 +1 @@
"local/unknown",2010-03-15T23:07:01+00:00,72,"xss csrf id rfe lfi sqli","REQUEST.test=%22%3E%3Cscript%3Eeval%28window.name%29%3C%2Fscript%3E GET.test=%22%3E%3Cscript%3Eeval%28window.name%29%3C%2Fscript%3E","%2Fdvwa%2Fsecurity.php%3Ftest%3D%2522%253E%253Cscript%253Eeval%28window.name%29%253C%2Fscript%253E","127.0.0.1"

View file

@ -0,0 +1,9 @@
<?php
/**
* This is a stub include that automatically configures the include path.
*/
set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path() );
require_once 'HTMLPurifier/Bootstrap.php';
require_once 'HTMLPurifier.autoload.php';

View file

@ -0,0 +1,19 @@
<?php
/**
* @file
* Convenience file that registers autoload handler for HTML Purifier.
*/
if (function_exists('spl_autoload_register') && function_exists('spl_autoload_unregister')) {
// We need unregister for our pre-registering functionality
HTMLPurifier_Bootstrap::registerAutoload();
if (function_exists('__autoload')) {
// Be polite and ensure that userland autoload gets retained
spl_autoload_register('__autoload');
}
} elseif (!function_exists('__autoload')) {
function __autoload($class) {
return HTMLPurifier_Bootstrap::autoload($class);
}
}

View file

@ -0,0 +1,22 @@
<?php
/**
* @file
* Defines a function wrapper for HTML Purifier for quick use.
* @note ''HTMLPurifier()'' is NOT the same as ''new HTMLPurifier()''
*/
/**
* Purify HTML.
* @param $html String HTML to purify
* @param $config Configuration to use, can be any value accepted by
* HTMLPurifier_Config::create()
*/
function HTMLPurifier($html, $config = null) {
static $purifier = false;
if (!$purifier) {
$purifier = new HTMLPurifier();
}
return $purifier->purify($html, $config);
}

View file

@ -0,0 +1,204 @@
<?php
/**
* @file
* This file was auto-generated by generate-includes.php and includes all of
* the core files required by HTML Purifier. Use this if performance is a
* primary concern and you are using an opcode cache. PLEASE DO NOT EDIT THIS
* FILE, changes will be overwritten the next time the script is run.
*
* @version 3.2.0
*
* @warning
* You must *not* include any other HTML Purifier files before this file,
* because 'require' not 'require_once' is used.
*
* @warning
* This file requires that the include path contains the HTML Purifier
* library directory; this is not auto-set.
*/
require 'HTMLPurifier.php';
require 'HTMLPurifier/AttrCollections.php';
require 'HTMLPurifier/AttrDef.php';
require 'HTMLPurifier/AttrTransform.php';
require 'HTMLPurifier/AttrTypes.php';
require 'HTMLPurifier/AttrValidator.php';
require 'HTMLPurifier/Bootstrap.php';
require 'HTMLPurifier/Definition.php';
require 'HTMLPurifier/CSSDefinition.php';
require 'HTMLPurifier/ChildDef.php';
require 'HTMLPurifier/Config.php';
require 'HTMLPurifier/ConfigSchema.php';
require 'HTMLPurifier/ContentSets.php';
require 'HTMLPurifier/Context.php';
require 'HTMLPurifier/DefinitionCache.php';
require 'HTMLPurifier/DefinitionCacheFactory.php';
require 'HTMLPurifier/Doctype.php';
require 'HTMLPurifier/DoctypeRegistry.php';
require 'HTMLPurifier/ElementDef.php';
require 'HTMLPurifier/Encoder.php';
require 'HTMLPurifier/EntityLookup.php';
require 'HTMLPurifier/EntityParser.php';
require 'HTMLPurifier/ErrorCollector.php';
require 'HTMLPurifier/ErrorStruct.php';
require 'HTMLPurifier/Exception.php';
require 'HTMLPurifier/Filter.php';
require 'HTMLPurifier/Generator.php';
require 'HTMLPurifier/HTMLDefinition.php';
require 'HTMLPurifier/HTMLModule.php';
require 'HTMLPurifier/HTMLModuleManager.php';
require 'HTMLPurifier/IDAccumulator.php';
require 'HTMLPurifier/Injector.php';
require 'HTMLPurifier/Language.php';
require 'HTMLPurifier/LanguageFactory.php';
require 'HTMLPurifier/Length.php';
require 'HTMLPurifier/Lexer.php';
require 'HTMLPurifier/PercentEncoder.php';
require 'HTMLPurifier/Strategy.php';
require 'HTMLPurifier/StringHash.php';
require 'HTMLPurifier/StringHashParser.php';
require 'HTMLPurifier/TagTransform.php';
require 'HTMLPurifier/Token.php';
require 'HTMLPurifier/TokenFactory.php';
require 'HTMLPurifier/URI.php';
require 'HTMLPurifier/URIDefinition.php';
require 'HTMLPurifier/URIFilter.php';
require 'HTMLPurifier/URIParser.php';
require 'HTMLPurifier/URIScheme.php';
require 'HTMLPurifier/URISchemeRegistry.php';
require 'HTMLPurifier/UnitConverter.php';
require 'HTMLPurifier/VarParser.php';
require 'HTMLPurifier/VarParserException.php';
require 'HTMLPurifier/AttrDef/CSS.php';
require 'HTMLPurifier/AttrDef/Enum.php';
require 'HTMLPurifier/AttrDef/Integer.php';
require 'HTMLPurifier/AttrDef/Lang.php';
require 'HTMLPurifier/AttrDef/Switch.php';
require 'HTMLPurifier/AttrDef/Text.php';
require 'HTMLPurifier/AttrDef/URI.php';
require 'HTMLPurifier/AttrDef/CSS/Number.php';
require 'HTMLPurifier/AttrDef/CSS/AlphaValue.php';
require 'HTMLPurifier/AttrDef/CSS/Background.php';
require 'HTMLPurifier/AttrDef/CSS/BackgroundPosition.php';
require 'HTMLPurifier/AttrDef/CSS/Border.php';
require 'HTMLPurifier/AttrDef/CSS/Color.php';
require 'HTMLPurifier/AttrDef/CSS/Composite.php';
require 'HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php';
require 'HTMLPurifier/AttrDef/CSS/Filter.php';
require 'HTMLPurifier/AttrDef/CSS/Font.php';
require 'HTMLPurifier/AttrDef/CSS/FontFamily.php';
require 'HTMLPurifier/AttrDef/CSS/ImportantDecorator.php';
require 'HTMLPurifier/AttrDef/CSS/Length.php';
require 'HTMLPurifier/AttrDef/CSS/ListStyle.php';
require 'HTMLPurifier/AttrDef/CSS/Multiple.php';
require 'HTMLPurifier/AttrDef/CSS/Percentage.php';
require 'HTMLPurifier/AttrDef/CSS/TextDecoration.php';
require 'HTMLPurifier/AttrDef/CSS/URI.php';
require 'HTMLPurifier/AttrDef/HTML/Bool.php';
require 'HTMLPurifier/AttrDef/HTML/Color.php';
require 'HTMLPurifier/AttrDef/HTML/FrameTarget.php';
require 'HTMLPurifier/AttrDef/HTML/ID.php';
require 'HTMLPurifier/AttrDef/HTML/Pixels.php';
require 'HTMLPurifier/AttrDef/HTML/Length.php';
require 'HTMLPurifier/AttrDef/HTML/LinkTypes.php';
require 'HTMLPurifier/AttrDef/HTML/MultiLength.php';
require 'HTMLPurifier/AttrDef/HTML/Nmtokens.php';
require 'HTMLPurifier/AttrDef/URI/Email.php';
require 'HTMLPurifier/AttrDef/URI/Host.php';
require 'HTMLPurifier/AttrDef/URI/IPv4.php';
require 'HTMLPurifier/AttrDef/URI/IPv6.php';
require 'HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php';
require 'HTMLPurifier/AttrTransform/Background.php';
require 'HTMLPurifier/AttrTransform/BdoDir.php';
require 'HTMLPurifier/AttrTransform/BgColor.php';
require 'HTMLPurifier/AttrTransform/BoolToCSS.php';
require 'HTMLPurifier/AttrTransform/Border.php';
require 'HTMLPurifier/AttrTransform/EnumToCSS.php';
require 'HTMLPurifier/AttrTransform/ImgRequired.php';
require 'HTMLPurifier/AttrTransform/ImgSpace.php';
require 'HTMLPurifier/AttrTransform/Input.php';
require 'HTMLPurifier/AttrTransform/Lang.php';
require 'HTMLPurifier/AttrTransform/Length.php';
require 'HTMLPurifier/AttrTransform/Name.php';
require 'HTMLPurifier/AttrTransform/SafeEmbed.php';
require 'HTMLPurifier/AttrTransform/SafeObject.php';
require 'HTMLPurifier/AttrTransform/SafeParam.php';
require 'HTMLPurifier/AttrTransform/ScriptRequired.php';
require 'HTMLPurifier/AttrTransform/Textarea.php';
require 'HTMLPurifier/ChildDef/Chameleon.php';
require 'HTMLPurifier/ChildDef/Custom.php';
require 'HTMLPurifier/ChildDef/Empty.php';
require 'HTMLPurifier/ChildDef/Required.php';
require 'HTMLPurifier/ChildDef/Optional.php';
require 'HTMLPurifier/ChildDef/StrictBlockquote.php';
require 'HTMLPurifier/ChildDef/Table.php';
require 'HTMLPurifier/DefinitionCache/Decorator.php';
require 'HTMLPurifier/DefinitionCache/Null.php';
require 'HTMLPurifier/DefinitionCache/Serializer.php';
require 'HTMLPurifier/DefinitionCache/Decorator/Cleanup.php';
require 'HTMLPurifier/DefinitionCache/Decorator/Memory.php';
require 'HTMLPurifier/HTMLModule/Bdo.php';
require 'HTMLPurifier/HTMLModule/CommonAttributes.php';
require 'HTMLPurifier/HTMLModule/Edit.php';
require 'HTMLPurifier/HTMLModule/Forms.php';
require 'HTMLPurifier/HTMLModule/Hypertext.php';
require 'HTMLPurifier/HTMLModule/Image.php';
require 'HTMLPurifier/HTMLModule/Legacy.php';
require 'HTMLPurifier/HTMLModule/List.php';
require 'HTMLPurifier/HTMLModule/Name.php';
require 'HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php';
require 'HTMLPurifier/HTMLModule/Object.php';
require 'HTMLPurifier/HTMLModule/Presentation.php';
require 'HTMLPurifier/HTMLModule/Proprietary.php';
require 'HTMLPurifier/HTMLModule/Ruby.php';
require 'HTMLPurifier/HTMLModule/SafeEmbed.php';
require 'HTMLPurifier/HTMLModule/SafeObject.php';
require 'HTMLPurifier/HTMLModule/Scripting.php';
require 'HTMLPurifier/HTMLModule/StyleAttribute.php';
require 'HTMLPurifier/HTMLModule/Tables.php';
require 'HTMLPurifier/HTMLModule/Target.php';
require 'HTMLPurifier/HTMLModule/Text.php';
require 'HTMLPurifier/HTMLModule/Tidy.php';
require 'HTMLPurifier/HTMLModule/XMLCommonAttributes.php';
require 'HTMLPurifier/HTMLModule/Tidy/Name.php';
require 'HTMLPurifier/HTMLModule/Tidy/Proprietary.php';
require 'HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php';
require 'HTMLPurifier/HTMLModule/Tidy/Strict.php';
require 'HTMLPurifier/HTMLModule/Tidy/Transitional.php';
require 'HTMLPurifier/HTMLModule/Tidy/XHTML.php';
require 'HTMLPurifier/Injector/AutoParagraph.php';
require 'HTMLPurifier/Injector/DisplayLinkURI.php';
require 'HTMLPurifier/Injector/Linkify.php';
require 'HTMLPurifier/Injector/PurifierLinkify.php';
require 'HTMLPurifier/Injector/RemoveEmpty.php';
require 'HTMLPurifier/Injector/SafeObject.php';
require 'HTMLPurifier/Lexer/DOMLex.php';
require 'HTMLPurifier/Lexer/DirectLex.php';
require 'HTMLPurifier/Strategy/Composite.php';
require 'HTMLPurifier/Strategy/Core.php';
require 'HTMLPurifier/Strategy/FixNesting.php';
require 'HTMLPurifier/Strategy/MakeWellFormed.php';
require 'HTMLPurifier/Strategy/RemoveForeignElements.php';
require 'HTMLPurifier/Strategy/ValidateAttributes.php';
require 'HTMLPurifier/TagTransform/Font.php';
require 'HTMLPurifier/TagTransform/Simple.php';
require 'HTMLPurifier/Token/Comment.php';
require 'HTMLPurifier/Token/Tag.php';
require 'HTMLPurifier/Token/Empty.php';
require 'HTMLPurifier/Token/End.php';
require 'HTMLPurifier/Token/Start.php';
require 'HTMLPurifier/Token/Text.php';
require 'HTMLPurifier/URIFilter/DisableExternal.php';
require 'HTMLPurifier/URIFilter/DisableExternalResources.php';
require 'HTMLPurifier/URIFilter/HostBlacklist.php';
require 'HTMLPurifier/URIFilter/MakeAbsolute.php';
require 'HTMLPurifier/URIFilter/Munge.php';
require 'HTMLPurifier/URIScheme/ftp.php';
require 'HTMLPurifier/URIScheme/http.php';
require 'HTMLPurifier/URIScheme/https.php';
require 'HTMLPurifier/URIScheme/mailto.php';
require 'HTMLPurifier/URIScheme/news.php';
require 'HTMLPurifier/URIScheme/nntp.php';
require 'HTMLPurifier/VarParser/Flexible.php';
require 'HTMLPurifier/VarParser/Native.php';

View file

@ -0,0 +1,28 @@
<?php
/**
* @file
* Emulation layer for code that used kses(), substituting in HTML Purifier.
*/
require_once dirname(__FILE__) . '/HTMLPurifier.auto.php';
function kses($string, $allowed_html, $allowed_protocols = null) {
$config = HTMLPurifier_Config::createDefault();
$allowed_elements = array();
$allowed_attributes = array();
foreach ($allowed_html as $element => $attributes) {
$allowed_elements[$element] = true;
foreach ($attributes as $attribute => $x) {
$allowed_attributes["$element.$attribute"] = true;
}
}
$config->set('HTML', 'AllowedElements', $allowed_elements);
$config->set('HTML', 'AllowedAttributes', $allowed_attributes);
$allowed_schemes = array();
if ($allowed_protocols !== null) {
$config->set('URI', 'AllowedSchemes', $allowed_protocols);
}
$purifier = new HTMLPurifier($config);
return $purifier->purify($string);
}

View file

@ -0,0 +1,9 @@
<?php
/**
* @file
* Convenience stub file that adds HTML Purifier's library file to the path
* without any other side-effects.
*/
set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path() );

View file

@ -0,0 +1,234 @@
<?php
/*! @mainpage
*
* HTML Purifier is an HTML filter that will take an arbitrary snippet of
* HTML and rigorously test, validate and filter it into a version that
* is safe for output onto webpages. It achieves this by:
*
* -# Lexing (parsing into tokens) the document,
* -# Executing various strategies on the tokens:
* -# Removing all elements not in the whitelist,
* -# Making the tokens well-formed,
* -# Fixing the nesting of the nodes, and
* -# Validating attributes of the nodes; and
* -# Generating HTML from the purified tokens.
*
* However, most users will only need to interface with the HTMLPurifier
* and HTMLPurifier_Config.
*/
/*
HTML Purifier 3.2.0 - Standards Compliant HTML Filtering
Copyright (C) 2006-2008 Edward Z. Yang
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* Facade that coordinates HTML Purifier's subsystems in order to purify HTML.
*
* @note There are several points in which configuration can be specified
* for HTML Purifier. The precedence of these (from lowest to
* highest) is as follows:
* -# Instance: new HTMLPurifier($config)
* -# Invocation: purify($html, $config)
* These configurations are entirely independent of each other and
* are *not* merged (this behavior may change in the future).
*
* @todo We need an easier way to inject strategies using the configuration
* object.
*/
class HTMLPurifier
{
/** Version of HTML Purifier */
public $version = '3.2.0';
/** Constant with version of HTML Purifier */
const VERSION = '3.2.0';
/** Global configuration object */
public $config;
/** Array of extra HTMLPurifier_Filter objects to run on HTML, for backwards compatibility */
private $filters = array();
/** Single instance of HTML Purifier */
private static $instance;
protected $strategy, $generator;
/**
* Resultant HTMLPurifier_Context of last run purification. Is an array
* of contexts if the last called method was purifyArray().
*/
public $context;
/**
* Initializes the purifier.
* @param $config Optional HTMLPurifier_Config object for all instances of
* the purifier, if omitted, a default configuration is
* supplied (which can be overridden on a per-use basis).
* The parameter can also be any type that
* HTMLPurifier_Config::create() supports.
*/
public function __construct($config = null) {
$this->config = HTMLPurifier_Config::create($config);
$this->strategy = new HTMLPurifier_Strategy_Core();
}
/**
* Adds a filter to process the output. First come first serve
* @param $filter HTMLPurifier_Filter object
*/
public function addFilter($filter) {
trigger_error('HTMLPurifier->addFilter() is deprecated, use configuration directives in the Filter namespace or Filter.Custom', E_USER_WARNING);
$this->filters[] = $filter;
}
/**
* Filters an HTML snippet/document to be XSS-free and standards-compliant.
*
* @param $html String of HTML to purify
* @param $config HTMLPurifier_Config object for this operation, if omitted,
* defaults to the config object specified during this
* object's construction. The parameter can also be any type
* that HTMLPurifier_Config::create() supports.
* @return Purified HTML
*/
public function purify($html, $config = null) {
// :TODO: make the config merge in, instead of replace
$config = $config ? HTMLPurifier_Config::create($config) : $this->config;
// implementation is partially environment dependant, partially
// configuration dependant
$lexer = HTMLPurifier_Lexer::create($config);
$context = new HTMLPurifier_Context();
// setup HTML generator
$this->generator = new HTMLPurifier_Generator($config, $context);
$context->register('Generator', $this->generator);
// set up global context variables
if ($config->get('Core', 'CollectErrors')) {
// may get moved out if other facilities use it
$language_factory = HTMLPurifier_LanguageFactory::instance();
$language = $language_factory->create($config, $context);
$context->register('Locale', $language);
$error_collector = new HTMLPurifier_ErrorCollector($context);
$context->register('ErrorCollector', $error_collector);
}
// setup id_accumulator context, necessary due to the fact that
// AttrValidator can be called from many places
$id_accumulator = HTMLPurifier_IDAccumulator::build($config, $context);
$context->register('IDAccumulator', $id_accumulator);
$html = HTMLPurifier_Encoder::convertToUTF8($html, $config, $context);
// setup filters
$filter_flags = $config->getBatch('Filter');
$custom_filters = $filter_flags['Custom'];
unset($filter_flags['Custom']);
$filters = array();
foreach ($filter_flags as $filter => $flag) {
if (!$flag) continue;
$class = "HTMLPurifier_Filter_$filter";
$filters[] = new $class;
}
foreach ($custom_filters as $filter) {
// maybe "HTMLPurifier_Filter_$filter", but be consistent with AutoFormat
$filters[] = $filter;
}
$filters = array_merge($filters, $this->filters);
// maybe prepare(), but later
for ($i = 0, $filter_size = count($filters); $i < $filter_size; $i++) {
$html = $filters[$i]->preFilter($html, $config, $context);
}
// purified HTML
$html =
$this->generator->generateFromTokens(
// list of tokens
$this->strategy->execute(
// list of un-purified tokens
$lexer->tokenizeHTML(
// un-purified HTML
$html, $config, $context
),
$config, $context
)
);
for ($i = $filter_size - 1; $i >= 0; $i--) {
$html = $filters[$i]->postFilter($html, $config, $context);
}
$html = HTMLPurifier_Encoder::convertFromUTF8($html, $config, $context);
$this->context =& $context;
return $html;
}
/**
* Filters an array of HTML snippets
* @param $config Optional HTMLPurifier_Config object for this operation.
* See HTMLPurifier::purify() for more details.
* @return Array of purified HTML
*/
public function purifyArray($array_of_html, $config = null) {
$context_array = array();
foreach ($array_of_html as $key => $html) {
$array_of_html[$key] = $this->purify($html, $config);
$context_array[$key] = $this->context;
}
$this->context = $context_array;
return $array_of_html;
}
/**
* Singleton for enforcing just one HTML Purifier in your system
* @param $prototype Optional prototype HTMLPurifier instance to
* overload singleton with, or HTMLPurifier_Config
* instance to configure the generated version with.
*/
public static function instance($prototype = null) {
if (!self::$instance || $prototype) {
if ($prototype instanceof HTMLPurifier) {
self::$instance = $prototype;
} elseif ($prototype) {
self::$instance = new HTMLPurifier($prototype);
} else {
self::$instance = new HTMLPurifier();
}
}
return self::$instance;
}
/**
* @note Backwards compatibility, see instance()
*/
public static function getInstance($prototype = null) {
return HTMLPurifier::instance($prototype);
}
}

View file

@ -0,0 +1,198 @@
<?php
/**
* @file
* This file was auto-generated by generate-includes.php and includes all of
* the core files required by HTML Purifier. This is a convenience stub that
* includes all files using dirname(__FILE__) and require_once. PLEASE DO NOT
* EDIT THIS FILE, changes will be overwritten the next time the script is run.
*
* Changes to include_path are not necessary.
*/
$__dir = dirname(__FILE__);
require_once $__dir . '/HTMLPurifier.php';
require_once $__dir . '/HTMLPurifier/AttrCollections.php';
require_once $__dir . '/HTMLPurifier/AttrDef.php';
require_once $__dir . '/HTMLPurifier/AttrTransform.php';
require_once $__dir . '/HTMLPurifier/AttrTypes.php';
require_once $__dir . '/HTMLPurifier/AttrValidator.php';
require_once $__dir . '/HTMLPurifier/Bootstrap.php';
require_once $__dir . '/HTMLPurifier/Definition.php';
require_once $__dir . '/HTMLPurifier/CSSDefinition.php';
require_once $__dir . '/HTMLPurifier/ChildDef.php';
require_once $__dir . '/HTMLPurifier/Config.php';
require_once $__dir . '/HTMLPurifier/ConfigSchema.php';
require_once $__dir . '/HTMLPurifier/ContentSets.php';
require_once $__dir . '/HTMLPurifier/Context.php';
require_once $__dir . '/HTMLPurifier/DefinitionCache.php';
require_once $__dir . '/HTMLPurifier/DefinitionCacheFactory.php';
require_once $__dir . '/HTMLPurifier/Doctype.php';
require_once $__dir . '/HTMLPurifier/DoctypeRegistry.php';
require_once $__dir . '/HTMLPurifier/ElementDef.php';
require_once $__dir . '/HTMLPurifier/Encoder.php';
require_once $__dir . '/HTMLPurifier/EntityLookup.php';
require_once $__dir . '/HTMLPurifier/EntityParser.php';
require_once $__dir . '/HTMLPurifier/ErrorCollector.php';
require_once $__dir . '/HTMLPurifier/ErrorStruct.php';
require_once $__dir . '/HTMLPurifier/Exception.php';
require_once $__dir . '/HTMLPurifier/Filter.php';
require_once $__dir . '/HTMLPurifier/Generator.php';
require_once $__dir . '/HTMLPurifier/HTMLDefinition.php';
require_once $__dir . '/HTMLPurifier/HTMLModule.php';
require_once $__dir . '/HTMLPurifier/HTMLModuleManager.php';
require_once $__dir . '/HTMLPurifier/IDAccumulator.php';
require_once $__dir . '/HTMLPurifier/Injector.php';
require_once $__dir . '/HTMLPurifier/Language.php';
require_once $__dir . '/HTMLPurifier/LanguageFactory.php';
require_once $__dir . '/HTMLPurifier/Length.php';
require_once $__dir . '/HTMLPurifier/Lexer.php';
require_once $__dir . '/HTMLPurifier/PercentEncoder.php';
require_once $__dir . '/HTMLPurifier/Strategy.php';
require_once $__dir . '/HTMLPurifier/StringHash.php';
require_once $__dir . '/HTMLPurifier/StringHashParser.php';
require_once $__dir . '/HTMLPurifier/TagTransform.php';
require_once $__dir . '/HTMLPurifier/Token.php';
require_once $__dir . '/HTMLPurifier/TokenFactory.php';
require_once $__dir . '/HTMLPurifier/URI.php';
require_once $__dir . '/HTMLPurifier/URIDefinition.php';
require_once $__dir . '/HTMLPurifier/URIFilter.php';
require_once $__dir . '/HTMLPurifier/URIParser.php';
require_once $__dir . '/HTMLPurifier/URIScheme.php';
require_once $__dir . '/HTMLPurifier/URISchemeRegistry.php';
require_once $__dir . '/HTMLPurifier/UnitConverter.php';
require_once $__dir . '/HTMLPurifier/VarParser.php';
require_once $__dir . '/HTMLPurifier/VarParserException.php';
require_once $__dir . '/HTMLPurifier/AttrDef/CSS.php';
require_once $__dir . '/HTMLPurifier/AttrDef/Enum.php';
require_once $__dir . '/HTMLPurifier/AttrDef/Integer.php';
require_once $__dir . '/HTMLPurifier/AttrDef/Lang.php';
require_once $__dir . '/HTMLPurifier/AttrDef/Switch.php';
require_once $__dir . '/HTMLPurifier/AttrDef/Text.php';
require_once $__dir . '/HTMLPurifier/AttrDef/URI.php';
require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Number.php';
require_once $__dir . '/HTMLPurifier/AttrDef/CSS/AlphaValue.php';
require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Background.php';
require_once $__dir . '/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php';
require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Border.php';
require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Color.php';
require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Composite.php';
require_once $__dir . '/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php';
require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Filter.php';
require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Font.php';
require_once $__dir . '/HTMLPurifier/AttrDef/CSS/FontFamily.php';
require_once $__dir . '/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php';
require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Length.php';
require_once $__dir . '/HTMLPurifier/AttrDef/CSS/ListStyle.php';
require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Multiple.php';
require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Percentage.php';
require_once $__dir . '/HTMLPurifier/AttrDef/CSS/TextDecoration.php';
require_once $__dir . '/HTMLPurifier/AttrDef/CSS/URI.php';
require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Bool.php';
require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Color.php';
require_once $__dir . '/HTMLPurifier/AttrDef/HTML/FrameTarget.php';
require_once $__dir . '/HTMLPurifier/AttrDef/HTML/ID.php';
require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Pixels.php';
require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Length.php';
require_once $__dir . '/HTMLPurifier/AttrDef/HTML/LinkTypes.php';
require_once $__dir . '/HTMLPurifier/AttrDef/HTML/MultiLength.php';
require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Nmtokens.php';
require_once $__dir . '/HTMLPurifier/AttrDef/URI/Email.php';
require_once $__dir . '/HTMLPurifier/AttrDef/URI/Host.php';
require_once $__dir . '/HTMLPurifier/AttrDef/URI/IPv4.php';
require_once $__dir . '/HTMLPurifier/AttrDef/URI/IPv6.php';
require_once $__dir . '/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php';
require_once $__dir . '/HTMLPurifier/AttrTransform/Background.php';
require_once $__dir . '/HTMLPurifier/AttrTransform/BdoDir.php';
require_once $__dir . '/HTMLPurifier/AttrTransform/BgColor.php';
require_once $__dir . '/HTMLPurifier/AttrTransform/BoolToCSS.php';
require_once $__dir . '/HTMLPurifier/AttrTransform/Border.php';
require_once $__dir . '/HTMLPurifier/AttrTransform/EnumToCSS.php';
require_once $__dir . '/HTMLPurifier/AttrTransform/ImgRequired.php';
require_once $__dir . '/HTMLPurifier/AttrTransform/ImgSpace.php';
require_once $__dir . '/HTMLPurifier/AttrTransform/Input.php';
require_once $__dir . '/HTMLPurifier/AttrTransform/Lang.php';
require_once $__dir . '/HTMLPurifier/AttrTransform/Length.php';
require_once $__dir . '/HTMLPurifier/AttrTransform/Name.php';
require_once $__dir . '/HTMLPurifier/AttrTransform/SafeEmbed.php';
require_once $__dir . '/HTMLPurifier/AttrTransform/SafeObject.php';
require_once $__dir . '/HTMLPurifier/AttrTransform/SafeParam.php';
require_once $__dir . '/HTMLPurifier/AttrTransform/ScriptRequired.php';
require_once $__dir . '/HTMLPurifier/AttrTransform/Textarea.php';
require_once $__dir . '/HTMLPurifier/ChildDef/Chameleon.php';
require_once $__dir . '/HTMLPurifier/ChildDef/Custom.php';
require_once $__dir . '/HTMLPurifier/ChildDef/Empty.php';
require_once $__dir . '/HTMLPurifier/ChildDef/Required.php';
require_once $__dir . '/HTMLPurifier/ChildDef/Optional.php';
require_once $__dir . '/HTMLPurifier/ChildDef/StrictBlockquote.php';
require_once $__dir . '/HTMLPurifier/ChildDef/Table.php';
require_once $__dir . '/HTMLPurifier/DefinitionCache/Decorator.php';
require_once $__dir . '/HTMLPurifier/DefinitionCache/Null.php';
require_once $__dir . '/HTMLPurifier/DefinitionCache/Serializer.php';
require_once $__dir . '/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php';
require_once $__dir . '/HTMLPurifier/DefinitionCache/Decorator/Memory.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Bdo.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/CommonAttributes.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Edit.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Forms.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Hypertext.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Image.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Legacy.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/List.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Name.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Object.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Presentation.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Proprietary.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Ruby.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/SafeEmbed.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/SafeObject.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Scripting.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/StyleAttribute.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Tables.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Target.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Text.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/XMLCommonAttributes.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/Name.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/Proprietary.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/Strict.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/Transitional.php';
require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/XHTML.php';
require_once $__dir . '/HTMLPurifier/Injector/AutoParagraph.php';
require_once $__dir . '/HTMLPurifier/Injector/DisplayLinkURI.php';
require_once $__dir . '/HTMLPurifier/Injector/Linkify.php';
require_once $__dir . '/HTMLPurifier/Injector/PurifierLinkify.php';
require_once $__dir . '/HTMLPurifier/Injector/RemoveEmpty.php';
require_once $__dir . '/HTMLPurifier/Injector/SafeObject.php';
require_once $__dir . '/HTMLPurifier/Lexer/DOMLex.php';
require_once $__dir . '/HTMLPurifier/Lexer/DirectLex.php';
require_once $__dir . '/HTMLPurifier/Strategy/Composite.php';
require_once $__dir . '/HTMLPurifier/Strategy/Core.php';
require_once $__dir . '/HTMLPurifier/Strategy/FixNesting.php';
require_once $__dir . '/HTMLPurifier/Strategy/MakeWellFormed.php';
require_once $__dir . '/HTMLPurifier/Strategy/RemoveForeignElements.php';
require_once $__dir . '/HTMLPurifier/Strategy/ValidateAttributes.php';
require_once $__dir . '/HTMLPurifier/TagTransform/Font.php';
require_once $__dir . '/HTMLPurifier/TagTransform/Simple.php';
require_once $__dir . '/HTMLPurifier/Token/Comment.php';
require_once $__dir . '/HTMLPurifier/Token/Tag.php';
require_once $__dir . '/HTMLPurifier/Token/Empty.php';
require_once $__dir . '/HTMLPurifier/Token/End.php';
require_once $__dir . '/HTMLPurifier/Token/Start.php';
require_once $__dir . '/HTMLPurifier/Token/Text.php';
require_once $__dir . '/HTMLPurifier/URIFilter/DisableExternal.php';
require_once $__dir . '/HTMLPurifier/URIFilter/DisableExternalResources.php';
require_once $__dir . '/HTMLPurifier/URIFilter/HostBlacklist.php';
require_once $__dir . '/HTMLPurifier/URIFilter/MakeAbsolute.php';
require_once $__dir . '/HTMLPurifier/URIFilter/Munge.php';
require_once $__dir . '/HTMLPurifier/URIScheme/ftp.php';
require_once $__dir . '/HTMLPurifier/URIScheme/http.php';
require_once $__dir . '/HTMLPurifier/URIScheme/https.php';
require_once $__dir . '/HTMLPurifier/URIScheme/mailto.php';
require_once $__dir . '/HTMLPurifier/URIScheme/news.php';
require_once $__dir . '/HTMLPurifier/URIScheme/nntp.php';
require_once $__dir . '/HTMLPurifier/VarParser/Flexible.php';
require_once $__dir . '/HTMLPurifier/VarParser/Native.php';

View file

@ -0,0 +1,127 @@
<?php
/**
* Defines common attribute collections that modules reference
*/
class HTMLPurifier_AttrCollections
{
/**
* Associative array of attribute collections, indexed by name
*/
public $info = array();
/**
* Performs all expansions on internal data for use by other inclusions
* It also collects all attribute collection extensions from
* modules
* @param $attr_types HTMLPurifier_AttrTypes instance
* @param $modules Hash array of HTMLPurifier_HTMLModule members
*/
public function __construct($attr_types, $modules) {
// load extensions from the modules
foreach ($modules as $module) {
foreach ($module->attr_collections as $coll_i => $coll) {
if (!isset($this->info[$coll_i])) {
$this->info[$coll_i] = array();
}
foreach ($coll as $attr_i => $attr) {
if ($attr_i === 0 && isset($this->info[$coll_i][$attr_i])) {
// merge in includes
$this->info[$coll_i][$attr_i] = array_merge(
$this->info[$coll_i][$attr_i], $attr);
continue;
}
$this->info[$coll_i][$attr_i] = $attr;
}
}
}
// perform internal expansions and inclusions
foreach ($this->info as $name => $attr) {
// merge attribute collections that include others
$this->performInclusions($this->info[$name]);
// replace string identifiers with actual attribute objects
$this->expandIdentifiers($this->info[$name], $attr_types);
}
}
/**
* Takes a reference to an attribute associative array and performs
* all inclusions specified by the zero index.
* @param &$attr Reference to attribute array
*/
public function performInclusions(&$attr) {
if (!isset($attr[0])) return;
$merge = $attr[0];
$seen = array(); // recursion guard
// loop through all the inclusions
for ($i = 0; isset($merge[$i]); $i++) {
if (isset($seen[$merge[$i]])) continue;
$seen[$merge[$i]] = true;
// foreach attribute of the inclusion, copy it over
if (!isset($this->info[$merge[$i]])) continue;
foreach ($this->info[$merge[$i]] as $key => $value) {
if (isset($attr[$key])) continue; // also catches more inclusions
$attr[$key] = $value;
}
if (isset($this->info[$merge[$i]][0])) {
// recursion
$merge = array_merge($merge, $this->info[$merge[$i]][0]);
}
}
unset($attr[0]);
}
/**
* Expands all string identifiers in an attribute array by replacing
* them with the appropriate values inside HTMLPurifier_AttrTypes
* @param &$attr Reference to attribute array
* @param $attr_types HTMLPurifier_AttrTypes instance
*/
public function expandIdentifiers(&$attr, $attr_types) {
// because foreach will process new elements we add, make sure we
// skip duplicates
$processed = array();
foreach ($attr as $def_i => $def) {
// skip inclusions
if ($def_i === 0) continue;
if (isset($processed[$def_i])) continue;
// determine whether or not attribute is required
if ($required = (strpos($def_i, '*') !== false)) {
// rename the definition
unset($attr[$def_i]);
$def_i = trim($def_i, '*');
$attr[$def_i] = $def;
}
$processed[$def_i] = true;
// if we've already got a literal object, move on
if (is_object($def)) {
// preserve previous required
$attr[$def_i]->required = ($required || $attr[$def_i]->required);
continue;
}
if ($def === false) {
unset($attr[$def_i]);
continue;
}
if ($t = $attr_types->get($def)) {
$attr[$def_i] = $t;
$attr[$def_i]->required = $required;
} else {
unset($attr[$def_i]);
}
}
}
}

View file

@ -0,0 +1,86 @@
<?php
/**
* Base class for all validating attribute definitions.
*
* This family of classes forms the core for not only HTML attribute validation,
* but also any sort of string that needs to be validated or cleaned (which
* means CSS properties and composite definitions are defined here too).
* Besides defining (through code) what precisely makes the string valid,
* subclasses are also responsible for cleaning the code if possible.
*/
abstract class HTMLPurifier_AttrDef
{
/**
* Tells us whether or not an HTML attribute is minimized. Has no
* meaning in other contexts.
*/
public $minimized = false;
/**
* Tells us whether or not an HTML attribute is required. Has no
* meaning in other contexts
*/
public $required = false;
/**
* Validates and cleans passed string according to a definition.
*
* @param $string String to be validated and cleaned.
* @param $config Mandatory HTMLPurifier_Config object.
* @param $context Mandatory HTMLPurifier_AttrContext object.
*/
abstract public function validate($string, $config, $context);
/**
* Convenience method that parses a string as if it were CDATA.
*
* This method process a string in the manner specified at
* <http://www.w3.org/TR/html4/types.html#h-6.2> by removing
* leading and trailing whitespace, ignoring line feeds, and replacing
* carriage returns and tabs with spaces. While most useful for HTML
* attributes specified as CDATA, it can also be applied to most CSS
* values.
*
* @note This method is not entirely standards compliant, as trim() removes
* more types of whitespace than specified in the spec. In practice,
* this is rarely a problem, as those extra characters usually have
* already been removed by HTMLPurifier_Encoder.
*
* @warning This processing is inconsistent with XML's whitespace handling
* as specified by section 3.3.3 and referenced XHTML 1.0 section
* 4.7. However, note that we are NOT necessarily
* parsing XML, thus, this behavior may still be correct. We
* assume that newlines have been normalized.
*/
public function parseCDATA($string) {
$string = trim($string);
$string = str_replace(array("\n", "\t", "\r"), ' ', $string);
return $string;
}
/**
* Factory method for creating this class from a string.
* @param $string String construction info
* @return Created AttrDef object corresponding to $string
*/
public function make($string) {
// default implementation, return a flyweight of this object.
// If $string has an effect on the returned object (i.e. you
// need to overload this method), it is best
// to clone or instantiate new copies. (Instantiation is safer.)
return $this;
}
/**
* Removes spaces from rgb(0, 0, 0) so that shorthand CSS properties work
* properly. THIS IS A HACK!
*/
protected function mungeRgb($string) {
return preg_replace('/rgb\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)\)/', 'rgb(\1,\2,\3)', $string);
}
}

View file

@ -0,0 +1,86 @@
<?php
/**
* Validates the HTML attribute style, otherwise known as CSS.
* @note We don't implement the whole CSS specification, so it might be
* difficult to reuse this component in the context of validating
* actual stylesheet declarations.
* @note If we were really serious about validating the CSS, we would
* tokenize the styles and then parse the tokens. Obviously, we
* are not doing that. Doing that could seriously harm performance,
* but would make these components a lot more viable for a CSS
* filtering solution.
*/
class HTMLPurifier_AttrDef_CSS extends HTMLPurifier_AttrDef
{
public function validate($css, $config, $context) {
$css = $this->parseCDATA($css);
$definition = $config->getCSSDefinition();
// we're going to break the spec and explode by semicolons.
// This is because semicolon rarely appears in escaped form
// Doing this is generally flaky but fast
// IT MIGHT APPEAR IN URIs, see HTMLPurifier_AttrDef_CSSURI
// for details
$declarations = explode(';', $css);
$propvalues = array();
/**
* Name of the current CSS property being validated.
*/
$property = false;
$context->register('CurrentCSSProperty', $property);
foreach ($declarations as $declaration) {
if (!$declaration) continue;
if (!strpos($declaration, ':')) continue;
list($property, $value) = explode(':', $declaration, 2);
$property = trim($property);
$value = trim($value);
$ok = false;
do {
if (isset($definition->info[$property])) {
$ok = true;
break;
}
if (ctype_lower($property)) break;
$property = strtolower($property);
if (isset($definition->info[$property])) {
$ok = true;
break;
}
} while(0);
if (!$ok) continue;
// inefficient call, since the validator will do this again
if (strtolower(trim($value)) !== 'inherit') {
// inherit works for everything (but only on the base property)
$result = $definition->info[$property]->validate(
$value, $config, $context );
} else {
$result = 'inherit';
}
if ($result === false) continue;
$propvalues[$property] = $result;
}
$context->destroy('CurrentCSSProperty');
// procedure does not write the new CSS simultaneously, so it's
// slightly inefficient, but it's the only way of getting rid of
// duplicates. Perhaps config to optimize it, but not now.
$new_declarations = '';
foreach ($propvalues as $prop => $value) {
$new_declarations .= "$prop:$value;";
}
return $new_declarations ? $new_declarations : false;
}
}

View file

@ -0,0 +1,19 @@
<?php
class HTMLPurifier_AttrDef_CSS_AlphaValue extends HTMLPurifier_AttrDef_CSS_Number
{
public function __construct() {
parent::__construct(false); // opacity is non-negative, but we will clamp it
}
public function validate($number, $config, $context) {
$result = parent::validate($number, $config, $context);
if ($result === false) return $result;
$float = (float) $result;
if ($float < 0.0) $result = '0';
if ($float > 1.0) $result = '1';
return $result;
}
}

View file

@ -0,0 +1,86 @@
<?php
/**
* Validates shorthand CSS property background.
* @warning Does not support url tokens that have internal spaces.
*/
class HTMLPurifier_AttrDef_CSS_Background extends HTMLPurifier_AttrDef
{
/**
* Local copy of component validators.
* @note See HTMLPurifier_AttrDef_Font::$info for a similar impl.
*/
protected $info;
public function __construct($config) {
$def = $config->getCSSDefinition();
$this->info['background-color'] = $def->info['background-color'];
$this->info['background-image'] = $def->info['background-image'];
$this->info['background-repeat'] = $def->info['background-repeat'];
$this->info['background-attachment'] = $def->info['background-attachment'];
$this->info['background-position'] = $def->info['background-position'];
}
public function validate($string, $config, $context) {
// regular pre-processing
$string = $this->parseCDATA($string);
if ($string === '') return false;
// munge rgb() decl if necessary
$string = $this->mungeRgb($string);
// assumes URI doesn't have spaces in it
$bits = explode(' ', strtolower($string)); // bits to process
$caught = array();
$caught['color'] = false;
$caught['image'] = false;
$caught['repeat'] = false;
$caught['attachment'] = false;
$caught['position'] = false;
$i = 0; // number of catches
$none = false;
foreach ($bits as $bit) {
if ($bit === '') continue;
foreach ($caught as $key => $status) {
if ($key != 'position') {
if ($status !== false) continue;
$r = $this->info['background-' . $key]->validate($bit, $config, $context);
} else {
$r = $bit;
}
if ($r === false) continue;
if ($key == 'position') {
if ($caught[$key] === false) $caught[$key] = '';
$caught[$key] .= $r . ' ';
} else {
$caught[$key] = $r;
}
$i++;
break;
}
}
if (!$i) return false;
if ($caught['position'] !== false) {
$caught['position'] = $this->info['background-position']->
validate($caught['position'], $config, $context);
}
$ret = array();
foreach ($caught as $value) {
if ($value === false) continue;
$ret[] = $value;
}
if (empty($ret)) return false;
return implode(' ', $ret);
}
}

View file

@ -0,0 +1,125 @@
<?php
/* W3C says:
[ // adjective and number must be in correct order, even if
// you could switch them without introducing ambiguity.
// some browsers support that syntax
[
<percentage> | <length> | left | center | right
]
[
<percentage> | <length> | top | center | bottom
]?
] |
[ // this signifies that the vertical and horizontal adjectives
// can be arbitrarily ordered, however, there can only be two,
// one of each, or none at all
[
left | center | right
] ||
[
top | center | bottom
]
]
top, left = 0%
center, (none) = 50%
bottom, right = 100%
*/
/* QuirksMode says:
keyword + length/percentage must be ordered correctly, as per W3C
Internet Explorer and Opera, however, support arbitrary ordering. We
should fix it up.
Minor issue though, not strictly necessary.
*/
// control freaks may appreciate the ability to convert these to
// percentages or something, but it's not necessary
/**
* Validates the value of background-position.
*/
class HTMLPurifier_AttrDef_CSS_BackgroundPosition extends HTMLPurifier_AttrDef
{
protected $length;
protected $percentage;
public function __construct() {
$this->length = new HTMLPurifier_AttrDef_CSS_Length();
$this->percentage = new HTMLPurifier_AttrDef_CSS_Percentage();
}
public function validate($string, $config, $context) {
$string = $this->parseCDATA($string);
$bits = explode(' ', $string);
$keywords = array();
$keywords['h'] = false; // left, right
$keywords['v'] = false; // top, bottom
$keywords['c'] = false; // center
$measures = array();
$i = 0;
$lookup = array(
'top' => 'v',
'bottom' => 'v',
'left' => 'h',
'right' => 'h',
'center' => 'c'
);
foreach ($bits as $bit) {
if ($bit === '') continue;
// test for keyword
$lbit = ctype_lower($bit) ? $bit : strtolower($bit);
if (isset($lookup[$lbit])) {
$status = $lookup[$lbit];
$keywords[$status] = $lbit;
$i++;
}
// test for length
$r = $this->length->validate($bit, $config, $context);
if ($r !== false) {
$measures[] = $r;
$i++;
}
// test for percentage
$r = $this->percentage->validate($bit, $config, $context);
if ($r !== false) {
$measures[] = $r;
$i++;
}
}
if (!$i) return false; // no valid values were caught
$ret = array();
// first keyword
if ($keywords['h']) $ret[] = $keywords['h'];
elseif (count($measures)) $ret[] = array_shift($measures);
elseif ($keywords['c']) {
$ret[] = $keywords['c'];
$keywords['c'] = false; // prevent re-use: center = center center
}
if ($keywords['v']) $ret[] = $keywords['v'];
elseif (count($measures)) $ret[] = array_shift($measures);
elseif ($keywords['c']) $ret[] = $keywords['c'];
if (empty($ret)) return false;
return implode(' ', $ret);
}
}

View file

@ -0,0 +1,42 @@
<?php
/**
* Validates the border property as defined by CSS.
*/
class HTMLPurifier_AttrDef_CSS_Border extends HTMLPurifier_AttrDef
{
/**
* Local copy of properties this property is shorthand for.
*/
protected $info = array();
public function __construct($config) {
$def = $config->getCSSDefinition();
$this->info['border-width'] = $def->info['border-width'];
$this->info['border-style'] = $def->info['border-style'];
$this->info['border-top-color'] = $def->info['border-top-color'];
}
public function validate($string, $config, $context) {
$string = $this->parseCDATA($string);
$string = $this->mungeRgb($string);
$bits = explode(' ', $string);
$done = array(); // segments we've finished
$ret = ''; // return value
foreach ($bits as $bit) {
foreach ($this->info as $propname => $validator) {
if (isset($done[$propname])) continue;
$r = $validator->validate($bit, $config, $context);
if ($r !== false) {
$ret .= $r . ' ';
$done[$propname] = true;
break;
}
}
}
return rtrim($ret);
}
}

View file

@ -0,0 +1,77 @@
<?php
/**
* Validates Color as defined by CSS.
*/
class HTMLPurifier_AttrDef_CSS_Color extends HTMLPurifier_AttrDef
{
public function validate($color, $config, $context) {
static $colors = null;
if ($colors === null) $colors = $config->get('Core', 'ColorKeywords');
$color = trim($color);
if ($color === '') return false;
$lower = strtolower($color);
if (isset($colors[$lower])) return $colors[$lower];
if (strpos($color, 'rgb(') !== false) {
// rgb literal handling
$length = strlen($color);
if (strpos($color, ')') !== $length - 1) return false;
$triad = substr($color, 4, $length - 4 - 1);
$parts = explode(',', $triad);
if (count($parts) !== 3) return false;
$type = false; // to ensure that they're all the same type
$new_parts = array();
foreach ($parts as $part) {
$part = trim($part);
if ($part === '') return false;
$length = strlen($part);
if ($part[$length - 1] === '%') {
// handle percents
if (!$type) {
$type = 'percentage';
} elseif ($type !== 'percentage') {
return false;
}
$num = (float) substr($part, 0, $length - 1);
if ($num < 0) $num = 0;
if ($num > 100) $num = 100;
$new_parts[] = "$num%";
} else {
// handle integers
if (!$type) {
$type = 'integer';
} elseif ($type !== 'integer') {
return false;
}
$num = (int) $part;
if ($num < 0) $num = 0;
if ($num > 255) $num = 255;
$new_parts[] = (string) $num;
}
}
$new_triad = implode(',', $new_parts);
$color = "rgb($new_triad)";
} else {
// hexadecimal handling
if ($color[0] === '#') {
$hex = substr($color, 1);
} else {
$hex = $color;
$color = '#' . $color;
}
$length = strlen($hex);
if ($length !== 3 && $length !== 6) return false;
if (!ctype_xdigit($hex)) return false;
}
return $color;
}
}

View file

@ -0,0 +1,37 @@
<?php
/**
* Allows multiple validators to attempt to validate attribute.
*
* Composite is just what it sounds like: a composite of many validators.
* This means that multiple HTMLPurifier_AttrDef objects will have a whack
* at the string. If one of them passes, that's what is returned. This is
* especially useful for CSS values, which often are a choice between
* an enumerated set of predefined values or a flexible data type.
*/
class HTMLPurifier_AttrDef_CSS_Composite extends HTMLPurifier_AttrDef
{
/**
* List of HTMLPurifier_AttrDef objects that may process strings
* @todo Make protected
*/
public $defs;
/**
* @param $defs List of HTMLPurifier_AttrDef objects
*/
public function __construct($defs) {
$this->defs = $defs;
}
public function validate($string, $config, $context) {
foreach ($this->defs as $i => $def) {
$result = $this->defs[$i]->validate($string, $config, $context);
if ($result !== false) return $result;
}
return false;
}
}

View file

@ -0,0 +1,26 @@
<?php
/**
* Decorator which enables CSS properties to be disabled for specific elements.
*/
class HTMLPurifier_AttrDef_CSS_DenyElementDecorator extends HTMLPurifier_AttrDef
{
protected $def, $element;
/**
* @param $def Definition to wrap
* @param $element Element to deny
*/
public function __construct($def, $element) {
$this->def = $def;
$this->element = $element;
}
/**
* Checks if CurrentToken is set and equal to $this->element
*/
public function validate($string, $config, $context) {
$token = $context->get('CurrentToken', true);
if ($token && $token->name == $this->element) return false;
return $this->def->validate($string, $config, $context);
}
}

View file

@ -0,0 +1,52 @@
<?php
/**
* Microsoft's proprietary filter: CSS property
* @note Currently supports the alpha filter. In the future, this will
* probably need an extensible framework
*/
class HTMLPurifier_AttrDef_CSS_Filter extends HTMLPurifier_AttrDef
{
protected $intValidator;
public function __construct() {
$this->intValidator = new HTMLPurifier_AttrDef_Integer();
}
public function validate($value, $config, $context) {
$value = $this->parseCDATA($value);
if ($value === 'none') return $value;
// if we looped this we could support multiple filters
$function_length = strcspn($value, '(');
$function = trim(substr($value, 0, $function_length));
if ($function !== 'alpha' &&
$function !== 'Alpha' &&
$function !== 'progid:DXImageTransform.Microsoft.Alpha'
) return false;
$cursor = $function_length + 1;
$parameters_length = strcspn($value, ')', $cursor);
$parameters = substr($value, $cursor, $parameters_length);
$params = explode(',', $parameters);
$ret_params = array();
$lookup = array();
foreach ($params as $param) {
list($key, $value) = explode('=', $param);
$key = trim($key);
$value = trim($value);
if (isset($lookup[$key])) continue;
if ($key !== 'opacity') continue;
$value = $this->intValidator->validate($value, $config, $context);
if ($value === false) continue;
$int = (int) $value;
if ($int > 100) $value = '100';
if ($int < 0) $value = '0';
$ret_params[] = "$key=$value";
$lookup[$key] = true;
}
$ret_parameters = implode(',', $ret_params);
$ret_function = "$function($ret_parameters)";
return $ret_function;
}
}

View file

@ -0,0 +1,148 @@
<?php
/**
* Validates shorthand CSS property font.
*/
class HTMLPurifier_AttrDef_CSS_Font extends HTMLPurifier_AttrDef
{
/**
* Local copy of component validators.
*
* @note If we moved specific CSS property definitions to their own
* classes instead of having them be assembled at run time by
* CSSDefinition, this wouldn't be necessary. We'd instantiate
* our own copies.
*/
protected $info = array();
public function __construct($config) {
$def = $config->getCSSDefinition();
$this->info['font-style'] = $def->info['font-style'];
$this->info['font-variant'] = $def->info['font-variant'];
$this->info['font-weight'] = $def->info['font-weight'];
$this->info['font-size'] = $def->info['font-size'];
$this->info['line-height'] = $def->info['line-height'];
$this->info['font-family'] = $def->info['font-family'];
}
public function validate($string, $config, $context) {
static $system_fonts = array(
'caption' => true,
'icon' => true,
'menu' => true,
'message-box' => true,
'small-caption' => true,
'status-bar' => true
);
// regular pre-processing
$string = $this->parseCDATA($string);
if ($string === '') return false;
// check if it's one of the keywords
$lowercase_string = strtolower($string);
if (isset($system_fonts[$lowercase_string])) {
return $lowercase_string;
}
$bits = explode(' ', $string); // bits to process
$stage = 0; // this indicates what we're looking for
$caught = array(); // which stage 0 properties have we caught?
$stage_1 = array('font-style', 'font-variant', 'font-weight');
$final = ''; // output
for ($i = 0, $size = count($bits); $i < $size; $i++) {
if ($bits[$i] === '') continue;
switch ($stage) {
// attempting to catch font-style, font-variant or font-weight
case 0:
foreach ($stage_1 as $validator_name) {
if (isset($caught[$validator_name])) continue;
$r = $this->info[$validator_name]->validate(
$bits[$i], $config, $context);
if ($r !== false) {
$final .= $r . ' ';
$caught[$validator_name] = true;
break;
}
}
// all three caught, continue on
if (count($caught) >= 3) $stage = 1;
if ($r !== false) break;
// attempting to catch font-size and perhaps line-height
case 1:
$found_slash = false;
if (strpos($bits[$i], '/') !== false) {
list($font_size, $line_height) =
explode('/', $bits[$i]);
if ($line_height === '') {
// ooh, there's a space after the slash!
$line_height = false;
$found_slash = true;
}
} else {
$font_size = $bits[$i];
$line_height = false;
}
$r = $this->info['font-size']->validate(
$font_size, $config, $context);
if ($r !== false) {
$final .= $r;
// attempt to catch line-height
if ($line_height === false) {
// we need to scroll forward
for ($j = $i + 1; $j < $size; $j++) {
if ($bits[$j] === '') continue;
if ($bits[$j] === '/') {
if ($found_slash) {
return false;
} else {
$found_slash = true;
continue;
}
}
$line_height = $bits[$j];
break;
}
} else {
// slash already found
$found_slash = true;
$j = $i;
}
if ($found_slash) {
$i = $j;
$r = $this->info['line-height']->validate(
$line_height, $config, $context);
if ($r !== false) {
$final .= '/' . $r;
}
}
$final .= ' ';
$stage = 2;
break;
}
return false;
// attempting to catch font-family
case 2:
$font_family =
implode(' ', array_slice($bits, $i, $size - $i));
$r = $this->info['font-family']->validate(
$font_family, $config, $context);
if ($r !== false) {
$final .= $r . ' ';
// processing completed successfully
return rtrim($final);
}
return false;
}
}
return false;
}
}

View file

@ -0,0 +1,89 @@
<?php
/**
* Validates a font family list according to CSS spec
* @todo whitelisting allowed fonts would be nice
*/
class HTMLPurifier_AttrDef_CSS_FontFamily extends HTMLPurifier_AttrDef
{
public function validate($string, $config, $context) {
static $generic_names = array(
'serif' => true,
'sans-serif' => true,
'monospace' => true,
'fantasy' => true,
'cursive' => true
);
// assume that no font names contain commas in them
$fonts = explode(',', $string);
$final = '';
foreach($fonts as $font) {
$font = trim($font);
if ($font === '') continue;
// match a generic name
if (isset($generic_names[$font])) {
$final .= $font . ', ';
continue;
}
// match a quoted name
if ($font[0] === '"' || $font[0] === "'") {
$length = strlen($font);
if ($length <= 2) continue;
$quote = $font[0];
if ($font[$length - 1] !== $quote) continue;
$font = substr($font, 1, $length - 2);
$new_font = '';
for ($i = 0, $c = strlen($font); $i < $c; $i++) {
if ($font[$i] === '\\') {
$i++;
if ($i >= $c) {
$new_font .= '\\';
break;
}
if (ctype_xdigit($font[$i])) {
$code = $font[$i];
for ($a = 1, $i++; $i < $c && $a < 6; $i++, $a++) {
if (!ctype_xdigit($font[$i])) break;
$code .= $font[$i];
}
// We have to be extremely careful when adding
// new characters, to make sure we're not breaking
// the encoding.
$char = HTMLPurifier_Encoder::unichr(hexdec($code));
if (HTMLPurifier_Encoder::cleanUTF8($char) === '') continue;
$new_font .= $char;
if ($i < $c && trim($font[$i]) !== '') $i--;
continue;
}
if ($font[$i] === "\n") continue;
}
$new_font .= $font[$i];
}
$font = $new_font;
}
// $font is a pure representation of the font name
if (ctype_alnum($font) && $font !== '') {
// very simple font, allow it in unharmed
$final .= $font . ', ';
continue;
}
// complicated font, requires quoting
// armor single quotes and new lines
$font = str_replace("\\", "\\\\", $font);
$font = str_replace("'", "\\'", $font);
$final .= "'$font', ";
}
$final = rtrim($final, ', ');
if ($final === '') return false;
return $final;
}
}

View file

@ -0,0 +1,38 @@
<?php
/**
* Decorator which enables !important to be used in CSS values.
*/
class HTMLPurifier_AttrDef_CSS_ImportantDecorator extends HTMLPurifier_AttrDef
{
protected $def, $allow;
/**
* @param $def Definition to wrap
* @param $allow Whether or not to allow !important
*/
public function __construct($def, $allow = false) {
$this->def = $def;
$this->allow = $allow;
}
/**
* Intercepts and removes !important if necessary
*/
public function validate($string, $config, $context) {
// test for ! and important tokens
$string = trim($string);
$is_important = false;
// :TODO: optimization: test directly for !important and ! important
if (strlen($string) >= 9 && substr($string, -9) === 'important') {
$temp = rtrim(substr($string, 0, -9));
// use a temp, because we might want to restore important
if (strlen($temp) >= 1 && substr($temp, -1) === '!') {
$string = rtrim(substr($temp, 0, -1));
$is_important = true;
}
}
$string = $this->def->validate($string, $config, $context);
if ($this->allow && $is_important) $string .= ' !important';
return $string;
}
}

View file

@ -0,0 +1,46 @@
<?php
/**
* Represents a Length as defined by CSS.
*/
class HTMLPurifier_AttrDef_CSS_Length extends HTMLPurifier_AttrDef
{
protected $min, $max;
/**
* @param HTMLPurifier_Length $max Minimum length, or null for no bound. String is also acceptable.
* @param HTMLPurifier_Length $max Maximum length, or null for no bound. String is also acceptable.
*/
public function __construct($min = null, $max = null) {
$this->min = $min !== null ? HTMLPurifier_Length::make($min) : null;
$this->max = $max !== null ? HTMLPurifier_Length::make($max) : null;
}
public function validate($string, $config, $context) {
$string = $this->parseCDATA($string);
// Optimizations
if ($string === '') return false;
if ($string === '0') return '0';
if (strlen($string) === 1) return false;
$length = HTMLPurifier_Length::make($string);
if (!$length->isValid()) return false;
if ($this->min) {
$c = $length->compareTo($this->min);
if ($c === false) return false;
if ($c < 0) return false;
}
if ($this->max) {
$c = $length->compareTo($this->max);
if ($c === false) return false;
if ($c > 0) return false;
}
return $length->toString();
}
}

Some files were not shown because too many files have changed in this diff Show more