Jan_31_2024-Dev

This commit is contained in:
Ned Wright
2024-01-31 17:34:53 +00:00
parent 752a5785f0
commit 6d67818a94
376 changed files with 8101 additions and 7064 deletions

View File

@@ -88,10 +88,8 @@ WaapComponent::Impl::init(const std::string &waapDataFileName)
//waf2_set_log_target(WAF2_LOGTARGET_STDERR);
dbgTrace(D_WAAP) << "WaapComponent::Impl::init() ...";
reputationAggregator.init();
waapStateTable = Singleton::Consume<I_Table>::by<WaapComponent>();
bool success = waf2_proc_start(waapDataFileName);
if (!success) {
dbgWarning(D_WAAP) << "WAF2 engine FAILED to initialize (probably failed to load signatures). Aborting!";
@@ -169,6 +167,7 @@ WaapComponent::Impl::respond(const NewHttpTransactionEvent &event)
waf2TransactionFlags.endResponseHeadersCalled = false;
waf2TransactionFlags.responseDataPushStarted = false;
waf2Transaction.start();
char sourceIpStr[INET_ADDRSTRLEN];
@@ -187,7 +186,6 @@ WaapComponent::Impl::respond(const NewHttpTransactionEvent &event)
// Tell waf2 API that request headers started
waf2Transaction.start_request_hdrs();
return pending_response;
}
@@ -242,7 +240,7 @@ WaapComponent::Impl::respond(const HttpRequestHeaderEvent &event)
}
// Delete state before returning any verdict which is not pending
if ((verdict.getVerdict() != pending_response.getVerdict()) && waapStateTable->hasState<Waf2Transaction>()) {
if ((verdict.getVerdict() != pending_response.getVerdict()) && waapStateTable->hasState<Waf2Transaction>()) {
finishTransaction(waf2Transaction);
} else {
}
@@ -344,6 +342,7 @@ WaapComponent::Impl::respond(const ResponseCodeEvent &event)
}
IWaf2Transaction& waf2Transaction = waapStateTable->getState<Waf2Transaction>();
// TODO:: extract HTTP version from attachment?
static const int http_version = 0x11;