mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-17 01:51:52 +03:00
Adds custom driver trail example
This commit is contained in:
@@ -35,6 +35,9 @@
|
||||
using modsecurity::Rule;
|
||||
using modsecurity::Rules;
|
||||
|
||||
namespace yy {
|
||||
class location;
|
||||
}
|
||||
|
||||
namespace modsecurity {
|
||||
namespace Parser {
|
||||
@@ -69,25 +72,32 @@ class Driver {
|
||||
}
|
||||
return m_trail->addSecRule(rule);
|
||||
}
|
||||
|
||||
|
||||
int addSecAction(Rule *rule) {
|
||||
if (!m_trail) {
|
||||
return -1;
|
||||
}
|
||||
return m_trail->addSecAction(rule);
|
||||
}
|
||||
|
||||
|
||||
int addSecMarker(std::string marker) {
|
||||
if (!m_trail) {
|
||||
return -1;
|
||||
}
|
||||
return m_trail->addSecMarker(marker);
|
||||
}
|
||||
int addSecRuleScript(RuleScript *rule) {
|
||||
|
||||
|
||||
int addSecRuleScript(Rule *rule) {
|
||||
if (!m_trail) {
|
||||
return -1;
|
||||
}
|
||||
return m_trail->addSecRuleScript(rule);
|
||||
}
|
||||
|
||||
|
||||
DriverTrail *m_trail;
|
||||
|
||||
bool m_traceScanning;
|
||||
@@ -103,4 +113,5 @@ class Driver {
|
||||
} // namespace Parser
|
||||
} // namespace modsecurity
|
||||
|
||||
|
||||
#endif // HEADERS_MODSECURITY_PARSER_DRIVER_H_
|
||||
|
||||
Reference in New Issue
Block a user