|
|
|
|
@ -50,7 +50,7 @@
|
|
|
|
|
* \retval 0 no match
|
|
|
|
|
* \retval 1 match
|
|
|
|
|
*/
|
|
|
|
|
static inline int DoInspectPacketUricontentPayload(DetectEngineCtx *de_ctx,
|
|
|
|
|
static inline int DoInspectPacketUris(DetectEngineCtx *de_ctx,
|
|
|
|
|
DetectEngineThreadCtx *det_ctx, Signature *s, SigMatch *sm,
|
|
|
|
|
Packet *p, uint8_t *payload, uint32_t payload_len)
|
|
|
|
|
{
|
|
|
|
|
@ -191,7 +191,7 @@ static inline int DoInspectPacketUricontentPayload(DetectEngineCtx *de_ctx,
|
|
|
|
|
/* see if the next payload keywords match. If not, we will
|
|
|
|
|
* search for another occurence of this uricontent and see
|
|
|
|
|
* if the others match then until we run out of matches */
|
|
|
|
|
int r = DoInspectPacketUricontentPayload(de_ctx,det_ctx,s,sm->next, p, payload, payload_len);
|
|
|
|
|
int r = DoInspectPacketUris(de_ctx,det_ctx,s,sm->next, p, payload, payload_len);
|
|
|
|
|
if (r == 1) {
|
|
|
|
|
SCReturnInt(1);
|
|
|
|
|
}
|
|
|
|
|
@ -212,7 +212,7 @@ match:
|
|
|
|
|
/* this sigmatch matched, inspect the next one. If it was the last,
|
|
|
|
|
* the payload portion of the signature matched. */
|
|
|
|
|
if (sm->next != NULL) {
|
|
|
|
|
int r = DoInspectPacketUricontentPayload(de_ctx,det_ctx,s,sm->next, p, payload, payload_len);
|
|
|
|
|
int r = DoInspectPacketUris(de_ctx,det_ctx,s,sm->next, p, payload, payload_len);
|
|
|
|
|
SCReturnInt(r);
|
|
|
|
|
} else {
|
|
|
|
|
SCReturnInt(1);
|
|
|
|
|
@ -233,7 +233,7 @@ match:
|
|
|
|
|
* \retval 0 no match
|
|
|
|
|
* \retval 1 match
|
|
|
|
|
*/
|
|
|
|
|
int DetectEngineInspectPacketUricontentPayload(DetectEngineCtx *de_ctx,
|
|
|
|
|
int DetectEngineInspectPacketUris(DetectEngineCtx *de_ctx,
|
|
|
|
|
DetectEngineThreadCtx *det_ctx, Signature *s, Flow *f, uint8_t flags,
|
|
|
|
|
void *alstate, Packet *p)
|
|
|
|
|
{
|
|
|
|
|
@ -277,7 +277,7 @@ int DetectEngineInspectPacketUricontentPayload(DetectEngineCtx *de_ctx,
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
/* Inspect all the uricontents fetched on each transaction at the app layer */
|
|
|
|
|
r = DoInspectPacketUricontentPayload(de_ctx, det_ctx, s, s->umatch, p, (uint8_t *) bstr_ptr(tx->request_uri_normalized), bstr_len(tx->request_uri_normalized));
|
|
|
|
|
r = DoInspectPacketUris(de_ctx, det_ctx, s, s->umatch, p, (uint8_t *) bstr_ptr(tx->request_uri_normalized), bstr_len(tx->request_uri_normalized));
|
|
|
|
|
|
|
|
|
|
if (r == 1) {
|
|
|
|
|
break;
|
|
|
|
|
|