static int DetectHttpCookieSetup(DetectEngineCtx *de_ctx, Signature *s, char *str)
{
    return DetectEngineContentModifierBufferSetup(de_ctx, s, str,
                                                  DETECT_AL_HTTP_COOKIE,
                                                  DETECT_SM_LIST_HCDMATCH,
                                                  ALPROTO_HTTP,
                                                  NULL);
}
Beispiel #2
0
/**
 * \brief This function is used to add the parsed "http_method" option
 *        into the current signature.
 *
 * \param de_ctx Pointer to the Detection Engine Context.
 * \param s      Pointer to the Current Signature.
 * \param str    Pointer to the user provided option string.
 *
 * \retval  0 on Success.
 * \retval -1 on Failure.
 */
static int DetectHttpMethodSetup(DetectEngineCtx *de_ctx, Signature *s, char *str)
{
    return DetectEngineContentModifierBufferSetup(de_ctx, s, str,
                                                  DETECT_AL_HTTP_METHOD,
                                                  DETECT_SM_LIST_HMDMATCH,
                                                  ALPROTO_HTTP,
                                                  NULL);
}
Beispiel #3
0
int DetectHttpUriSetup(DetectEngineCtx *de_ctx, Signature *s, char *str)
{
    return DetectEngineContentModifierBufferSetup(de_ctx, s, str,
                                                  DETECT_AL_HTTP_URI,
                                                  DETECT_SM_LIST_UMATCH,
                                                  ALPROTO_HTTP,
                                                  NULL);
}
Beispiel #4
0
/**
 * \brief The setup function for the http_header keyword for a signature.
 *
 * \param de_ctx Pointer to the detection engine context.
 * \param s      Pointer to signature for the current Signature being parsed
 *               from the rules.
 * \param m      Pointer to the head of the SigMatchs for the current rule
 *               being parsed.
 * \param arg    Pointer to the string holding the keyword value.
 *
 * \retval  0 On success.
 * \retval -1 On failure.
 */
int DetectHttpHeaderSetup(DetectEngineCtx *de_ctx, Signature *s, char *arg)
{
    return DetectEngineContentModifierBufferSetup(de_ctx, s, arg,
            DETECT_AL_HTTP_HEADER,
            DETECT_SM_LIST_HHDMATCH,
            ALPROTO_HTTP,
            NULL);
}
static int DetectHttpStatMsgSetup(DetectEngineCtx *de_ctx, Signature *s, char *arg)
{
    return DetectEngineContentModifierBufferSetup(de_ctx, s, arg,
                                                  DETECT_AL_HTTP_STAT_MSG,
                                                  DETECT_SM_LIST_HSMDMATCH,
                                                  ALPROTO_HTTP,
                                                  NULL);
}